Quickstart: Service Invocation
In this quickstart, you'll run a client and server application on Catalyst Cloud. You will learn how to:
- Provision a Catalyst project with App IDs for two applications using the Diagrid CLI.
- Invoke a remote service method from a client application using the Dapr Service Invocation API.
- Verify successful service-to-service communication in the application logs and the Catalyst web console.
1. Prerequisites
Before you proceed, ensure you have the following prerequisites installed.
- Python
- .NET
- JavaScript
- Java
2. Log in to Catalyst
Authenticate to Diagrid Catalyst using the following command:
diagrid login
This command opens a new browser window where where you'll be shown a confirmation code that should match the code in your terminal. Confirm the code, and if you're not logged into Catalyst, you'll be redirected to login.
Confirm your user details are correct using the following command:
diagrid whoami
The expected output contains the name of the organization, your user name, and the Catalyst API endpoint.
3. Clone Quickstart Code
Clone the quickstart code from GitHub:
git clone https://github.com/diagridio/catalyst-quickstarts
Navigate to the quickstart directory:
- Python
- .NET
- JavaScript
- Java
- macOS/Linux
- Windows
cd catalyst-quickstarts/invocation/python
cd catalyst-quickstarts\invocation\python
- macOS/Linux
- Windows
cd catalyst-quickstarts/invocation/csharp
cd catalyst-quickstarts\invocation\csharp
- macOS/Linux
- Windows
cd catalyst-quickstarts/invocation/javascript
cd catalyst-quickstarts\invocation\javascript
- macOS/Linux
- Windows
cd catalyst-quickstarts/invocation/java
cd catalyst-quickstarts\invocation\java
4. Install Dependencies
Install the dependencies for both the client and server applications.
- Python
- .NET
- JavaScript
- Java
Create and activate a Python virtual environment:
- macOS/Linux
- Windows
uv venv
source .venv/bin/activate
uv venv
.venv\Scripts\activate
## or use .venv\Scripts\Activate.ps1
Install dependencies:
uv sync --active --directory client && uv sync --active --directory server
Install .NET dependencies:
dotnet restore ./client && dotnet restore ./server
Install Node dependencies:
npm install --prefix ./client && npm install --prefix ./server
Install Maven dependencies:
mvn clean install -f ./client && mvn clean install -f ./server
5. Run the application with Catalyst Cloud
The diagrid dev run command creates your Catalyst project, provisions resources (App IDs), configures environment variables, and launches your application connected to Catalyst Cloud.
- Python
- .NET
- JavaScript
- Java
diagrid dev run -f invocation-quickstart.yaml --project invocation-quickstart --approve
diagrid dev run -f invocation-quickstart.yaml --project invocation-quickstart --approve
diagrid dev run -f invocation-quickstart.yaml --project invocation-quickstart --approve
diagrid dev run -f invocation-quickstart.yaml --project invocation-quickstart --approve
Wait a few seconds until you see the log Connected App ID "server" to localhost:5002 in the terminal before proceeding to ensure both applications are up and running.
6. Invoke the service
With the quickstart running, test the Service Invocation API by sending a request from the client app to the server app.
6.1 Send a request
Open a new terminal and execute the following command to invoke the server app through the client app:
- macOS/Linux
- Windows
curl -i -X POST http://localhost:5001/order -H "Content-Type: application/json" -d '{"orderId":1}'
Invoke-RestMethod -Method Post -Uri "http://localhost:5001/order" -ContentType "application/json" -Body '{"orderId":1}'
The expected response is:
HTTP/1.1 200 OK
In the diagrid dev run terminal, the server app logs should indicate the request was successfully received, and the client app logs should show the invocation was successful.
6.2 View in the Catalyst web console
Open the Catalyst Cloud web console and navigate to the App Graph section that visualizes the communication between the client and server applications.
7. Clean Up
Press CTRL+C in the terminal that runs diagrid dev run to stop the application and disconnect from Catalyst Cloud.
To delete the entire project and all provisioned resources:
diagrid project delete invocation-quickstart
Summary
In this quickstart you:
- Logged in to Catalyst and provisioned a managed service invocation project with a single CLI command (
diagrid dev run). - Invoked a remote server method from a client application using the Dapr Service Invocation API.
- Verified service-to-service communication through application logs and the Catalyst web console.
Catalyst handled service discovery, routing, and secure communication automatically — no infrastructure to manage.
Next steps
- Explore the Dapr API SDK guides to integrate service invocation into your own applications.
- Read about microservices use cases to understand how Catalyst supports microservice communication patterns.
- Try the Pub/Sub quickstart to add event-driven messaging between your services.