Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 30 additions & 17 deletions docs/production-deployment/cloud/operation-api.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -18,38 +18,51 @@ The Temporal Cloud Operations API is in [Public Preview](/evaluate/development-p

:::

The [Temporal Cloud Operations API](https://github.com/temporalio/cloud-api/tree/main) (aka Cloud Ops API) is an open source, public gRPC API for programmatically managing Temporal Cloud control plane resources, including [Namespaces](/cloud/namespaces), [Users](/cloud/users), [Service Accounts](/cloud/service-accounts), [API keys](/cloud/api-keys), and many more.
The Temporal Cloud Operations API, or the Cloud Ops API, is an open source, public [HTTP API](https://saas-api.tmprl.cloud/docs/httpapi.html#description/introduction) and [gRPC API](https://github.com/temporalio/cloud-api/tree/main) for programmatically managing Temporal Cloud control plane resources, including [Namespaces](/cloud/namespaces), [Users](/cloud/users), [Service Accounts](/cloud/service-accounts), [API keys](/cloud/api-keys), and others. The Temporal Cloud [Terraform Provider](/production-deployment/cloud/terraform-provider), [tcld CLI](/cloud/tcld), and Web UI all use the Cloud Ops API.

[Full docs are available on Buf](https://buf.build/temporalio/cloud-api/docs/main:temporal.api.cloud.cloudservice.v1#temporal.api.cloud.cloudservice.v1.CloudService).
## Develop applications with the Cloud Ops API

You can use the provided proto files to generate client libraries in your desired programming language, and then use that client to access the 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`.

The Temporal Cloud [Terraform Provider](/production-deployment/cloud/terraform-provider), [tcld CLI](/cloud/tcld), and Web UI all use the Cloud Ops API.
### Prerequisites

## SDKs and samples
These prerequisites are required for using either HTTP or gRPC.

We provide a [Go SDK](https://github.com/temporalio/cloud-sdk-go) that compiles the proto files into Go bindings, offering a more idiomatic interface for Go developers. This SDK eliminates the need to manually compile protobuf files when working with Go.
- [Temporal Cloud user account](/cloud/get-started)
- [API Key](/cloud/tcld/apikey#create) for authentication

We also provide [Go samples](https://github.com/temporalio/cloud-samples-go) to help you get started with the Cloud Ops API using the Go SDK.
### Use cases

## Develop applications with the Cloud Ops API
Some common reasons you might use the API are to:

### Prerequisites
- Provision Namespaces per environment or tenant via pipelines.
- Bootstrap new projects by creating users, assigning roles, and creating Namespaces via custom scripts.
- Rotate service account keys on a schedule with a job.
- Audit and report access across orgs with scheduled HTTP requests.

- [Temporal Cloud user account](/cloud/get-started)
- [API Key](/cloud/tcld/apikey#create) for authentication
### Using HTTP

[The HTTP API](https://saas-api.tmprl.cloud/docs/httpapi.html#description/introduction) supports the same operations as the [gRPC API](#using-grpc), but it's usable via standard HTTP methods and authentication. This may be a more convenient option if you are writing automation scripts for CI/CD or you can't use gRPC due to network policies, proxies, tooling gaps, or language/runtime constraints. Since it's standard HTTP, it's language agnostic giving you the ability to run cloud operations consistently.

:::note
This *does not* allow interaction with individual Workflows or Activities via HTTP.
:::

### Using gRPC

**For Go developers:**
*For Go developers:*
- Use the [Go SDK](https://github.com/temporalio/cloud-sdk-go) for the simplest setup experience

**For other programming languages:**
*For other programming languages:*
- Basic familiarity with gRPC and Protocol Buffers (protobuf)
- [Protocol Buffers](https://github.com/protocolbuffers/protobuf/releases)
- [gRPC](https://grpc.io/docs/languages/) in your preferred programming language

### Using the Go SDK
You can use the provided proto files to generate client libraries in your desired programming language, and then use that client to access the gRPC API. You can also find the [full gRPC docs on Buf](https://buf.build/temporalio/cloud-api/docs/main:temporal.api.cloud.cloudservice.v1#temporal.api.cloud.cloudservice.v1.CloudService).

#### Using the Go SDK

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.
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.

To start using the Go SDK with the Cloud Ops API, follow these steps:

Expand All @@ -69,7 +82,7 @@ To start using the Go SDK with the Cloud Ops API, follow these steps:

The Go SDK eliminates the need to work directly with generated protobuf files and provides a more idiomatic Go experience.

### Compile the API and use the generated code (For other languages)
#### Compile the API and use the generated code (For other languages)

For programming languages other than Go, download the gRPC protobufs from the [Cloud Ops API repository](https://github.com/temporalio/cloud-api/tree/main/temporal/api/cloud) and compile them manually.

Expand Down Expand Up @@ -105,7 +118,7 @@ Use [gRPC](https://grpc.io/docs/) to compile and generate code in your preferred
- 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:**
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.

Expand Down
10 changes: 5 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -11185,10 +11185,10 @@ snake-case@^3.0.4:
dot-case "^3.0.4"
tslib "^2.0.3"

snipsync@^1.9.0:
version "1.11.0"
resolved "https://registry.npmjs.org/snipsync/-/snipsync-1.11.0.tgz"
integrity sha512-KiYVtRE65/h+sIho7PF4yL++RI0zro3mTCJwxHPM6Lvz92Sq3uvtIFyqKea8u7eDgPzoiJz+61wG27taW4D/gg==
snipsync@^1.12.0:
version "1.12.0"
resolved "https://registry.yarnpkg.com/snipsync/-/snipsync-1.12.0.tgz#8134d51e9b150ad6c48560857dd9526b95f7eb78"
integrity sha512-UHvct6DAVjCu2y+5/tSNKIbdGoANlpUICQD+QDXyGUuX9nH6QcepRinNoCDDnaBYTvLcs7qDozp+nw0WY4E2DA==
dependencies:
"@octokit/rest" "^18.12.0"
anzip "^0.2.0"
Expand Down Expand Up @@ -12891,4 +12891,4 @@ yocto-queue@^1.0.0:
zwitch@^2.0.0:
version "2.0.4"
resolved "https://registry.npmjs.org/zwitch/-/zwitch-2.0.4.tgz"
integrity sha512-bXE4cR/kVZhKZX/RjPEflHaKVhUVl85noU3v6b8apfQEc1x4A+zBxjZ4lN8LqGd6WZ3dl98pY4o717VFmoPp+A==
integrity sha512-bXE4cR/kVZhKZX/RjPEflHaKVhUVl85noU3v6b8apfQEc1x4A+zBxjZ4lN8LqGd6WZ3dl98pY4o717VFmoPp+A==