From edd06d240c931f5ab47eef7613582a5d71421e88 Mon Sep 17 00:00:00 2001 From: Lutao Xie Date: Thu, 16 Jul 2026 12:15:01 -0400 Subject: [PATCH 1/2] Fix Cloud Ops API docs accuracy for SDK, version header, and auth Correct Go module/import paths, split gRPC vs HTTP version-header requirements, fix the Ops API sample link, and clarify prerequisites, roles, protobuf generation, PrivateLink DNS, and async concurrency limits. Co-authored-by: Cursor --- docs/cloud/operation-api.mdx | 99 +++++++++++++++++++++--------------- 1 file changed, 57 insertions(+), 42 deletions(-) diff --git a/docs/cloud/operation-api.mdx b/docs/cloud/operation-api.mdx index d991f8ff22..19f881c619 100644 --- a/docs/cloud/operation-api.mdx +++ b/docs/cloud/operation-api.mdx @@ -22,14 +22,21 @@ The Temporal Cloud Operations API, or the Cloud Ops API, is an open source, publ ## Develop applications with the Cloud Ops API -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`. +You can use the HTTP API or the gRPC API depending on how you need to integrate with your platform. + +- HTTP: `https://saas-api.tmprl.cloud` +- gRPC: `saas-api.tmprl.cloud:443` + +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. ### Prerequisites These prerequisites are required for using either HTTP or gRPC. -- [Temporal Cloud user account](/cloud/get-started) -- [API Key](/cloud/tcld/apikey#create) for authentication +- A Temporal Cloud [User](/cloud/manage-access/users) or [Service Account](/cloud/manage-access/service-accounts) +- An [API Key](/cloud/api-keys#manage-api-keys) for authentication (owned by that User or Service Account) + +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. ### Use cases @@ -64,21 +71,25 @@ You can use the provided proto files to generate client libraries in your desire If you're developing in Go, we recommend using the [Go SDK](https://github.com/temporalio/cloud-sdk-go) which provides pre-compiled Go bindings and a more idiomatic interface. The Go SDK handles all the protobuf compilation and provides ready-to-use Go types and client interfaces. You can also use the [Go samples](https://github.com/temporalio/cloud-samples-go) to help you get started with the Cloud Ops API using the Go SDK. +:::note +The Cloud Ops Go SDK is currently experimental. Prefer pinning a version and reviewing release notes before upgrading. +::: + To start using the Go SDK with the Cloud Ops API, follow these steps: 1. Install the Go SDK: ```go - go get github.com/temporalio/cloud-sdk-go + go get go.temporal.io/cloud-sdk@latest ``` 2. Import and use the SDK: ```go import ( - "github.com/temporalio/cloud-sdk-go/client" + "go.temporal.io/cloud-sdk/cloudclient" ) ``` -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. +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). The Go SDK eliminates the need to work directly with generated protobuf files and provides a more idiomatic Go experience. @@ -88,6 +99,8 @@ For programming languages other than Go, download the gRPC protobufs from the [C 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. +You can also generate clients from the published Buf module at [buf.build/temporalio/cloud-api](https://buf.build/temporalio/cloud-api). + 1. Clone the Temporal Cloud API repository: ```command @@ -95,32 +108,24 @@ Use [gRPC](https://grpc.io/docs/) to compile and generate code in your preferred cd cloud-api ``` -2. Copy Protobuf files: - - - Navigate to the `temporal` directory. - - Copy the protobuf files to your project directory. - -3. Compile the Protobuf files: +2. Compile the Protobuf files from the repository root (protos live under `temporal/` and import each other): - ```python - python -m grpc_tools.protoc -I./ --python_out=./ --grpc_python_out=./ *.proto + ```command + python -m grpc_tools.protoc \ + -I. \ + --python_out=. \ + --grpc_python_out=. \ + $(find temporal -name '*.proto') ``` - - `-I` specifies the directory of the `.proto` files. - - `--python_out=` sets the output directory for generated Python classes. - - `--grpc_python_out=` sets the output directory for generated gRPC service classes. - - `*.proto` processes all `.proto` files. + + - `-I.` adds the repository root to the import path. + - `--python_out=` and `--grpc_python_out=` set the output directories for generated classes. + - `find temporal -name '*.proto'` includes all Cloud Ops API protos and their dependencies under `temporal/`. After compiling the Protobuf files, you will have generated code files in your project directory. These files enable interaction with the Temporal Cloud API in your chosen programming language. -4. Import the Generated Files: - - - Locate the Python files (.py) generated in your project directory. - - Import these files into your Python application where you intend to interact with the Temporal Cloud API. - -2. Use the API: - - Use the classes and methods defined in the imported files to communicate with the Temporal Cloud services. - - Ensure to handle any required authentication or configuration as needed for Temporal Cloud. +3. Import the generated files into your application and call the Cloud Ops API. Handle authentication with an API key and set the API version header as described in [Usage guidelines](#usage-guidelines). This approach can be adapted for other programming languages by following their respective import and usage conventions for the generated code files. @@ -128,20 +133,30 @@ This approach can be adapted for other programming languages by following their When interacting with the Temporal Cloud Ops API, follow these guidelines: -- API version header: - - Always include the `temporal-cloud-api-version` header in your requests, specifying the API version identifier. - - The current API version can be found [here](https://github.com/temporalio/cloud-api/blob/main/VERSION#L1C1-L1C14). -- Connection URL: - - Connect to the Temporal Cloud using the gRPC URL: `saas-api.tmprl.cloud:443`. -- Engagement steps: - - Generate API key: - - Obtain an [API Key for authentication](/cloud/api-keys#manage-api-keys). Note that many operations may require Admin privileges. - - Set up client: - - 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. - - Execute operations: - - For operation specifics, refer to the `cloudservice/v1/request_response.proto` for gRPC messages and `cloudservice/v1/service.proto` for gRPC services. - -These steps provide a structured approach to using the Temporal Cloud Ops API effectively, ensuring proper authentication and connection setup. +### API version header + +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). + +**gRPC** + +gRPC clients must send a `temporal-cloud-api-version` header on every request. + +**HTTP** + +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. + +For production HTTP automation, still pin an explicit version so behavior does not change when the gateway’s latest version advances. + +### Connection URL + +- gRPC: `saas-api.tmprl.cloud:443` +- HTTP: `https://saas-api.tmprl.cloud` + +### Engagement steps + +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). +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). +3. Execute operations. For request and response messages, see `cloudservice/v1/request_response.proto`. For services, see `cloudservice/v1/service.proto`. ## Rate limits @@ -163,9 +178,9 @@ This limit applies to all requests made by each user through any client (tcld, U This limit applies to all requests made by each service account through any client (tcld, Cloud Ops API). -**Asynchronous Operations: 10 concurrent operations at a time** +**Asynchronous operations: 10 concurrent operations at a time** -This limits the number of concurrent asynchronous operations that can be in-flight at any given time. +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. ### Important considerations From b25abd5fe4ca5fc6e3f71184a02c31069726ed40 Mon Sep 17 00:00:00 2001 From: Lutao Xie Date: Thu, 16 Jul 2026 12:23:51 -0400 Subject: [PATCH 2/2] Remove experimental callout from Cloud Ops Go SDK section Co-authored-by: Cursor --- docs/cloud/operation-api.mdx | 4 ---- 1 file changed, 4 deletions(-) diff --git a/docs/cloud/operation-api.mdx b/docs/cloud/operation-api.mdx index 19f881c619..9c2f8c83c5 100644 --- a/docs/cloud/operation-api.mdx +++ b/docs/cloud/operation-api.mdx @@ -71,10 +71,6 @@ You can use the provided proto files to generate client libraries in your desire If you're developing in Go, we recommend using the [Go SDK](https://github.com/temporalio/cloud-sdk-go) which provides pre-compiled Go bindings and a more idiomatic interface. The Go SDK handles all the protobuf compilation and provides ready-to-use Go types and client interfaces. You can also use the [Go samples](https://github.com/temporalio/cloud-samples-go) to help you get started with the Cloud Ops API using the Go SDK. -:::note -The Cloud Ops Go SDK is currently experimental. Prefer pinning a version and reviewing release notes before upgrading. -::: - To start using the Go SDK with the Cloud Ops API, follow these steps: 1. Install the Go SDK: