You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/cloud/operation-api.mdx
+53-42Lines changed: 53 additions & 42 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,14 +22,21 @@ The Temporal Cloud Operations API, or the Cloud Ops API, is an open source, publ
22
22
23
23
## Develop applications with the Cloud Ops API
24
24
25
-
You can use the HTTP API or the gRPC API depending on how you need to integrate with your platform. The URL to access both the HTTP and gRPC Cloud Ops API is `saas-api.tmprl.cloud`.
25
+
You can use the HTTP API or the gRPC API depending on how you need to integrate with your platform.
26
+
27
+
- HTTP: `https://saas-api.tmprl.cloud`
28
+
- gRPC: `saas-api.tmprl.cloud:443`
29
+
30
+
If you connect to Temporal Cloud over [AWS PrivateLink](/cloud/connectivity/aws-connectivity) or [GCP Private Service Connect](/cloud/connectivity/gcp-connectivity), configure private DNS for `saas-api.tmprl.cloud` so control-plane clients (Cloud Ops API, Terraform, tcld) reach the private endpoint.
26
31
27
32
### Prerequisites
28
33
29
34
These prerequisites are required for using either HTTP or gRPC.
30
35
31
-
-[Temporal Cloud user account](/cloud/get-started)
32
-
-[API Key](/cloud/tcld/apikey#create) for authentication
36
+
- A Temporal Cloud [User](/cloud/manage-access/users) or [Service Account](/cloud/manage-access/service-accounts)
37
+
- An [API Key](/cloud/api-keys#manage-api-keys) for authentication (owned by that User or Service Account)
38
+
39
+
Required [roles and permissions](/cloud/manage-access/roles-and-permissions) vary by operation. Some account-wide management operations require Account Owner or Global Admin. Others work with Developer, Finance Admin, Namespace Admin, or custom roles.
33
40
34
41
### Use cases
35
42
@@ -68,17 +75,17 @@ To start using the Go SDK with the Cloud Ops API, follow these steps:
68
75
69
76
1. Install the Go SDK:
70
77
```go
71
-
go get github.com/temporalio/cloud-sdk-go
78
+
go get go.temporal.io/cloud-sdk@latest
72
79
```
73
80
74
81
2.ImportandusetheSDK:
75
82
```go
76
83
import (
77
-
"github.com/temporalio/cloud-sdk-go/client"
84
+
"go.temporal.io/cloud-sdk/cloudclient"
78
85
)
79
86
```
80
87
81
-
3. The Go SDK provides pre-built client interfaces that handle authentication and connection setup. Refer to the [Go samples](https://github.com/temporalio/cloud-samples-go) for detailed usage examples.
88
+
3. The Go SDK provides pre-built client interfaces that handle authentication and connection setup. Refer to the [Go samples](https://github.com/temporalio/cloud-samples-go) for detailed usage examples, including [Cloud Ops API client setup](https://github.com/temporalio/cloud-samples-go/blob/main/client/api/client.go).
82
89
83
90
The Go SDK eliminates the need to work directly with generated protobuf files and provides a more idiomatic Go experience.
84
91
@@ -88,60 +95,64 @@ For programming languages other than Go, download the gRPC protobufs from the [C
88
95
89
96
Use [gRPC](https://grpc.io/docs/) to compile and generate code in your preferred [programming language](https://grpc.io/docs/#official-support). The steps below use Python as an example and require [Python's gRPC tools](https://grpc.io/docs/languages/python/quickstart/#grpc-tools) to be installed, but the approach can be adapted for other supported programming languages.
90
97
98
+
You can also generate clients from the published Buf module at [buf.build/temporalio/cloud-api](https://buf.build/temporalio/cloud-api).
This approach can be adapted for other programming languages by following their respective import and usage conventions for the generated code files.
126
127
127
128
## Usage guidelines
128
129
129
130
When interacting with the Temporal Cloud Ops API, follow these guidelines:
130
131
131
-
- API version header:
132
-
- Always include the `temporal-cloud-api-version` header in your requests, specifying the API version identifier.
133
-
- The current API version can be found [here](https://github.com/temporalio/cloud-api/blob/main/VERSION#L1C1-L1C14).
134
-
- Connection URL:
135
-
- Connect to the Temporal Cloud using the gRPC URL: `saas-api.tmprl.cloud:443`.
136
-
- Engagement steps:
137
-
- Generate API key:
138
-
- Obtain an [API Key for authentication](/cloud/api-keys#manage-api-keys). Note that many operations may require Admin privileges.
139
-
- Set up client:
140
-
- Establish a secure connection to the Temporal Cloud. Refer to the example [Client setup in Go](https://github.com/temporalio/cloud-samples-go/blob/main/client/temporal/client.go) for guidance.
141
-
- Execute operations:
142
-
- For operation specifics, refer to the `cloudservice/v1/request_response.proto` for gRPC messages and `cloudservice/v1/service.proto` for gRPC services.
143
-
144
-
These steps provide a structured approach to using the Temporal Cloud Ops API effectively, ensuring proper authentication and connection setup.
132
+
### API version header
133
+
134
+
Use the `temporal-cloud-api-version` header to select an API version. The backend uses this version to safely mutate resources. The current API version is in the [`cloud-api` VERSION file](https://github.com/temporalio/cloud-api/blob/main/VERSION).
135
+
136
+
**gRPC**
137
+
138
+
gRPC clients must send a `temporal-cloud-api-version` header on every request.
139
+
140
+
**HTTP**
141
+
142
+
For HTTP clients, the version header is optional. If omitted, the HTTP gateway defaults it to the latest API version. This supports simple `curl` usage without looking up a version first.
143
+
144
+
For production HTTP automation, still pin an explicit version so behavior does not change when the gateway’s latest version advances.
145
+
146
+
### Connection URL
147
+
148
+
- gRPC: `saas-api.tmprl.cloud:443`
149
+
- HTTP: `https://saas-api.tmprl.cloud`
150
+
151
+
### Engagement steps
152
+
153
+
1. Generate an [API Key for authentication](/cloud/api-keys#manage-api-keys). Required permissions vary by operation; see [roles and permissions](/cloud/manage-access/roles-and-permissions).
154
+
2. Establish a secure connection. For Go, see [Cloud Ops API client setup](https://github.com/temporalio/cloud-samples-go/blob/main/client/api/client.go).
155
+
3. Execute operations. For request and response messages, see `cloudservice/v1/request_response.proto`. For services, see `cloudservice/v1/service.proto`.
145
156
146
157
## Rate limits
147
158
@@ -163,9 +174,9 @@ This limit applies to all requests made by each user through any client (tcld, U
163
174
164
175
This limit applies to all requests made by each service account through any client (tcld, Cloud Ops API).
165
176
166
-
**Asynchronous Operations: 10 concurrent operations at a time**
177
+
**Asynchronous operations: 10 concurrent operations at a time**
167
178
168
-
This limits the number of concurrent asynchronous operations that can be in-flight at any given time.
179
+
By default, each account can have up to 10 long-running (asynchronous) mutating operations in flight at once. This limit applies to a subset of create, update, and delete operations (for example Namespace, User, API Key, Export Sink, and Service Account mutations), not every RPC that returns an async operation.
0 commit comments