API References

The Tailor Platform exposes its functionality through APIs defined using Protocol Buffers. Using ConnectRPC, we support both gRPC and HTTP protocols. This guide shows you how to interact with these APIs using different approaches.

Overview

All platform services are exposed through the OperatorService, a unified gRPC API for managing workspaces, applications, and platform components. The .proto files defining these services are available in our GitHub repository.

Using the APIs

You can interact with Tailor Platform APIs using curl by making HTTP requests to the API endpoints.

See Authentication for details on obtaining an access token.

Once authenticated, you can proceed with API requests:

Creating a Workspace

<span><span style="color: var(--shiki-token-function)">curl</span><span style="color: var(--shiki-color-text)"> </span><span style="color: var(--shiki-token-string)">-X</span><span style="color: var(--shiki-color-text)"> </span><span style="color: var(--shiki-token-string)">POST</span><span style="color: var(--shiki-color-text)"> </span><span style="color: var(--shiki-token-string-expression)">&quot;https://api.tailor.tech/tailor.v1.OperatorService/CreateWorkspace&quot;</span><span style="color: var(--shiki-color-text)"> \</span></span>
<span><span style="color: var(--shiki-color-text)">  </span><span style="color: var(--shiki-token-string)">-H</span><span style="color: var(--shiki-color-text)"> </span><span style="color: var(--shiki-token-string-expression)">&quot;Authorization: Bearer YOUR_ACCESS_TOKEN&quot;</span><span style="color: var(--shiki-color-text)"> \</span></span>
<span><span style="color: var(--shiki-color-text)">  </span><span style="color: var(--shiki-token-string)">-H</span><span style="color: var(--shiki-color-text)"> </span><span style="color: var(--shiki-token-string-expression)">&quot;Content-Type: application/json&quot;</span><span style="color: var(--shiki-color-text)"> \</span></span>
<span><span style="color: var(--shiki-color-text)">  </span><span style="color: var(--shiki-token-string)">-d</span><span style="color: var(--shiki-color-text)"> </span><span style="color: var(--shiki-token-string-expression)">&#39;{</span></span>
<span><span style="color: var(--shiki-token-string-expression)">    &quot;workspace_name&quot;: &quot;my-workspace&quot;,</span></span>
<span><span style="color: var(--shiki-token-string-expression)">    &quot;workspace_region&quot;: &quot;us-west&quot;,</span></span>
<span><span style="color: var(--shiki-token-string-expression)">    &quot;organization_id&quot;: &quot;org-123&quot;,</span></span>
<span><span style="color: var(--shiki-token-string-expression)">    &quot;delete_protection&quot;: true</span></span>
<span><span style="color: var(--shiki-token-string-expression)">  }&#39;</span></span>
<span></span>

Using Buf SDKs is simple - just install the SDK for your language directly from our Buf registry.

Go SDK

Install the ConnectRPC Go SDK:

<span><span style="color: var(--shiki-token-function)">go</span><span style="color: var(--shiki-color-text)"> </span><span style="color: var(--shiki-token-string)">get</span><span style="color: var(--shiki-color-text)"> </span><span style="color: var(--shiki-token-string)">buf.build/gen/go/tailor-inc/tailor/connectrpc/go</span></span>
<span></span>

See the full SDK documentation at: https://buf.build/tailor-inc/tailor/sdks/main:connectrpc/go

Node.js SDK

Install the ConnectRPC Node.js SDK:

<span><span style="color: var(--shiki-token-function)">npm</span><span style="color: var(--shiki-color-text)"> </span><span style="color: var(--shiki-token-string)">install</span><span style="color: var(--shiki-color-text)"> </span><span style="color: var(--shiki-token-string)">@buf/tailor-inc_tailor.connectrpc_es</span></span>
<span></span>

Python SDK

Install the ConnectRPC Python SDK:

<span><span style="color: var(--shiki-token-function)">pip</span><span style="color: var(--shiki-color-text)"> </span><span style="color: var(--shiki-token-string)">install</span><span style="color: var(--shiki-color-text)"> </span><span style="color: var(--shiki-token-string)">buf-tailor-inc-tailor-connectrpc</span></span>
<span></span>

For other languages and detailed usage examples, visit our Buf registry.

Authentication

All API calls require authentication using Bearer tokens. Use tailorctl to authenticate:

<span><span style="color: var(--shiki-token-function)">tailorctl</span><span style="color: var(--shiki-color-text)"> </span><span style="color: var(--shiki-token-string)">auth</span><span style="color: var(--shiki-color-text)"> </span><span style="color: var(--shiki-token-string)">login</span></span>
<span><span style="color: var(--shiki-token-function)">tailorctl</span><span style="color: var(--shiki-color-text)"> </span><span style="color: var(--shiki-token-string)">auth</span><span style="color: var(--shiki-color-text)"> </span><span style="color: var(--shiki-token-string)">get</span><span style="color: var(--shiki-color-text)"> </span><span style="color: var(--shiki-token-string)">accessToken</span></span>
<span></span>

See the Auth Guide for detailed authentication setup.

Common Operations

Workspace Management

  • CreateWorkspace - Create a new workspace
  • GetWorkspace - Retrieve workspace details
  • ListWorkspaces - List all accessible workspaces
  • UpdateWorkspace - Modify workspace settings
  • DeleteWorkspace - Remove a workspace

Application Services

  • CreateApplication - Deploy a new application
  • CreateTailorDBService - Set up database services
  • CreatePipelineService - Configure data processing
  • CreateAuthService - Enable authentication
  • CreateExecutorService - Set up job execution

Error Handling

All APIs return standard gRPC status codes. Common error responses include:

  • UNAUTHENTICATED (16) - Invalid or missing authentication
  • PERMISSION_DENIED (7) - Insufficient permissions
  • NOT_FOUND (5) - Resource does not exist
  • ALREADY_EXISTS (6) - Resource already exists
  • INVALID_ARGUMENT (3) - Invalid request parameters

Related Documentation

For implementation details and usage examples, refer to: