# Projects

## List projects accessible to the authenticated caller

**get** `/projects`

Returns the projects the caller can access. PAT callers see only the
project their PAT is scoped to; OAuth user callers see all projects
they belong to.

### Returns

- `id: string`

  The unique identifier for the project.

- `name: string`

  The name of the project.

### Example

```http
curl https://console.cloud.tigerdata.com/public/api/v1/projects \
    -H "Authorization: Bearer $TIGER_CLOUD_API_KEY"
```

#### Response

```json
[
  {
    "id": "rp1pz7uyae",
    "name": "My Production Project"
  }
]
```

## Domain Types

### Project Get Response

- `ProjectGetResponse = array of object { id, name }`

  - `id: string`

    The unique identifier for the project.

  - `name: string`

    The name of the project.

# Vpcs

## List All VPCs

**get** `/projects/{project_id}/vpcs`

Retrieves a list of all Virtual Private Clouds (VPCs).

### Path Parameters

- `project_id: string`

### Returns

- `id: string`

  The unique identifier for the VPC.

- `cidr: string`

  The IPv4 CIDR block for the VPC, in address/prefix notation (e.g. 10.0.0.0/16).

- `created: string`

  Creation timestamp.

- `name: string`

  The name of the VPC.

- `region_code: string`

  The cloud region where the VPC is hosted.

- `status: "CREATING" or "CREATED" or "DELETING" or 3 more`

  The current status of the VPC:

  - CREATING: the VPC is being provisioned
  - CREATED: the VPC is provisioned and ready
  - DELETING: the VPC is being deleted
  - DELETED: the VPC has been deleted
  - ERROR: the VPC is in an error state
  - UNKNOWN: an unrecognized state

  - `"CREATING"`

  - `"CREATED"`

  - `"DELETING"`

  - `"DELETED"`

  - `"ERROR"`

  - `"UNKNOWN"`

- `provisioned_id: optional string`

  The provider-assigned identifier for the provisioned VPC. Absent until provisioning completes.

### Example

```http
curl https://console.cloud.tigerdata.com/public/api/v1/projects/$PROJECT_ID/vpcs \
    -H "Authorization: Bearer $TIGER_CLOUD_API_KEY"
```

#### Response

```json
[
  {
    "id": "1234567890",
    "cidr": "10.0.0.0/16",
    "created": "2025-01-15T09:30:00Z",
    "name": "my-production-vpc",
    "region_code": "us-east-1",
    "status": "CREATED",
    "provisioned_id": "vpc-0123456789abcdef0"
  }
]
```

## Create a VPC

**post** `/projects/{project_id}/vpcs`

Creates a new Virtual Private Cloud (VPC). This is an asynchronous operation.

### Path Parameters

- `project_id: string`

### Body Parameters

- `cidr: string`

  The IPv4 CIDR block for the VPC, in address/prefix notation (e.g. 10.0.0.0/16).

- `name: string`

  The name of the VPC.

- `region_code: string`

  The cloud region where the VPC will be created.

### Returns

- `Vpc object { id, cidr, created, 4 more }`

  A virtual private cloud that services can be attached to.

  - `id: string`

    The unique identifier for the VPC.

  - `cidr: string`

    The IPv4 CIDR block for the VPC, in address/prefix notation (e.g. 10.0.0.0/16).

  - `created: string`

    Creation timestamp.

  - `name: string`

    The name of the VPC.

  - `region_code: string`

    The cloud region where the VPC is hosted.

  - `status: "CREATING" or "CREATED" or "DELETING" or 3 more`

    The current status of the VPC:

    - CREATING: the VPC is being provisioned
    - CREATED: the VPC is provisioned and ready
    - DELETING: the VPC is being deleted
    - DELETED: the VPC has been deleted
    - ERROR: the VPC is in an error state
    - UNKNOWN: an unrecognized state

    - `"CREATING"`

    - `"CREATED"`

    - `"DELETING"`

    - `"DELETED"`

    - `"ERROR"`

    - `"UNKNOWN"`

  - `provisioned_id: optional string`

    The provider-assigned identifier for the provisioned VPC. Absent until provisioning completes.

### Example

```http
curl https://console.cloud.tigerdata.com/public/api/v1/projects/$PROJECT_ID/vpcs \
    -H 'Content-Type: application/json' \
    -H "Authorization: Bearer $TIGER_CLOUD_API_KEY" \
    -d '{
          "cidr": "10.0.0.0/16",
          "name": "my-production-vpc",
          "region_code": "us-east-1"
        }'
```

#### Response

```json
{
  "id": "1234567890",
  "cidr": "10.0.0.0/16",
  "created": "2025-01-15T09:30:00Z",
  "name": "my-production-vpc",
  "region_code": "us-east-1",
  "status": "CREATED",
  "provisioned_id": "vpc-0123456789abcdef0"
}
```

## Get a VPC

**get** `/projects/{project_id}/vpcs/{vpc_id}`

Retrieves the details of a specific VPC by its ID.

### Path Parameters

- `project_id: string`

- `vpc_id: string`

### Returns

- `Vpc object { id, cidr, created, 4 more }`

  A virtual private cloud that services can be attached to.

  - `id: string`

    The unique identifier for the VPC.

  - `cidr: string`

    The IPv4 CIDR block for the VPC, in address/prefix notation (e.g. 10.0.0.0/16).

  - `created: string`

    Creation timestamp.

  - `name: string`

    The name of the VPC.

  - `region_code: string`

    The cloud region where the VPC is hosted.

  - `status: "CREATING" or "CREATED" or "DELETING" or 3 more`

    The current status of the VPC:

    - CREATING: the VPC is being provisioned
    - CREATED: the VPC is provisioned and ready
    - DELETING: the VPC is being deleted
    - DELETED: the VPC has been deleted
    - ERROR: the VPC is in an error state
    - UNKNOWN: an unrecognized state

    - `"CREATING"`

    - `"CREATED"`

    - `"DELETING"`

    - `"DELETED"`

    - `"ERROR"`

    - `"UNKNOWN"`

  - `provisioned_id: optional string`

    The provider-assigned identifier for the provisioned VPC. Absent until provisioning completes.

### Example

```http
curl https://console.cloud.tigerdata.com/public/api/v1/projects/$PROJECT_ID/vpcs/$VPC_ID \
    -H "Authorization: Bearer $TIGER_CLOUD_API_KEY"
```

#### Response

```json
{
  "id": "1234567890",
  "cidr": "10.0.0.0/16",
  "created": "2025-01-15T09:30:00Z",
  "name": "my-production-vpc",
  "region_code": "us-east-1",
  "status": "CREATED",
  "provisioned_id": "vpc-0123456789abcdef0"
}
```

## Delete a VPC

**delete** `/projects/{project_id}/vpcs/{vpc_id}`

Deletes a specific VPC. This is an asynchronous operation.

### Path Parameters

- `project_id: string`

- `vpc_id: string`

### Example

```http
curl https://console.cloud.tigerdata.com/public/api/v1/projects/$PROJECT_ID/vpcs/$VPC_ID \
    -X DELETE \
    -H "Authorization: Bearer $TIGER_CLOUD_API_KEY"
```

## Rename a VPC

**post** `/projects/{project_id}/vpcs/{vpc_id}/rename`

Updates the name of a specific VPC.

### Path Parameters

- `project_id: string`

- `vpc_id: string`

### Body Parameters

- `name: string`

  The new name for the VPC.

### Returns

- `message: optional string`

### Example

```http
curl https://console.cloud.tigerdata.com/public/api/v1/projects/$PROJECT_ID/vpcs/$VPC_ID/rename \
    -H 'Content-Type: application/json' \
    -H "Authorization: Bearer $TIGER_CLOUD_API_KEY" \
    -d '{
          "name": "my-renamed-vpc"
        }'
```

#### Response

```json
{
  "message": "Action completed successfully."
}
```

## Domain Types

### Vpc

- `Vpc object { id, cidr, created, 4 more }`

  A virtual private cloud that services can be attached to.

  - `id: string`

    The unique identifier for the VPC.

  - `cidr: string`

    The IPv4 CIDR block for the VPC, in address/prefix notation (e.g. 10.0.0.0/16).

  - `created: string`

    Creation timestamp.

  - `name: string`

    The name of the VPC.

  - `region_code: string`

    The cloud region where the VPC is hosted.

  - `status: "CREATING" or "CREATED" or "DELETING" or 3 more`

    The current status of the VPC:

    - CREATING: the VPC is being provisioned
    - CREATED: the VPC is provisioned and ready
    - DELETING: the VPC is being deleted
    - DELETED: the VPC has been deleted
    - ERROR: the VPC is in an error state
    - UNKNOWN: an unrecognized state

    - `"CREATING"`

    - `"CREATED"`

    - `"DELETING"`

    - `"DELETED"`

    - `"ERROR"`

    - `"UNKNOWN"`

  - `provisioned_id: optional string`

    The provider-assigned identifier for the provisioned VPC. Absent until provisioning completes.

### Vpc List Response

- `VpcListResponse = array of Vpc`

  - `id: string`

    The unique identifier for the VPC.

  - `cidr: string`

    The IPv4 CIDR block for the VPC, in address/prefix notation (e.g. 10.0.0.0/16).

  - `created: string`

    Creation timestamp.

  - `name: string`

    The name of the VPC.

  - `region_code: string`

    The cloud region where the VPC is hosted.

  - `status: "CREATING" or "CREATED" or "DELETING" or 3 more`

    The current status of the VPC:

    - CREATING: the VPC is being provisioned
    - CREATED: the VPC is provisioned and ready
    - DELETING: the VPC is being deleted
    - DELETED: the VPC has been deleted
    - ERROR: the VPC is in an error state
    - UNKNOWN: an unrecognized state

    - `"CREATING"`

    - `"CREATED"`

    - `"DELETING"`

    - `"DELETED"`

    - `"ERROR"`

    - `"UNKNOWN"`

  - `provisioned_id: optional string`

    The provider-assigned identifier for the provisioned VPC. Absent until provisioning completes.

### Vpc Rename Response

- `VpcRenameResponse object { message }`

  - `message: optional string`

# Peerings

## List VPC Peerings

**get** `/projects/{project_id}/vpcs/{vpc_id}/peerings`

Retrieves a list of all VPC peering connections for a given VPC.

### Path Parameters

- `project_id: string`

- `vpc_id: string`

### Returns

- `id: string`

  The unique identifier for the peering connection.

- `peer_account_id: string`

  The cloud account ID of the peer VPC.

- `peer_region_code: string`

  The cloud region of the peer VPC.

- `peer_vpc_id: string`

  The ID of the peer VPC.

- `status: "PENDING" or "TIMEOUT" or "APPROVED" or 5 more`

  The current status of a VPC peering connection:

  - PENDING: the peering request has been made and is awaiting action
  - TIMEOUT: the peering request timed out before being resolved
  - APPROVED: the peering request has been approved
  - ACTIVE: the peering connection is active
  - DISABLED: the peering connection has been disabled
  - DELETING: the peering connection is being deleted
  - INVALID: the peering request is invalid
  - UNKNOWN: an unrecognized state

  - `"PENDING"`

  - `"TIMEOUT"`

  - `"APPROVED"`

  - `"ACTIVE"`

  - `"DISABLED"`

  - `"DELETING"`

  - `"INVALID"`

  - `"UNKNOWN"`

- `created: optional string`

  Creation timestamp.

- `error_message: optional string`

  A human-readable error message when the peering connection failed.

- `provisioned_id: optional string`

  The provider-assigned identifier for the provisioned peering.

### Example

```http
curl https://console.cloud.tigerdata.com/public/api/v1/projects/$PROJECT_ID/vpcs/$VPC_ID/peerings \
    -H "Authorization: Bearer $TIGER_CLOUD_API_KEY"
```

#### Response

```json
[
  {
    "id": "1234567890",
    "peer_account_id": "acc-12345",
    "peer_region_code": "us-east-1",
    "peer_vpc_id": "1234567890",
    "status": "ACTIVE",
    "created": "2025-01-15T09:30:00Z",
    "error_message": "VPC not found",
    "provisioned_id": "pcx-0123456789abcdef0"
  }
]
```

## Create a VPC Peering

**post** `/projects/{project_id}/vpcs/{vpc_id}/peerings`

Creates a new VPC peering connection. This is an asynchronous operation.

### Path Parameters

- `project_id: string`

- `vpc_id: string`

### Body Parameters

- `peer_account_id: string`

  The cloud account ID of the peer VPC.

- `peer_region_code: string`

  The cloud region of the peer VPC.

- `peer_vpc_id: string`

  The ID of the peer VPC.

### Returns

- `Peering object { id, peer_account_id, peer_region_code, 5 more }`

  A VPC peering connection to an external cloud account.

  - `id: string`

    The unique identifier for the peering connection.

  - `peer_account_id: string`

    The cloud account ID of the peer VPC.

  - `peer_region_code: string`

    The cloud region of the peer VPC.

  - `peer_vpc_id: string`

    The ID of the peer VPC.

  - `status: "PENDING" or "TIMEOUT" or "APPROVED" or 5 more`

    The current status of a VPC peering connection:

    - PENDING: the peering request has been made and is awaiting action
    - TIMEOUT: the peering request timed out before being resolved
    - APPROVED: the peering request has been approved
    - ACTIVE: the peering connection is active
    - DISABLED: the peering connection has been disabled
    - DELETING: the peering connection is being deleted
    - INVALID: the peering request is invalid
    - UNKNOWN: an unrecognized state

    - `"PENDING"`

    - `"TIMEOUT"`

    - `"APPROVED"`

    - `"ACTIVE"`

    - `"DISABLED"`

    - `"DELETING"`

    - `"INVALID"`

    - `"UNKNOWN"`

  - `created: optional string`

    Creation timestamp.

  - `error_message: optional string`

    A human-readable error message when the peering connection failed.

  - `provisioned_id: optional string`

    The provider-assigned identifier for the provisioned peering.

### Example

```http
curl https://console.cloud.tigerdata.com/public/api/v1/projects/$PROJECT_ID/vpcs/$VPC_ID/peerings \
    -H 'Content-Type: application/json' \
    -H "Authorization: Bearer $TIGER_CLOUD_API_KEY" \
    -d '{
          "peer_account_id": "acc-12345",
          "peer_region_code": "us-east-1",
          "peer_vpc_id": "1234567890"
        }'
```

#### Response

```json
{
  "id": "1234567890",
  "peer_account_id": "acc-12345",
  "peer_region_code": "us-east-1",
  "peer_vpc_id": "1234567890",
  "status": "ACTIVE",
  "created": "2025-01-15T09:30:00Z",
  "error_message": "VPC not found",
  "provisioned_id": "pcx-0123456789abcdef0"
}
```

## Get a VPC Peering

**get** `/projects/{project_id}/vpcs/{vpc_id}/peerings/{peering_id}`

Retrieves the details of a specific VPC peering connection.

### Path Parameters

- `project_id: string`

- `vpc_id: string`

- `peering_id: string`

### Returns

- `Peering object { id, peer_account_id, peer_region_code, 5 more }`

  A VPC peering connection to an external cloud account.

  - `id: string`

    The unique identifier for the peering connection.

  - `peer_account_id: string`

    The cloud account ID of the peer VPC.

  - `peer_region_code: string`

    The cloud region of the peer VPC.

  - `peer_vpc_id: string`

    The ID of the peer VPC.

  - `status: "PENDING" or "TIMEOUT" or "APPROVED" or 5 more`

    The current status of a VPC peering connection:

    - PENDING: the peering request has been made and is awaiting action
    - TIMEOUT: the peering request timed out before being resolved
    - APPROVED: the peering request has been approved
    - ACTIVE: the peering connection is active
    - DISABLED: the peering connection has been disabled
    - DELETING: the peering connection is being deleted
    - INVALID: the peering request is invalid
    - UNKNOWN: an unrecognized state

    - `"PENDING"`

    - `"TIMEOUT"`

    - `"APPROVED"`

    - `"ACTIVE"`

    - `"DISABLED"`

    - `"DELETING"`

    - `"INVALID"`

    - `"UNKNOWN"`

  - `created: optional string`

    Creation timestamp.

  - `error_message: optional string`

    A human-readable error message when the peering connection failed.

  - `provisioned_id: optional string`

    The provider-assigned identifier for the provisioned peering.

### Example

```http
curl https://console.cloud.tigerdata.com/public/api/v1/projects/$PROJECT_ID/vpcs/$VPC_ID/peerings/$PEERING_ID \
    -H "Authorization: Bearer $TIGER_CLOUD_API_KEY"
```

#### Response

```json
{
  "id": "1234567890",
  "peer_account_id": "acc-12345",
  "peer_region_code": "us-east-1",
  "peer_vpc_id": "1234567890",
  "status": "ACTIVE",
  "created": "2025-01-15T09:30:00Z",
  "error_message": "VPC not found",
  "provisioned_id": "pcx-0123456789abcdef0"
}
```

## Delete a VPC Peering

**delete** `/projects/{project_id}/vpcs/{vpc_id}/peerings/{peering_id}`

Deletes a specific VPC peering connection. This is an asynchronous operation.

### Path Parameters

- `project_id: string`

- `vpc_id: string`

- `peering_id: string`

### Example

```http
curl https://console.cloud.tigerdata.com/public/api/v1/projects/$PROJECT_ID/vpcs/$VPC_ID/peerings/$PEERING_ID \
    -X DELETE \
    -H "Authorization: Bearer $TIGER_CLOUD_API_KEY"
```

## Domain Types

### Peering

- `Peering object { id, peer_account_id, peer_region_code, 5 more }`

  A VPC peering connection to an external cloud account.

  - `id: string`

    The unique identifier for the peering connection.

  - `peer_account_id: string`

    The cloud account ID of the peer VPC.

  - `peer_region_code: string`

    The cloud region of the peer VPC.

  - `peer_vpc_id: string`

    The ID of the peer VPC.

  - `status: "PENDING" or "TIMEOUT" or "APPROVED" or 5 more`

    The current status of a VPC peering connection:

    - PENDING: the peering request has been made and is awaiting action
    - TIMEOUT: the peering request timed out before being resolved
    - APPROVED: the peering request has been approved
    - ACTIVE: the peering connection is active
    - DISABLED: the peering connection has been disabled
    - DELETING: the peering connection is being deleted
    - INVALID: the peering request is invalid
    - UNKNOWN: an unrecognized state

    - `"PENDING"`

    - `"TIMEOUT"`

    - `"APPROVED"`

    - `"ACTIVE"`

    - `"DISABLED"`

    - `"DELETING"`

    - `"INVALID"`

    - `"UNKNOWN"`

  - `created: optional string`

    Creation timestamp.

  - `error_message: optional string`

    A human-readable error message when the peering connection failed.

  - `provisioned_id: optional string`

    The provider-assigned identifier for the provisioned peering.

### Peering List Response

- `PeeringListResponse = array of Peering`

  - `id: string`

    The unique identifier for the peering connection.

  - `peer_account_id: string`

    The cloud account ID of the peer VPC.

  - `peer_region_code: string`

    The cloud region of the peer VPC.

  - `peer_vpc_id: string`

    The ID of the peer VPC.

  - `status: "PENDING" or "TIMEOUT" or "APPROVED" or 5 more`

    The current status of a VPC peering connection:

    - PENDING: the peering request has been made and is awaiting action
    - TIMEOUT: the peering request timed out before being resolved
    - APPROVED: the peering request has been approved
    - ACTIVE: the peering connection is active
    - DISABLED: the peering connection has been disabled
    - DELETING: the peering connection is being deleted
    - INVALID: the peering request is invalid
    - UNKNOWN: an unrecognized state

    - `"PENDING"`

    - `"TIMEOUT"`

    - `"APPROVED"`

    - `"ACTIVE"`

    - `"DISABLED"`

    - `"DELETING"`

    - `"INVALID"`

    - `"UNKNOWN"`

  - `created: optional string`

    Creation timestamp.

  - `error_message: optional string`

    A human-readable error message when the peering connection failed.

  - `provisioned_id: optional string`

    The provider-assigned identifier for the provisioned peering.

# Services

## List All Services

**get** `/projects/{project_id}/services`

Retrieves a list of all services within a specific project.

### Path Parameters

- `project_id: string`

### Returns

- `created: string`

  Creation timestamp.

- `name: string`

  The name of the service.

- `project_id: string`

  The project this service belongs to.

- `region_code: string`

  The cloud region where the service is hosted.

- `resources: array of object { id, spec }`

  List of resources allocated to the service.

  - `id: optional string`

    Resource identifier.

  - `spec: optional object { cpu_millis, memory_gbs, volume_type }`

    Resource specification.

    - `cpu_millis: optional number`

      CPU allocation in millicores.

    - `memory_gbs: optional number`

      Memory allocation in gigabytes.

    - `volume_type: optional string`

      Type of storage volume.

- `service_id: string`

  The unique identifier for the service.

- `service_type: "TIMESCALEDB" or "POSTGRES" or "VECTOR"`

  The type of the service:

  - TIMESCALEDB: a TimescaleDB service (PostgreSQL with the TimescaleDB extension)
  - POSTGRES: a standard PostgreSQL service

  VECTOR is deprecated and should not be used.

  - `"TIMESCALEDB"`

  - `"POSTGRES"`

  - `"VECTOR"`

- `status: "QUEUED" or "DELETING" or "CONFIGURING" or 8 more`

  The current deployment status of the service:

  - QUEUED: the create request has been submitted and is queued
  - DELETING: the service is being deleted
  - CONFIGURING: the service is up but still completing configuration
  - READY: fully configured and serving traffic
  - DELETED: the service has been deleted
  - UNSTABLE: the service was ready but is not currently reachable
  - PAUSING: the service is being paused
  - PAUSED: the service is paused (temporarily shut down)
  - RESUMING: the service is resuming after being paused
  - UPGRADING: the service is being updated

  OPTIMIZING is deprecated and should not be used.

  - `"QUEUED"`

  - `"DELETING"`

  - `"CONFIGURING"`

  - `"READY"`

  - `"DELETED"`

  - `"UNSTABLE"`

  - `"PAUSING"`

  - `"PAUSED"`

  - `"RESUMING"`

  - `"UPGRADING"`

  - `"OPTIMIZING"`

- `connection_pooler: optional ConnectionPooler`

  Connection pooler configuration for a service.

  - `endpoint: optional Endpoint`

    A network endpoint for connecting to a service.

    - `host: optional string`

      The hostname of the endpoint.

    - `port: optional number`

      The port of the endpoint.

- `data_tiering: optional object { enabled }`

  Data tiering configuration for a service.

  - `enabled: optional boolean`

    Whether tiered storage is enabled for this service.

- `endpoint: optional Endpoint`

  A network endpoint for connecting to a service.

- `forked_from: optional object { is_standby, project_id, service_id }`

  The service this service was forked from.

  - `is_standby: optional boolean`

    Whether this service is a standby of the parent service.

  - `project_id: optional string`

    The project of the parent service.

  - `service_id: optional string`

    The ID of the parent service.

- `ha_replicas: optional object { replica_count, sync_replica_count }`

  High-availability replica configuration for a service.

  - `replica_count: optional number`

    Number of high-availability replicas (all replicas are asynchronous by default).

  - `sync_replica_count: optional number`

    Number of synchronous high-availability replicas.

- `initial_password: optional string`

  The initial password for the service.

- `metadata: optional object { environment }`

  Additional metadata for the service.

  - `environment: optional string`

    Environment tag for the service.

- `metrics: optional object { cpu_millicores, memory_mb, milli_cpu, storage_mb }`

  Resource usage metrics for the service.

  - `cpu_millicores: optional number`

    CPU usage in millicores.

  - `memory_mb: optional number`

    Memory usage in megabytes.

  - `milli_cpu: optional number`

    Deprecated. Use `cpu_millicores` instead.

  - `storage_mb: optional number`

    Storage usage in megabytes.

- `read_replica_sets: optional array of ReadReplicaSet`

  The read replica sets attached to the service.

  - `id: string`

    The unique identifier for the read replica set.

  - `cpu_millis: number`

    CPU allocation in milli-cores.

  - `memory_gbs: number`

    Memory allocation in gigabytes.

  - `name: string`

    The name of the read replica set.

  - `nodes: number`

    Number of nodes in the replica set.

  - `service_id: string`

    The ID of the parent service this read replica set was created from.

  - `status: "creating" or "active" or "resizing" or 2 more`

    The current status of the read replica set:

    - creating: the replica set is being provisioned
    - active: the replica set is provisioned and serving traffic
    - resizing: the replica set is being resized
    - deleting: the replica set is being deleted
    - error: the replica set is in an error state

    - `"creating"`

    - `"active"`

    - `"resizing"`

    - `"deleting"`

    - `"error"`

  - `connection_pooler: optional ConnectionPooler`

    Connection pooler configuration for a service.

  - `endpoint: optional Endpoint`

    A network endpoint for connecting to a service.

  - `metadata: optional object { environment }`

    Additional metadata for the read replica set.

    - `environment: optional string`

      Environment tag for the read replica set.

- `vpc_endpoint: optional object { host, port, vpc_id }`

  VPC endpoint configuration for connecting to a service over VPC peering.

  - `host: optional string`

    The hostname for connecting to the service over VPC peering.

  - `port: optional number`

    The port for connecting to the service over VPC peering.

  - `vpc_id: optional string`

    The ID of the VPC the endpoint is associated with.

- `vpcEndpoint: optional object { host, port, vpc_id }`

  VPC endpoint configuration for connecting to a service over VPC peering.

  - `host: optional string`

    The hostname for connecting to the service over VPC peering.

  - `port: optional number`

    The port for connecting to the service over VPC peering.

  - `vpc_id: optional string`

    The ID of the VPC the endpoint is associated with.

### Example

```http
curl https://console.cloud.tigerdata.com/public/api/v1/projects/$PROJECT_ID/services \
    -H "Authorization: Bearer $TIGER_CLOUD_API_KEY"
```

#### Response

```json
[
  {
    "created": "2025-01-15T09:30:00Z",
    "name": "my-production-db",
    "project_id": "rp1pz7uyae",
    "region_code": "us-east-1",
    "resources": [
      {
        "id": "n4ph2tqz8r",
        "spec": {
          "cpu_millis": 1000,
          "memory_gbs": 4,
          "volume_type": "gp3"
        }
      }
    ],
    "service_id": "kd9w2xp4mz",
    "service_type": "TIMESCALEDB",
    "status": "QUEUED",
    "connection_pooler": {
      "endpoint": {
        "host": "i4wmp4crev.oec7sxsza2.tsdb.cloud.timescale.com",
        "port": 32625
      }
    },
    "data_tiering": {
      "enabled": false
    },
    "endpoint": {
      "host": "i4wmp4crev.oec7sxsza2.tsdb.cloud.timescale.com",
      "port": 32625
    },
    "forked_from": {
      "is_standby": false,
      "project_id": "rp1pz7uyae",
      "service_id": "kd9w2xp4mz"
    },
    "ha_replicas": {
      "replica_count": 1,
      "sync_replica_count": 1
    },
    "initial_password": "a-very-secure-initial-password",
    "metadata": {
      "environment": "PROD"
    },
    "metrics": {
      "cpu_millicores": 250,
      "memory_mb": 512,
      "milli_cpu": 250,
      "storage_mb": 1024
    },
    "read_replica_sets": [
      {
        "id": "alb8jicdpr",
        "cpu_millis": 250,
        "memory_gbs": 1,
        "name": "reporting-replica-1",
        "nodes": 2,
        "service_id": "d1k5vk7hf2",
        "status": "active",
        "connection_pooler": {
          "endpoint": {
            "host": "i4wmp4crev.oec7sxsza2.tsdb.cloud.timescale.com",
            "port": 32625
          }
        },
        "endpoint": {
          "host": "i4wmp4crev.oec7sxsza2.tsdb.cloud.timescale.com",
          "port": 32625
        },
        "metadata": {
          "environment": "PROD"
        }
      }
    ],
    "vpc_endpoint": {
      "host": "i4wmp4crev.oec7sxsza2.tsdb.cloud.timescale.com",
      "port": 5432,
      "vpc_id": "1337"
    },
    "vpcEndpoint": {
      "host": "i4wmp4crev.oec7sxsza2.tsdb.cloud.timescale.com",
      "port": 5432,
      "vpc_id": "1337"
    }
  }
]
```

## Create a Service

**post** `/projects/{project_id}/services`

Creates a new database service within a project. This is an asynchronous operation.

### Path Parameters

- `project_id: string`

### Body Parameters

- `name: string`

  A human-readable name for the service.

- `addons: optional array of "time-series" or "ai"`

  List of addons to enable for the service. 'time-series' enables TimescaleDB.

  'ai' is deprecated and has no effect. To use pgvector, run `CREATE EXTENSION vector` on the service.

  - `"time-series"`

  - `"ai"`

- `cpu_millis: optional string`

  The initial CPU allocation in milli-cores, or 'shared' for a shared-resource service.

- `environment_tag: optional EnvironmentTag`

  The environment tag for the service:

  - DEV: a development environment
  - PROD: a production environment

  - `"DEV"`

  - `"PROD"`

- `memory_gbs: optional string`

  The initial memory allocation in gigabytes, or 'shared' for a shared-resource service.

- `region_code: optional string`

  The region where the service will be created. If not provided, we'll choose the best region for you.

- `replica_count: optional number`

  Number of high-availability replicas to create (all replicas are asynchronous by default).

### Returns

- `Service object { created, name, project_id, 16 more }`

  A database service and its current configuration.

  - `created: string`

    Creation timestamp.

  - `name: string`

    The name of the service.

  - `project_id: string`

    The project this service belongs to.

  - `region_code: string`

    The cloud region where the service is hosted.

  - `resources: array of object { id, spec }`

    List of resources allocated to the service.

    - `id: optional string`

      Resource identifier.

    - `spec: optional object { cpu_millis, memory_gbs, volume_type }`

      Resource specification.

      - `cpu_millis: optional number`

        CPU allocation in millicores.

      - `memory_gbs: optional number`

        Memory allocation in gigabytes.

      - `volume_type: optional string`

        Type of storage volume.

  - `service_id: string`

    The unique identifier for the service.

  - `service_type: "TIMESCALEDB" or "POSTGRES" or "VECTOR"`

    The type of the service:

    - TIMESCALEDB: a TimescaleDB service (PostgreSQL with the TimescaleDB extension)
    - POSTGRES: a standard PostgreSQL service

    VECTOR is deprecated and should not be used.

    - `"TIMESCALEDB"`

    - `"POSTGRES"`

    - `"VECTOR"`

  - `status: "QUEUED" or "DELETING" or "CONFIGURING" or 8 more`

    The current deployment status of the service:

    - QUEUED: the create request has been submitted and is queued
    - DELETING: the service is being deleted
    - CONFIGURING: the service is up but still completing configuration
    - READY: fully configured and serving traffic
    - DELETED: the service has been deleted
    - UNSTABLE: the service was ready but is not currently reachable
    - PAUSING: the service is being paused
    - PAUSED: the service is paused (temporarily shut down)
    - RESUMING: the service is resuming after being paused
    - UPGRADING: the service is being updated

    OPTIMIZING is deprecated and should not be used.

    - `"QUEUED"`

    - `"DELETING"`

    - `"CONFIGURING"`

    - `"READY"`

    - `"DELETED"`

    - `"UNSTABLE"`

    - `"PAUSING"`

    - `"PAUSED"`

    - `"RESUMING"`

    - `"UPGRADING"`

    - `"OPTIMIZING"`

  - `connection_pooler: optional ConnectionPooler`

    Connection pooler configuration for a service.

    - `endpoint: optional Endpoint`

      A network endpoint for connecting to a service.

      - `host: optional string`

        The hostname of the endpoint.

      - `port: optional number`

        The port of the endpoint.

  - `data_tiering: optional object { enabled }`

    Data tiering configuration for a service.

    - `enabled: optional boolean`

      Whether tiered storage is enabled for this service.

  - `endpoint: optional Endpoint`

    A network endpoint for connecting to a service.

  - `forked_from: optional object { is_standby, project_id, service_id }`

    The service this service was forked from.

    - `is_standby: optional boolean`

      Whether this service is a standby of the parent service.

    - `project_id: optional string`

      The project of the parent service.

    - `service_id: optional string`

      The ID of the parent service.

  - `ha_replicas: optional object { replica_count, sync_replica_count }`

    High-availability replica configuration for a service.

    - `replica_count: optional number`

      Number of high-availability replicas (all replicas are asynchronous by default).

    - `sync_replica_count: optional number`

      Number of synchronous high-availability replicas.

  - `initial_password: optional string`

    The initial password for the service.

  - `metadata: optional object { environment }`

    Additional metadata for the service.

    - `environment: optional string`

      Environment tag for the service.

  - `metrics: optional object { cpu_millicores, memory_mb, milli_cpu, storage_mb }`

    Resource usage metrics for the service.

    - `cpu_millicores: optional number`

      CPU usage in millicores.

    - `memory_mb: optional number`

      Memory usage in megabytes.

    - `milli_cpu: optional number`

      Deprecated. Use `cpu_millicores` instead.

    - `storage_mb: optional number`

      Storage usage in megabytes.

  - `read_replica_sets: optional array of ReadReplicaSet`

    The read replica sets attached to the service.

    - `id: string`

      The unique identifier for the read replica set.

    - `cpu_millis: number`

      CPU allocation in milli-cores.

    - `memory_gbs: number`

      Memory allocation in gigabytes.

    - `name: string`

      The name of the read replica set.

    - `nodes: number`

      Number of nodes in the replica set.

    - `service_id: string`

      The ID of the parent service this read replica set was created from.

    - `status: "creating" or "active" or "resizing" or 2 more`

      The current status of the read replica set:

      - creating: the replica set is being provisioned
      - active: the replica set is provisioned and serving traffic
      - resizing: the replica set is being resized
      - deleting: the replica set is being deleted
      - error: the replica set is in an error state

      - `"creating"`

      - `"active"`

      - `"resizing"`

      - `"deleting"`

      - `"error"`

    - `connection_pooler: optional ConnectionPooler`

      Connection pooler configuration for a service.

    - `endpoint: optional Endpoint`

      A network endpoint for connecting to a service.

    - `metadata: optional object { environment }`

      Additional metadata for the read replica set.

      - `environment: optional string`

        Environment tag for the read replica set.

  - `vpc_endpoint: optional object { host, port, vpc_id }`

    VPC endpoint configuration for connecting to a service over VPC peering.

    - `host: optional string`

      The hostname for connecting to the service over VPC peering.

    - `port: optional number`

      The port for connecting to the service over VPC peering.

    - `vpc_id: optional string`

      The ID of the VPC the endpoint is associated with.

  - `vpcEndpoint: optional object { host, port, vpc_id }`

    VPC endpoint configuration for connecting to a service over VPC peering.

    - `host: optional string`

      The hostname for connecting to the service over VPC peering.

    - `port: optional number`

      The port for connecting to the service over VPC peering.

    - `vpc_id: optional string`

      The ID of the VPC the endpoint is associated with.

### Example

```http
curl https://console.cloud.tigerdata.com/public/api/v1/projects/$PROJECT_ID/services \
    -H 'Content-Type: application/json' \
    -H "Authorization: Bearer $TIGER_CLOUD_API_KEY" \
    -d '{
          "name": "my-production-db",
          "addons": [
            "time-series"
          ],
          "cpu_millis": "1000",
          "memory_gbs": "4",
          "region_code": "us-east-1",
          "replica_count": 2
        }'
```

#### Response

```json
{
  "created": "2025-01-15T09:30:00Z",
  "name": "my-production-db",
  "project_id": "rp1pz7uyae",
  "region_code": "us-east-1",
  "resources": [
    {
      "id": "n4ph2tqz8r",
      "spec": {
        "cpu_millis": 1000,
        "memory_gbs": 4,
        "volume_type": "gp3"
      }
    }
  ],
  "service_id": "kd9w2xp4mz",
  "service_type": "TIMESCALEDB",
  "status": "QUEUED",
  "connection_pooler": {
    "endpoint": {
      "host": "i4wmp4crev.oec7sxsza2.tsdb.cloud.timescale.com",
      "port": 32625
    }
  },
  "data_tiering": {
    "enabled": false
  },
  "endpoint": {
    "host": "i4wmp4crev.oec7sxsza2.tsdb.cloud.timescale.com",
    "port": 32625
  },
  "forked_from": {
    "is_standby": false,
    "project_id": "rp1pz7uyae",
    "service_id": "kd9w2xp4mz"
  },
  "ha_replicas": {
    "replica_count": 1,
    "sync_replica_count": 1
  },
  "initial_password": "a-very-secure-initial-password",
  "metadata": {
    "environment": "PROD"
  },
  "metrics": {
    "cpu_millicores": 250,
    "memory_mb": 512,
    "milli_cpu": 250,
    "storage_mb": 1024
  },
  "read_replica_sets": [
    {
      "id": "alb8jicdpr",
      "cpu_millis": 250,
      "memory_gbs": 1,
      "name": "reporting-replica-1",
      "nodes": 2,
      "service_id": "d1k5vk7hf2",
      "status": "active",
      "connection_pooler": {
        "endpoint": {
          "host": "i4wmp4crev.oec7sxsza2.tsdb.cloud.timescale.com",
          "port": 32625
        }
      },
      "endpoint": {
        "host": "i4wmp4crev.oec7sxsza2.tsdb.cloud.timescale.com",
        "port": 32625
      },
      "metadata": {
        "environment": "PROD"
      }
    }
  ],
  "vpc_endpoint": {
    "host": "i4wmp4crev.oec7sxsza2.tsdb.cloud.timescale.com",
    "port": 5432,
    "vpc_id": "1337"
  },
  "vpcEndpoint": {
    "host": "i4wmp4crev.oec7sxsza2.tsdb.cloud.timescale.com",
    "port": 5432,
    "vpc_id": "1337"
  }
}
```

## Get a Service

**get** `/projects/{project_id}/services/{service_id}`

Retrieves the details of a specific service by its ID.

### Path Parameters

- `project_id: string`

- `service_id: string`

### Returns

- `Service object { created, name, project_id, 16 more }`

  A database service and its current configuration.

  - `created: string`

    Creation timestamp.

  - `name: string`

    The name of the service.

  - `project_id: string`

    The project this service belongs to.

  - `region_code: string`

    The cloud region where the service is hosted.

  - `resources: array of object { id, spec }`

    List of resources allocated to the service.

    - `id: optional string`

      Resource identifier.

    - `spec: optional object { cpu_millis, memory_gbs, volume_type }`

      Resource specification.

      - `cpu_millis: optional number`

        CPU allocation in millicores.

      - `memory_gbs: optional number`

        Memory allocation in gigabytes.

      - `volume_type: optional string`

        Type of storage volume.

  - `service_id: string`

    The unique identifier for the service.

  - `service_type: "TIMESCALEDB" or "POSTGRES" or "VECTOR"`

    The type of the service:

    - TIMESCALEDB: a TimescaleDB service (PostgreSQL with the TimescaleDB extension)
    - POSTGRES: a standard PostgreSQL service

    VECTOR is deprecated and should not be used.

    - `"TIMESCALEDB"`

    - `"POSTGRES"`

    - `"VECTOR"`

  - `status: "QUEUED" or "DELETING" or "CONFIGURING" or 8 more`

    The current deployment status of the service:

    - QUEUED: the create request has been submitted and is queued
    - DELETING: the service is being deleted
    - CONFIGURING: the service is up but still completing configuration
    - READY: fully configured and serving traffic
    - DELETED: the service has been deleted
    - UNSTABLE: the service was ready but is not currently reachable
    - PAUSING: the service is being paused
    - PAUSED: the service is paused (temporarily shut down)
    - RESUMING: the service is resuming after being paused
    - UPGRADING: the service is being updated

    OPTIMIZING is deprecated and should not be used.

    - `"QUEUED"`

    - `"DELETING"`

    - `"CONFIGURING"`

    - `"READY"`

    - `"DELETED"`

    - `"UNSTABLE"`

    - `"PAUSING"`

    - `"PAUSED"`

    - `"RESUMING"`

    - `"UPGRADING"`

    - `"OPTIMIZING"`

  - `connection_pooler: optional ConnectionPooler`

    Connection pooler configuration for a service.

    - `endpoint: optional Endpoint`

      A network endpoint for connecting to a service.

      - `host: optional string`

        The hostname of the endpoint.

      - `port: optional number`

        The port of the endpoint.

  - `data_tiering: optional object { enabled }`

    Data tiering configuration for a service.

    - `enabled: optional boolean`

      Whether tiered storage is enabled for this service.

  - `endpoint: optional Endpoint`

    A network endpoint for connecting to a service.

  - `forked_from: optional object { is_standby, project_id, service_id }`

    The service this service was forked from.

    - `is_standby: optional boolean`

      Whether this service is a standby of the parent service.

    - `project_id: optional string`

      The project of the parent service.

    - `service_id: optional string`

      The ID of the parent service.

  - `ha_replicas: optional object { replica_count, sync_replica_count }`

    High-availability replica configuration for a service.

    - `replica_count: optional number`

      Number of high-availability replicas (all replicas are asynchronous by default).

    - `sync_replica_count: optional number`

      Number of synchronous high-availability replicas.

  - `initial_password: optional string`

    The initial password for the service.

  - `metadata: optional object { environment }`

    Additional metadata for the service.

    - `environment: optional string`

      Environment tag for the service.

  - `metrics: optional object { cpu_millicores, memory_mb, milli_cpu, storage_mb }`

    Resource usage metrics for the service.

    - `cpu_millicores: optional number`

      CPU usage in millicores.

    - `memory_mb: optional number`

      Memory usage in megabytes.

    - `milli_cpu: optional number`

      Deprecated. Use `cpu_millicores` instead.

    - `storage_mb: optional number`

      Storage usage in megabytes.

  - `read_replica_sets: optional array of ReadReplicaSet`

    The read replica sets attached to the service.

    - `id: string`

      The unique identifier for the read replica set.

    - `cpu_millis: number`

      CPU allocation in milli-cores.

    - `memory_gbs: number`

      Memory allocation in gigabytes.

    - `name: string`

      The name of the read replica set.

    - `nodes: number`

      Number of nodes in the replica set.

    - `service_id: string`

      The ID of the parent service this read replica set was created from.

    - `status: "creating" or "active" or "resizing" or 2 more`

      The current status of the read replica set:

      - creating: the replica set is being provisioned
      - active: the replica set is provisioned and serving traffic
      - resizing: the replica set is being resized
      - deleting: the replica set is being deleted
      - error: the replica set is in an error state

      - `"creating"`

      - `"active"`

      - `"resizing"`

      - `"deleting"`

      - `"error"`

    - `connection_pooler: optional ConnectionPooler`

      Connection pooler configuration for a service.

    - `endpoint: optional Endpoint`

      A network endpoint for connecting to a service.

    - `metadata: optional object { environment }`

      Additional metadata for the read replica set.

      - `environment: optional string`

        Environment tag for the read replica set.

  - `vpc_endpoint: optional object { host, port, vpc_id }`

    VPC endpoint configuration for connecting to a service over VPC peering.

    - `host: optional string`

      The hostname for connecting to the service over VPC peering.

    - `port: optional number`

      The port for connecting to the service over VPC peering.

    - `vpc_id: optional string`

      The ID of the VPC the endpoint is associated with.

  - `vpcEndpoint: optional object { host, port, vpc_id }`

    VPC endpoint configuration for connecting to a service over VPC peering.

    - `host: optional string`

      The hostname for connecting to the service over VPC peering.

    - `port: optional number`

      The port for connecting to the service over VPC peering.

    - `vpc_id: optional string`

      The ID of the VPC the endpoint is associated with.

### Example

```http
curl https://console.cloud.tigerdata.com/public/api/v1/projects/$PROJECT_ID/services/$SERVICE_ID \
    -H "Authorization: Bearer $TIGER_CLOUD_API_KEY"
```

#### Response

```json
{
  "created": "2025-01-15T09:30:00Z",
  "name": "my-production-db",
  "project_id": "rp1pz7uyae",
  "region_code": "us-east-1",
  "resources": [
    {
      "id": "n4ph2tqz8r",
      "spec": {
        "cpu_millis": 1000,
        "memory_gbs": 4,
        "volume_type": "gp3"
      }
    }
  ],
  "service_id": "kd9w2xp4mz",
  "service_type": "TIMESCALEDB",
  "status": "QUEUED",
  "connection_pooler": {
    "endpoint": {
      "host": "i4wmp4crev.oec7sxsza2.tsdb.cloud.timescale.com",
      "port": 32625
    }
  },
  "data_tiering": {
    "enabled": false
  },
  "endpoint": {
    "host": "i4wmp4crev.oec7sxsza2.tsdb.cloud.timescale.com",
    "port": 32625
  },
  "forked_from": {
    "is_standby": false,
    "project_id": "rp1pz7uyae",
    "service_id": "kd9w2xp4mz"
  },
  "ha_replicas": {
    "replica_count": 1,
    "sync_replica_count": 1
  },
  "initial_password": "a-very-secure-initial-password",
  "metadata": {
    "environment": "PROD"
  },
  "metrics": {
    "cpu_millicores": 250,
    "memory_mb": 512,
    "milli_cpu": 250,
    "storage_mb": 1024
  },
  "read_replica_sets": [
    {
      "id": "alb8jicdpr",
      "cpu_millis": 250,
      "memory_gbs": 1,
      "name": "reporting-replica-1",
      "nodes": 2,
      "service_id": "d1k5vk7hf2",
      "status": "active",
      "connection_pooler": {
        "endpoint": {
          "host": "i4wmp4crev.oec7sxsza2.tsdb.cloud.timescale.com",
          "port": 32625
        }
      },
      "endpoint": {
        "host": "i4wmp4crev.oec7sxsza2.tsdb.cloud.timescale.com",
        "port": 32625
      },
      "metadata": {
        "environment": "PROD"
      }
    }
  ],
  "vpc_endpoint": {
    "host": "i4wmp4crev.oec7sxsza2.tsdb.cloud.timescale.com",
    "port": 5432,
    "vpc_id": "1337"
  },
  "vpcEndpoint": {
    "host": "i4wmp4crev.oec7sxsza2.tsdb.cloud.timescale.com",
    "port": 5432,
    "vpc_id": "1337"
  }
}
```

## Delete a Service

**delete** `/projects/{project_id}/services/{service_id}`

Deletes a specific service. This is an asynchronous operation.

### Path Parameters

- `project_id: string`

- `service_id: string`

### Example

```http
curl https://console.cloud.tigerdata.com/public/api/v1/projects/$PROJECT_ID/services/$SERVICE_ID \
    -X DELETE \
    -H "Authorization: Bearer $TIGER_CLOUD_API_KEY"
```

## Start a Service

**post** `/projects/{project_id}/services/{service_id}/start`

Starts a stopped service within a project. This is an asynchronous operation.

### Path Parameters

- `project_id: string`

- `service_id: string`

### Returns

- `Service object { created, name, project_id, 16 more }`

  A database service and its current configuration.

  - `created: string`

    Creation timestamp.

  - `name: string`

    The name of the service.

  - `project_id: string`

    The project this service belongs to.

  - `region_code: string`

    The cloud region where the service is hosted.

  - `resources: array of object { id, spec }`

    List of resources allocated to the service.

    - `id: optional string`

      Resource identifier.

    - `spec: optional object { cpu_millis, memory_gbs, volume_type }`

      Resource specification.

      - `cpu_millis: optional number`

        CPU allocation in millicores.

      - `memory_gbs: optional number`

        Memory allocation in gigabytes.

      - `volume_type: optional string`

        Type of storage volume.

  - `service_id: string`

    The unique identifier for the service.

  - `service_type: "TIMESCALEDB" or "POSTGRES" or "VECTOR"`

    The type of the service:

    - TIMESCALEDB: a TimescaleDB service (PostgreSQL with the TimescaleDB extension)
    - POSTGRES: a standard PostgreSQL service

    VECTOR is deprecated and should not be used.

    - `"TIMESCALEDB"`

    - `"POSTGRES"`

    - `"VECTOR"`

  - `status: "QUEUED" or "DELETING" or "CONFIGURING" or 8 more`

    The current deployment status of the service:

    - QUEUED: the create request has been submitted and is queued
    - DELETING: the service is being deleted
    - CONFIGURING: the service is up but still completing configuration
    - READY: fully configured and serving traffic
    - DELETED: the service has been deleted
    - UNSTABLE: the service was ready but is not currently reachable
    - PAUSING: the service is being paused
    - PAUSED: the service is paused (temporarily shut down)
    - RESUMING: the service is resuming after being paused
    - UPGRADING: the service is being updated

    OPTIMIZING is deprecated and should not be used.

    - `"QUEUED"`

    - `"DELETING"`

    - `"CONFIGURING"`

    - `"READY"`

    - `"DELETED"`

    - `"UNSTABLE"`

    - `"PAUSING"`

    - `"PAUSED"`

    - `"RESUMING"`

    - `"UPGRADING"`

    - `"OPTIMIZING"`

  - `connection_pooler: optional ConnectionPooler`

    Connection pooler configuration for a service.

    - `endpoint: optional Endpoint`

      A network endpoint for connecting to a service.

      - `host: optional string`

        The hostname of the endpoint.

      - `port: optional number`

        The port of the endpoint.

  - `data_tiering: optional object { enabled }`

    Data tiering configuration for a service.

    - `enabled: optional boolean`

      Whether tiered storage is enabled for this service.

  - `endpoint: optional Endpoint`

    A network endpoint for connecting to a service.

  - `forked_from: optional object { is_standby, project_id, service_id }`

    The service this service was forked from.

    - `is_standby: optional boolean`

      Whether this service is a standby of the parent service.

    - `project_id: optional string`

      The project of the parent service.

    - `service_id: optional string`

      The ID of the parent service.

  - `ha_replicas: optional object { replica_count, sync_replica_count }`

    High-availability replica configuration for a service.

    - `replica_count: optional number`

      Number of high-availability replicas (all replicas are asynchronous by default).

    - `sync_replica_count: optional number`

      Number of synchronous high-availability replicas.

  - `initial_password: optional string`

    The initial password for the service.

  - `metadata: optional object { environment }`

    Additional metadata for the service.

    - `environment: optional string`

      Environment tag for the service.

  - `metrics: optional object { cpu_millicores, memory_mb, milli_cpu, storage_mb }`

    Resource usage metrics for the service.

    - `cpu_millicores: optional number`

      CPU usage in millicores.

    - `memory_mb: optional number`

      Memory usage in megabytes.

    - `milli_cpu: optional number`

      Deprecated. Use `cpu_millicores` instead.

    - `storage_mb: optional number`

      Storage usage in megabytes.

  - `read_replica_sets: optional array of ReadReplicaSet`

    The read replica sets attached to the service.

    - `id: string`

      The unique identifier for the read replica set.

    - `cpu_millis: number`

      CPU allocation in milli-cores.

    - `memory_gbs: number`

      Memory allocation in gigabytes.

    - `name: string`

      The name of the read replica set.

    - `nodes: number`

      Number of nodes in the replica set.

    - `service_id: string`

      The ID of the parent service this read replica set was created from.

    - `status: "creating" or "active" or "resizing" or 2 more`

      The current status of the read replica set:

      - creating: the replica set is being provisioned
      - active: the replica set is provisioned and serving traffic
      - resizing: the replica set is being resized
      - deleting: the replica set is being deleted
      - error: the replica set is in an error state

      - `"creating"`

      - `"active"`

      - `"resizing"`

      - `"deleting"`

      - `"error"`

    - `connection_pooler: optional ConnectionPooler`

      Connection pooler configuration for a service.

    - `endpoint: optional Endpoint`

      A network endpoint for connecting to a service.

    - `metadata: optional object { environment }`

      Additional metadata for the read replica set.

      - `environment: optional string`

        Environment tag for the read replica set.

  - `vpc_endpoint: optional object { host, port, vpc_id }`

    VPC endpoint configuration for connecting to a service over VPC peering.

    - `host: optional string`

      The hostname for connecting to the service over VPC peering.

    - `port: optional number`

      The port for connecting to the service over VPC peering.

    - `vpc_id: optional string`

      The ID of the VPC the endpoint is associated with.

  - `vpcEndpoint: optional object { host, port, vpc_id }`

    VPC endpoint configuration for connecting to a service over VPC peering.

    - `host: optional string`

      The hostname for connecting to the service over VPC peering.

    - `port: optional number`

      The port for connecting to the service over VPC peering.

    - `vpc_id: optional string`

      The ID of the VPC the endpoint is associated with.

### Example

```http
curl https://console.cloud.tigerdata.com/public/api/v1/projects/$PROJECT_ID/services/$SERVICE_ID/start \
    -X POST \
    -H "Authorization: Bearer $TIGER_CLOUD_API_KEY"
```

#### Response

```json
{
  "created": "2025-01-15T09:30:00Z",
  "name": "my-production-db",
  "project_id": "rp1pz7uyae",
  "region_code": "us-east-1",
  "resources": [
    {
      "id": "n4ph2tqz8r",
      "spec": {
        "cpu_millis": 1000,
        "memory_gbs": 4,
        "volume_type": "gp3"
      }
    }
  ],
  "service_id": "kd9w2xp4mz",
  "service_type": "TIMESCALEDB",
  "status": "QUEUED",
  "connection_pooler": {
    "endpoint": {
      "host": "i4wmp4crev.oec7sxsza2.tsdb.cloud.timescale.com",
      "port": 32625
    }
  },
  "data_tiering": {
    "enabled": false
  },
  "endpoint": {
    "host": "i4wmp4crev.oec7sxsza2.tsdb.cloud.timescale.com",
    "port": 32625
  },
  "forked_from": {
    "is_standby": false,
    "project_id": "rp1pz7uyae",
    "service_id": "kd9w2xp4mz"
  },
  "ha_replicas": {
    "replica_count": 1,
    "sync_replica_count": 1
  },
  "initial_password": "a-very-secure-initial-password",
  "metadata": {
    "environment": "PROD"
  },
  "metrics": {
    "cpu_millicores": 250,
    "memory_mb": 512,
    "milli_cpu": 250,
    "storage_mb": 1024
  },
  "read_replica_sets": [
    {
      "id": "alb8jicdpr",
      "cpu_millis": 250,
      "memory_gbs": 1,
      "name": "reporting-replica-1",
      "nodes": 2,
      "service_id": "d1k5vk7hf2",
      "status": "active",
      "connection_pooler": {
        "endpoint": {
          "host": "i4wmp4crev.oec7sxsza2.tsdb.cloud.timescale.com",
          "port": 32625
        }
      },
      "endpoint": {
        "host": "i4wmp4crev.oec7sxsza2.tsdb.cloud.timescale.com",
        "port": 32625
      },
      "metadata": {
        "environment": "PROD"
      }
    }
  ],
  "vpc_endpoint": {
    "host": "i4wmp4crev.oec7sxsza2.tsdb.cloud.timescale.com",
    "port": 5432,
    "vpc_id": "1337"
  },
  "vpcEndpoint": {
    "host": "i4wmp4crev.oec7sxsza2.tsdb.cloud.timescale.com",
    "port": 5432,
    "vpc_id": "1337"
  }
}
```

## Stop a Service

**post** `/projects/{project_id}/services/{service_id}/stop`

Stops a running service within a project. This is an asynchronous operation.

### Path Parameters

- `project_id: string`

- `service_id: string`

### Returns

- `Service object { created, name, project_id, 16 more }`

  A database service and its current configuration.

  - `created: string`

    Creation timestamp.

  - `name: string`

    The name of the service.

  - `project_id: string`

    The project this service belongs to.

  - `region_code: string`

    The cloud region where the service is hosted.

  - `resources: array of object { id, spec }`

    List of resources allocated to the service.

    - `id: optional string`

      Resource identifier.

    - `spec: optional object { cpu_millis, memory_gbs, volume_type }`

      Resource specification.

      - `cpu_millis: optional number`

        CPU allocation in millicores.

      - `memory_gbs: optional number`

        Memory allocation in gigabytes.

      - `volume_type: optional string`

        Type of storage volume.

  - `service_id: string`

    The unique identifier for the service.

  - `service_type: "TIMESCALEDB" or "POSTGRES" or "VECTOR"`

    The type of the service:

    - TIMESCALEDB: a TimescaleDB service (PostgreSQL with the TimescaleDB extension)
    - POSTGRES: a standard PostgreSQL service

    VECTOR is deprecated and should not be used.

    - `"TIMESCALEDB"`

    - `"POSTGRES"`

    - `"VECTOR"`

  - `status: "QUEUED" or "DELETING" or "CONFIGURING" or 8 more`

    The current deployment status of the service:

    - QUEUED: the create request has been submitted and is queued
    - DELETING: the service is being deleted
    - CONFIGURING: the service is up but still completing configuration
    - READY: fully configured and serving traffic
    - DELETED: the service has been deleted
    - UNSTABLE: the service was ready but is not currently reachable
    - PAUSING: the service is being paused
    - PAUSED: the service is paused (temporarily shut down)
    - RESUMING: the service is resuming after being paused
    - UPGRADING: the service is being updated

    OPTIMIZING is deprecated and should not be used.

    - `"QUEUED"`

    - `"DELETING"`

    - `"CONFIGURING"`

    - `"READY"`

    - `"DELETED"`

    - `"UNSTABLE"`

    - `"PAUSING"`

    - `"PAUSED"`

    - `"RESUMING"`

    - `"UPGRADING"`

    - `"OPTIMIZING"`

  - `connection_pooler: optional ConnectionPooler`

    Connection pooler configuration for a service.

    - `endpoint: optional Endpoint`

      A network endpoint for connecting to a service.

      - `host: optional string`

        The hostname of the endpoint.

      - `port: optional number`

        The port of the endpoint.

  - `data_tiering: optional object { enabled }`

    Data tiering configuration for a service.

    - `enabled: optional boolean`

      Whether tiered storage is enabled for this service.

  - `endpoint: optional Endpoint`

    A network endpoint for connecting to a service.

  - `forked_from: optional object { is_standby, project_id, service_id }`

    The service this service was forked from.

    - `is_standby: optional boolean`

      Whether this service is a standby of the parent service.

    - `project_id: optional string`

      The project of the parent service.

    - `service_id: optional string`

      The ID of the parent service.

  - `ha_replicas: optional object { replica_count, sync_replica_count }`

    High-availability replica configuration for a service.

    - `replica_count: optional number`

      Number of high-availability replicas (all replicas are asynchronous by default).

    - `sync_replica_count: optional number`

      Number of synchronous high-availability replicas.

  - `initial_password: optional string`

    The initial password for the service.

  - `metadata: optional object { environment }`

    Additional metadata for the service.

    - `environment: optional string`

      Environment tag for the service.

  - `metrics: optional object { cpu_millicores, memory_mb, milli_cpu, storage_mb }`

    Resource usage metrics for the service.

    - `cpu_millicores: optional number`

      CPU usage in millicores.

    - `memory_mb: optional number`

      Memory usage in megabytes.

    - `milli_cpu: optional number`

      Deprecated. Use `cpu_millicores` instead.

    - `storage_mb: optional number`

      Storage usage in megabytes.

  - `read_replica_sets: optional array of ReadReplicaSet`

    The read replica sets attached to the service.

    - `id: string`

      The unique identifier for the read replica set.

    - `cpu_millis: number`

      CPU allocation in milli-cores.

    - `memory_gbs: number`

      Memory allocation in gigabytes.

    - `name: string`

      The name of the read replica set.

    - `nodes: number`

      Number of nodes in the replica set.

    - `service_id: string`

      The ID of the parent service this read replica set was created from.

    - `status: "creating" or "active" or "resizing" or 2 more`

      The current status of the read replica set:

      - creating: the replica set is being provisioned
      - active: the replica set is provisioned and serving traffic
      - resizing: the replica set is being resized
      - deleting: the replica set is being deleted
      - error: the replica set is in an error state

      - `"creating"`

      - `"active"`

      - `"resizing"`

      - `"deleting"`

      - `"error"`

    - `connection_pooler: optional ConnectionPooler`

      Connection pooler configuration for a service.

    - `endpoint: optional Endpoint`

      A network endpoint for connecting to a service.

    - `metadata: optional object { environment }`

      Additional metadata for the read replica set.

      - `environment: optional string`

        Environment tag for the read replica set.

  - `vpc_endpoint: optional object { host, port, vpc_id }`

    VPC endpoint configuration for connecting to a service over VPC peering.

    - `host: optional string`

      The hostname for connecting to the service over VPC peering.

    - `port: optional number`

      The port for connecting to the service over VPC peering.

    - `vpc_id: optional string`

      The ID of the VPC the endpoint is associated with.

  - `vpcEndpoint: optional object { host, port, vpc_id }`

    VPC endpoint configuration for connecting to a service over VPC peering.

    - `host: optional string`

      The hostname for connecting to the service over VPC peering.

    - `port: optional number`

      The port for connecting to the service over VPC peering.

    - `vpc_id: optional string`

      The ID of the VPC the endpoint is associated with.

### Example

```http
curl https://console.cloud.tigerdata.com/public/api/v1/projects/$PROJECT_ID/services/$SERVICE_ID/stop \
    -X POST \
    -H "Authorization: Bearer $TIGER_CLOUD_API_KEY"
```

#### Response

```json
{
  "created": "2025-01-15T09:30:00Z",
  "name": "my-production-db",
  "project_id": "rp1pz7uyae",
  "region_code": "us-east-1",
  "resources": [
    {
      "id": "n4ph2tqz8r",
      "spec": {
        "cpu_millis": 1000,
        "memory_gbs": 4,
        "volume_type": "gp3"
      }
    }
  ],
  "service_id": "kd9w2xp4mz",
  "service_type": "TIMESCALEDB",
  "status": "QUEUED",
  "connection_pooler": {
    "endpoint": {
      "host": "i4wmp4crev.oec7sxsza2.tsdb.cloud.timescale.com",
      "port": 32625
    }
  },
  "data_tiering": {
    "enabled": false
  },
  "endpoint": {
    "host": "i4wmp4crev.oec7sxsza2.tsdb.cloud.timescale.com",
    "port": 32625
  },
  "forked_from": {
    "is_standby": false,
    "project_id": "rp1pz7uyae",
    "service_id": "kd9w2xp4mz"
  },
  "ha_replicas": {
    "replica_count": 1,
    "sync_replica_count": 1
  },
  "initial_password": "a-very-secure-initial-password",
  "metadata": {
    "environment": "PROD"
  },
  "metrics": {
    "cpu_millicores": 250,
    "memory_mb": 512,
    "milli_cpu": 250,
    "storage_mb": 1024
  },
  "read_replica_sets": [
    {
      "id": "alb8jicdpr",
      "cpu_millis": 250,
      "memory_gbs": 1,
      "name": "reporting-replica-1",
      "nodes": 2,
      "service_id": "d1k5vk7hf2",
      "status": "active",
      "connection_pooler": {
        "endpoint": {
          "host": "i4wmp4crev.oec7sxsza2.tsdb.cloud.timescale.com",
          "port": 32625
        }
      },
      "endpoint": {
        "host": "i4wmp4crev.oec7sxsza2.tsdb.cloud.timescale.com",
        "port": 32625
      },
      "metadata": {
        "environment": "PROD"
      }
    }
  ],
  "vpc_endpoint": {
    "host": "i4wmp4crev.oec7sxsza2.tsdb.cloud.timescale.com",
    "port": 5432,
    "vpc_id": "1337"
  },
  "vpcEndpoint": {
    "host": "i4wmp4crev.oec7sxsza2.tsdb.cloud.timescale.com",
    "port": 5432,
    "vpc_id": "1337"
  }
}
```

## Attach Service to VPC

**post** `/projects/{project_id}/services/{service_id}/attachToVPC`

Associates a service with a VPC.

### Path Parameters

- `project_id: string`

- `service_id: string`

### Body Parameters

- `vpc_id: string`

  The ID of the VPC to attach the service to.

### Returns

- `message: optional string`

### Example

```http
curl https://console.cloud.tigerdata.com/public/api/v1/projects/$PROJECT_ID/services/$SERVICE_ID/attachToVPC \
    -H 'Content-Type: application/json' \
    -H "Authorization: Bearer $TIGER_CLOUD_API_KEY" \
    -d '{
          "vpc_id": "1234567890"
        }'
```

#### Response

```json
{
  "message": "Action completed successfully."
}
```

## Detach Service from VPC

**post** `/projects/{project_id}/services/{service_id}/detachFromVPC`

Disassociates a service from its VPC.

### Path Parameters

- `project_id: string`

- `service_id: string`

### Body Parameters

- `vpc_id: string`

  The ID of the VPC to attach the service to.

### Returns

- `message: optional string`

### Example

```http
curl https://console.cloud.tigerdata.com/public/api/v1/projects/$PROJECT_ID/services/$SERVICE_ID/detachFromVPC \
    -H 'Content-Type: application/json' \
    -H "Authorization: Bearer $TIGER_CLOUD_API_KEY" \
    -d '{
          "vpc_id": "1234567890"
        }'
```

#### Response

```json
{
  "message": "Action completed successfully."
}
```

## Resize a Service

**post** `/projects/{project_id}/services/{service_id}/resize`

Changes the CPU and memory allocation for a specific service within a project. This is an asynchronous operation.

### Path Parameters

- `project_id: string`

- `service_id: string`

### Body Parameters

- `cpu_millis: optional string`

  The new CPU allocation in milli-cores.

- `memory_gbs: optional string`

  The new memory allocation in gigabytes.

### Returns

- `Service object { created, name, project_id, 16 more }`

  A database service and its current configuration.

  - `created: string`

    Creation timestamp.

  - `name: string`

    The name of the service.

  - `project_id: string`

    The project this service belongs to.

  - `region_code: string`

    The cloud region where the service is hosted.

  - `resources: array of object { id, spec }`

    List of resources allocated to the service.

    - `id: optional string`

      Resource identifier.

    - `spec: optional object { cpu_millis, memory_gbs, volume_type }`

      Resource specification.

      - `cpu_millis: optional number`

        CPU allocation in millicores.

      - `memory_gbs: optional number`

        Memory allocation in gigabytes.

      - `volume_type: optional string`

        Type of storage volume.

  - `service_id: string`

    The unique identifier for the service.

  - `service_type: "TIMESCALEDB" or "POSTGRES" or "VECTOR"`

    The type of the service:

    - TIMESCALEDB: a TimescaleDB service (PostgreSQL with the TimescaleDB extension)
    - POSTGRES: a standard PostgreSQL service

    VECTOR is deprecated and should not be used.

    - `"TIMESCALEDB"`

    - `"POSTGRES"`

    - `"VECTOR"`

  - `status: "QUEUED" or "DELETING" or "CONFIGURING" or 8 more`

    The current deployment status of the service:

    - QUEUED: the create request has been submitted and is queued
    - DELETING: the service is being deleted
    - CONFIGURING: the service is up but still completing configuration
    - READY: fully configured and serving traffic
    - DELETED: the service has been deleted
    - UNSTABLE: the service was ready but is not currently reachable
    - PAUSING: the service is being paused
    - PAUSED: the service is paused (temporarily shut down)
    - RESUMING: the service is resuming after being paused
    - UPGRADING: the service is being updated

    OPTIMIZING is deprecated and should not be used.

    - `"QUEUED"`

    - `"DELETING"`

    - `"CONFIGURING"`

    - `"READY"`

    - `"DELETED"`

    - `"UNSTABLE"`

    - `"PAUSING"`

    - `"PAUSED"`

    - `"RESUMING"`

    - `"UPGRADING"`

    - `"OPTIMIZING"`

  - `connection_pooler: optional ConnectionPooler`

    Connection pooler configuration for a service.

    - `endpoint: optional Endpoint`

      A network endpoint for connecting to a service.

      - `host: optional string`

        The hostname of the endpoint.

      - `port: optional number`

        The port of the endpoint.

  - `data_tiering: optional object { enabled }`

    Data tiering configuration for a service.

    - `enabled: optional boolean`

      Whether tiered storage is enabled for this service.

  - `endpoint: optional Endpoint`

    A network endpoint for connecting to a service.

  - `forked_from: optional object { is_standby, project_id, service_id }`

    The service this service was forked from.

    - `is_standby: optional boolean`

      Whether this service is a standby of the parent service.

    - `project_id: optional string`

      The project of the parent service.

    - `service_id: optional string`

      The ID of the parent service.

  - `ha_replicas: optional object { replica_count, sync_replica_count }`

    High-availability replica configuration for a service.

    - `replica_count: optional number`

      Number of high-availability replicas (all replicas are asynchronous by default).

    - `sync_replica_count: optional number`

      Number of synchronous high-availability replicas.

  - `initial_password: optional string`

    The initial password for the service.

  - `metadata: optional object { environment }`

    Additional metadata for the service.

    - `environment: optional string`

      Environment tag for the service.

  - `metrics: optional object { cpu_millicores, memory_mb, milli_cpu, storage_mb }`

    Resource usage metrics for the service.

    - `cpu_millicores: optional number`

      CPU usage in millicores.

    - `memory_mb: optional number`

      Memory usage in megabytes.

    - `milli_cpu: optional number`

      Deprecated. Use `cpu_millicores` instead.

    - `storage_mb: optional number`

      Storage usage in megabytes.

  - `read_replica_sets: optional array of ReadReplicaSet`

    The read replica sets attached to the service.

    - `id: string`

      The unique identifier for the read replica set.

    - `cpu_millis: number`

      CPU allocation in milli-cores.

    - `memory_gbs: number`

      Memory allocation in gigabytes.

    - `name: string`

      The name of the read replica set.

    - `nodes: number`

      Number of nodes in the replica set.

    - `service_id: string`

      The ID of the parent service this read replica set was created from.

    - `status: "creating" or "active" or "resizing" or 2 more`

      The current status of the read replica set:

      - creating: the replica set is being provisioned
      - active: the replica set is provisioned and serving traffic
      - resizing: the replica set is being resized
      - deleting: the replica set is being deleted
      - error: the replica set is in an error state

      - `"creating"`

      - `"active"`

      - `"resizing"`

      - `"deleting"`

      - `"error"`

    - `connection_pooler: optional ConnectionPooler`

      Connection pooler configuration for a service.

    - `endpoint: optional Endpoint`

      A network endpoint for connecting to a service.

    - `metadata: optional object { environment }`

      Additional metadata for the read replica set.

      - `environment: optional string`

        Environment tag for the read replica set.

  - `vpc_endpoint: optional object { host, port, vpc_id }`

    VPC endpoint configuration for connecting to a service over VPC peering.

    - `host: optional string`

      The hostname for connecting to the service over VPC peering.

    - `port: optional number`

      The port for connecting to the service over VPC peering.

    - `vpc_id: optional string`

      The ID of the VPC the endpoint is associated with.

  - `vpcEndpoint: optional object { host, port, vpc_id }`

    VPC endpoint configuration for connecting to a service over VPC peering.

    - `host: optional string`

      The hostname for connecting to the service over VPC peering.

    - `port: optional number`

      The port for connecting to the service over VPC peering.

    - `vpc_id: optional string`

      The ID of the VPC the endpoint is associated with.

### Example

```http
curl https://console.cloud.tigerdata.com/public/api/v1/projects/$PROJECT_ID/services/$SERVICE_ID/resize \
    -H 'Content-Type: application/json' \
    -H "Authorization: Bearer $TIGER_CLOUD_API_KEY" \
    -d '{
          "cpu_millis": "1000",
          "memory_gbs": "4"
        }'
```

#### Response

```json
{
  "created": "2025-01-15T09:30:00Z",
  "name": "my-production-db",
  "project_id": "rp1pz7uyae",
  "region_code": "us-east-1",
  "resources": [
    {
      "id": "n4ph2tqz8r",
      "spec": {
        "cpu_millis": 1000,
        "memory_gbs": 4,
        "volume_type": "gp3"
      }
    }
  ],
  "service_id": "kd9w2xp4mz",
  "service_type": "TIMESCALEDB",
  "status": "QUEUED",
  "connection_pooler": {
    "endpoint": {
      "host": "i4wmp4crev.oec7sxsza2.tsdb.cloud.timescale.com",
      "port": 32625
    }
  },
  "data_tiering": {
    "enabled": false
  },
  "endpoint": {
    "host": "i4wmp4crev.oec7sxsza2.tsdb.cloud.timescale.com",
    "port": 32625
  },
  "forked_from": {
    "is_standby": false,
    "project_id": "rp1pz7uyae",
    "service_id": "kd9w2xp4mz"
  },
  "ha_replicas": {
    "replica_count": 1,
    "sync_replica_count": 1
  },
  "initial_password": "a-very-secure-initial-password",
  "metadata": {
    "environment": "PROD"
  },
  "metrics": {
    "cpu_millicores": 250,
    "memory_mb": 512,
    "milli_cpu": 250,
    "storage_mb": 1024
  },
  "read_replica_sets": [
    {
      "id": "alb8jicdpr",
      "cpu_millis": 250,
      "memory_gbs": 1,
      "name": "reporting-replica-1",
      "nodes": 2,
      "service_id": "d1k5vk7hf2",
      "status": "active",
      "connection_pooler": {
        "endpoint": {
          "host": "i4wmp4crev.oec7sxsza2.tsdb.cloud.timescale.com",
          "port": 32625
        }
      },
      "endpoint": {
        "host": "i4wmp4crev.oec7sxsza2.tsdb.cloud.timescale.com",
        "port": 32625
      },
      "metadata": {
        "environment": "PROD"
      }
    }
  ],
  "vpc_endpoint": {
    "host": "i4wmp4crev.oec7sxsza2.tsdb.cloud.timescale.com",
    "port": 5432,
    "vpc_id": "1337"
  },
  "vpcEndpoint": {
    "host": "i4wmp4crev.oec7sxsza2.tsdb.cloud.timescale.com",
    "port": 5432,
    "vpc_id": "1337"
  }
}
```

## Enable Connection Pooler for a Service

**post** `/projects/{project_id}/services/{service_id}/enablePooler`

Activates the connection pooler for a specific service within a project.

### Path Parameters

- `project_id: string`

- `service_id: string`

### Returns

- `message: optional string`

### Example

```http
curl https://console.cloud.tigerdata.com/public/api/v1/projects/$PROJECT_ID/services/$SERVICE_ID/enablePooler \
    -X POST \
    -H "Authorization: Bearer $TIGER_CLOUD_API_KEY"
```

#### Response

```json
{
  "message": "Action completed successfully."
}
```

## Disable Connection Pooler for a Service

**post** `/projects/{project_id}/services/{service_id}/disablePooler`

Deactivates the connection pooler for a specific service within a project.

### Path Parameters

- `project_id: string`

- `service_id: string`

### Returns

- `message: optional string`

### Example

```http
curl https://console.cloud.tigerdata.com/public/api/v1/projects/$PROJECT_ID/services/$SERVICE_ID/disablePooler \
    -X POST \
    -H "Authorization: Bearer $TIGER_CLOUD_API_KEY"
```

#### Response

```json
{
  "message": "Action completed successfully."
}
```

## Fork a Service

**post** `/projects/{project_id}/services/{service_id}/forkService`

Creates a new, independent service within a project by taking a snapshot of an existing one.

### Path Parameters

- `project_id: string`

- `service_id: string`

### Body Parameters

- `fork_strategy: "LAST_SNAPSHOT" or "NOW" or "PITR"`

  Strategy for creating the fork:

  - LAST_SNAPSHOT: Use existing snapshot for fast fork
  - NOW: Create new snapshot for up-to-date fork
  - PITR: Point-in-time recovery using target_time

  - `"LAST_SNAPSHOT"`

  - `"NOW"`

  - `"PITR"`

- `cpu_millis: optional string`

  The initial CPU allocation in milli-cores, or 'shared' for a shared-resource service. If not provided, will inherit from parent service.

- `environment_tag: optional EnvironmentTag`

  The environment tag for the service:

  - DEV: a development environment
  - PROD: a production environment

  - `"DEV"`

  - `"PROD"`

- `memory_gbs: optional string`

  The initial memory allocation in gigabytes, or 'shared' for a shared-resource service. If not provided, will inherit from parent service.

- `name: optional string`

  A human-readable name for the forked service. If not provided, defaults to "standard-fork-<parent name>" (or "recovery-fork-<parent name>" for PITR forks), with "-1", "-2", ... appended if that name is already in use in the project.

- `target_time: optional string`

  Target time for point-in-time recovery. Required when fork_strategy is PITR.

### Returns

- `Service object { created, name, project_id, 16 more }`

  A database service and its current configuration.

  - `created: string`

    Creation timestamp.

  - `name: string`

    The name of the service.

  - `project_id: string`

    The project this service belongs to.

  - `region_code: string`

    The cloud region where the service is hosted.

  - `resources: array of object { id, spec }`

    List of resources allocated to the service.

    - `id: optional string`

      Resource identifier.

    - `spec: optional object { cpu_millis, memory_gbs, volume_type }`

      Resource specification.

      - `cpu_millis: optional number`

        CPU allocation in millicores.

      - `memory_gbs: optional number`

        Memory allocation in gigabytes.

      - `volume_type: optional string`

        Type of storage volume.

  - `service_id: string`

    The unique identifier for the service.

  - `service_type: "TIMESCALEDB" or "POSTGRES" or "VECTOR"`

    The type of the service:

    - TIMESCALEDB: a TimescaleDB service (PostgreSQL with the TimescaleDB extension)
    - POSTGRES: a standard PostgreSQL service

    VECTOR is deprecated and should not be used.

    - `"TIMESCALEDB"`

    - `"POSTGRES"`

    - `"VECTOR"`

  - `status: "QUEUED" or "DELETING" or "CONFIGURING" or 8 more`

    The current deployment status of the service:

    - QUEUED: the create request has been submitted and is queued
    - DELETING: the service is being deleted
    - CONFIGURING: the service is up but still completing configuration
    - READY: fully configured and serving traffic
    - DELETED: the service has been deleted
    - UNSTABLE: the service was ready but is not currently reachable
    - PAUSING: the service is being paused
    - PAUSED: the service is paused (temporarily shut down)
    - RESUMING: the service is resuming after being paused
    - UPGRADING: the service is being updated

    OPTIMIZING is deprecated and should not be used.

    - `"QUEUED"`

    - `"DELETING"`

    - `"CONFIGURING"`

    - `"READY"`

    - `"DELETED"`

    - `"UNSTABLE"`

    - `"PAUSING"`

    - `"PAUSED"`

    - `"RESUMING"`

    - `"UPGRADING"`

    - `"OPTIMIZING"`

  - `connection_pooler: optional ConnectionPooler`

    Connection pooler configuration for a service.

    - `endpoint: optional Endpoint`

      A network endpoint for connecting to a service.

      - `host: optional string`

        The hostname of the endpoint.

      - `port: optional number`

        The port of the endpoint.

  - `data_tiering: optional object { enabled }`

    Data tiering configuration for a service.

    - `enabled: optional boolean`

      Whether tiered storage is enabled for this service.

  - `endpoint: optional Endpoint`

    A network endpoint for connecting to a service.

  - `forked_from: optional object { is_standby, project_id, service_id }`

    The service this service was forked from.

    - `is_standby: optional boolean`

      Whether this service is a standby of the parent service.

    - `project_id: optional string`

      The project of the parent service.

    - `service_id: optional string`

      The ID of the parent service.

  - `ha_replicas: optional object { replica_count, sync_replica_count }`

    High-availability replica configuration for a service.

    - `replica_count: optional number`

      Number of high-availability replicas (all replicas are asynchronous by default).

    - `sync_replica_count: optional number`

      Number of synchronous high-availability replicas.

  - `initial_password: optional string`

    The initial password for the service.

  - `metadata: optional object { environment }`

    Additional metadata for the service.

    - `environment: optional string`

      Environment tag for the service.

  - `metrics: optional object { cpu_millicores, memory_mb, milli_cpu, storage_mb }`

    Resource usage metrics for the service.

    - `cpu_millicores: optional number`

      CPU usage in millicores.

    - `memory_mb: optional number`

      Memory usage in megabytes.

    - `milli_cpu: optional number`

      Deprecated. Use `cpu_millicores` instead.

    - `storage_mb: optional number`

      Storage usage in megabytes.

  - `read_replica_sets: optional array of ReadReplicaSet`

    The read replica sets attached to the service.

    - `id: string`

      The unique identifier for the read replica set.

    - `cpu_millis: number`

      CPU allocation in milli-cores.

    - `memory_gbs: number`

      Memory allocation in gigabytes.

    - `name: string`

      The name of the read replica set.

    - `nodes: number`

      Number of nodes in the replica set.

    - `service_id: string`

      The ID of the parent service this read replica set was created from.

    - `status: "creating" or "active" or "resizing" or 2 more`

      The current status of the read replica set:

      - creating: the replica set is being provisioned
      - active: the replica set is provisioned and serving traffic
      - resizing: the replica set is being resized
      - deleting: the replica set is being deleted
      - error: the replica set is in an error state

      - `"creating"`

      - `"active"`

      - `"resizing"`

      - `"deleting"`

      - `"error"`

    - `connection_pooler: optional ConnectionPooler`

      Connection pooler configuration for a service.

    - `endpoint: optional Endpoint`

      A network endpoint for connecting to a service.

    - `metadata: optional object { environment }`

      Additional metadata for the read replica set.

      - `environment: optional string`

        Environment tag for the read replica set.

  - `vpc_endpoint: optional object { host, port, vpc_id }`

    VPC endpoint configuration for connecting to a service over VPC peering.

    - `host: optional string`

      The hostname for connecting to the service over VPC peering.

    - `port: optional number`

      The port for connecting to the service over VPC peering.

    - `vpc_id: optional string`

      The ID of the VPC the endpoint is associated with.

  - `vpcEndpoint: optional object { host, port, vpc_id }`

    VPC endpoint configuration for connecting to a service over VPC peering.

    - `host: optional string`

      The hostname for connecting to the service over VPC peering.

    - `port: optional number`

      The port for connecting to the service over VPC peering.

    - `vpc_id: optional string`

      The ID of the VPC the endpoint is associated with.

### Example

```http
curl https://console.cloud.tigerdata.com/public/api/v1/projects/$PROJECT_ID/services/$SERVICE_ID/forkService \
    -H 'Content-Type: application/json' \
    -H "Authorization: Bearer $TIGER_CLOUD_API_KEY" \
    -d '{
          "fork_strategy": "LAST_SNAPSHOT",
          "cpu_millis": "1000",
          "memory_gbs": "4",
          "name": "my-production-db-fork",
          "target_time": "2024-01-01T00:00:00Z"
        }'
```

#### Response

```json
{
  "created": "2025-01-15T09:30:00Z",
  "name": "my-production-db",
  "project_id": "rp1pz7uyae",
  "region_code": "us-east-1",
  "resources": [
    {
      "id": "n4ph2tqz8r",
      "spec": {
        "cpu_millis": 1000,
        "memory_gbs": 4,
        "volume_type": "gp3"
      }
    }
  ],
  "service_id": "kd9w2xp4mz",
  "service_type": "TIMESCALEDB",
  "status": "QUEUED",
  "connection_pooler": {
    "endpoint": {
      "host": "i4wmp4crev.oec7sxsza2.tsdb.cloud.timescale.com",
      "port": 32625
    }
  },
  "data_tiering": {
    "enabled": false
  },
  "endpoint": {
    "host": "i4wmp4crev.oec7sxsza2.tsdb.cloud.timescale.com",
    "port": 32625
  },
  "forked_from": {
    "is_standby": false,
    "project_id": "rp1pz7uyae",
    "service_id": "kd9w2xp4mz"
  },
  "ha_replicas": {
    "replica_count": 1,
    "sync_replica_count": 1
  },
  "initial_password": "a-very-secure-initial-password",
  "metadata": {
    "environment": "PROD"
  },
  "metrics": {
    "cpu_millicores": 250,
    "memory_mb": 512,
    "milli_cpu": 250,
    "storage_mb": 1024
  },
  "read_replica_sets": [
    {
      "id": "alb8jicdpr",
      "cpu_millis": 250,
      "memory_gbs": 1,
      "name": "reporting-replica-1",
      "nodes": 2,
      "service_id": "d1k5vk7hf2",
      "status": "active",
      "connection_pooler": {
        "endpoint": {
          "host": "i4wmp4crev.oec7sxsza2.tsdb.cloud.timescale.com",
          "port": 32625
        }
      },
      "endpoint": {
        "host": "i4wmp4crev.oec7sxsza2.tsdb.cloud.timescale.com",
        "port": 32625
      },
      "metadata": {
        "environment": "PROD"
      }
    }
  ],
  "vpc_endpoint": {
    "host": "i4wmp4crev.oec7sxsza2.tsdb.cloud.timescale.com",
    "port": 5432,
    "vpc_id": "1337"
  },
  "vpcEndpoint": {
    "host": "i4wmp4crev.oec7sxsza2.tsdb.cloud.timescale.com",
    "port": 5432,
    "vpc_id": "1337"
  }
}
```

## Update Service Password

**post** `/projects/{project_id}/services/{service_id}/updatePassword`

Sets a new master password for the service within a project.

### Path Parameters

- `project_id: string`

- `service_id: string`

### Body Parameters

- `password: string`

  The new password.

### Example

```http
curl https://console.cloud.tigerdata.com/public/api/v1/projects/$PROJECT_ID/services/$SERVICE_ID/updatePassword \
    -H 'Content-Type: application/json' \
    -H "Authorization: Bearer $TIGER_CLOUD_API_KEY" \
    -d '{
          "password": "a-very-secure-new-password"
        }'
```

## Set Environment for a Service

**post** `/projects/{project_id}/services/{service_id}/setEnvironment`

Sets the environment type for the service.

### Path Parameters

- `project_id: string`

- `service_id: string`

### Body Parameters

- `environment: "PROD" or "DEV"`

  The target environment for the service:

  - PROD: a production environment
  - DEV: a development environment

  - `"PROD"`

  - `"DEV"`

### Returns

- `message: optional string`

### Example

```http
curl https://console.cloud.tigerdata.com/public/api/v1/projects/$PROJECT_ID/services/$SERVICE_ID/setEnvironment \
    -H 'Content-Type: application/json' \
    -H "Authorization: Bearer $TIGER_CLOUD_API_KEY" \
    -d '{
          "environment": "PROD"
        }'
```

#### Response

```json
{
  "message": "Action completed successfully."
}
```

## Get service logs

**get** `/projects/{project_id}/services/{service_id}/logs`

Fetch logs for a specific service. Returns up to 500 log entries in reverse
chronological order. Supports cursor-based pagination via the `cursor` parameter
and the `last_cursor` field in the response.

Use the returned `last_cursor` value as the `cursor` parameter on subsequent
requests to page through all available logs.

### Path Parameters

- `project_id: string`

- `service_id: string`

### Query Parameters

- `cursor: optional string`

  Opaque pagination cursor returned as `last_cursor` in a previous response.
  When provided, returns the next page of logs older than the cursor position.

- `node: optional number`

  Specific service node to fetch logs from (for multi-node services).

- `search: optional array of string`

  Full-text search terms to filter log lines. Repeat the parameter for multiple values
  (e.g. `?search=slow+query&search=ERROR`).

- `severities: optional array of string`

  Severity levels to filter results. Repeat the parameter for multiple values
  (e.g. `?severities=ERROR&severities=WARNING`).

- `since: optional string`

  Lower bound timestamp — fetch logs after this time (RFC3339 format).

- `until: optional string`

  Upper bound timestamp — fetch logs before this time (RFC3339 format, e.g., 2024-01-15T10:00:00Z).

### Returns

- `logs: array of string`

  Array of log message strings. Preserved for backwards compatibility.

- `entries: optional array of object { message, severity, timestamp }`

  Structured log entries with timestamp and severity metadata.
  Entries are in the same order as logs and can be used in place of it
  by callers that need structured data.

  - `message: string`

    Log message text.

  - `severity: string`

    PostgreSQL severity level (e.g. LOG, WARNING, ERROR, FATAL).

  - `timestamp: string`

    Timestamp of the log entry (RFC3339 format).

- `last_cursor: optional string`

  Opaque cursor for the next page of results. Present when more log entries
  exist older than the last entry in this response. Pass this value as the
  `cursor` query parameter to retrieve the next page. Absent when there are
  no further results.

- `lastCursor: optional string`

  Deprecated. Use `last_cursor` instead.

### Example

```http
curl https://console.cloud.tigerdata.com/public/api/v1/projects/$PROJECT_ID/services/$SERVICE_ID/logs \
    -H "Authorization: Bearer $TIGER_CLOUD_API_KEY"
```

#### Response

```json
{
  "logs": [
    "string"
  ],
  "entries": [
    {
      "message": "database system is ready to accept connections",
      "severity": "LOG",
      "timestamp": "2025-01-15T09:30:00Z"
    }
  ],
  "last_cursor": "eyJ0cyI6IjIwMjUtMDEtMTVUMDk6MzA6MDBaIn0=",
  "lastCursor": "eyJ0cyI6IjIwMjUtMDEtMTVUMDk6MzA6MDBaIn0="
}
```

## Change HA configuration for a Service

**post** `/projects/{project_id}/services/{service_id}/setHA`

Changes the HA configuration for a specific service. This is an asynchronous operation.

### Path Parameters

- `project_id: string`

- `service_id: string`

### Body Parameters

- `replica_count: optional number`

  Number of high-availability replicas (all replicas are asynchronous by default).

- `sync_replica_count: optional number`

  Number of synchronous high-availability replicas.

### Returns

- `Service object { created, name, project_id, 16 more }`

  A database service and its current configuration.

  - `created: string`

    Creation timestamp.

  - `name: string`

    The name of the service.

  - `project_id: string`

    The project this service belongs to.

  - `region_code: string`

    The cloud region where the service is hosted.

  - `resources: array of object { id, spec }`

    List of resources allocated to the service.

    - `id: optional string`

      Resource identifier.

    - `spec: optional object { cpu_millis, memory_gbs, volume_type }`

      Resource specification.

      - `cpu_millis: optional number`

        CPU allocation in millicores.

      - `memory_gbs: optional number`

        Memory allocation in gigabytes.

      - `volume_type: optional string`

        Type of storage volume.

  - `service_id: string`

    The unique identifier for the service.

  - `service_type: "TIMESCALEDB" or "POSTGRES" or "VECTOR"`

    The type of the service:

    - TIMESCALEDB: a TimescaleDB service (PostgreSQL with the TimescaleDB extension)
    - POSTGRES: a standard PostgreSQL service

    VECTOR is deprecated and should not be used.

    - `"TIMESCALEDB"`

    - `"POSTGRES"`

    - `"VECTOR"`

  - `status: "QUEUED" or "DELETING" or "CONFIGURING" or 8 more`

    The current deployment status of the service:

    - QUEUED: the create request has been submitted and is queued
    - DELETING: the service is being deleted
    - CONFIGURING: the service is up but still completing configuration
    - READY: fully configured and serving traffic
    - DELETED: the service has been deleted
    - UNSTABLE: the service was ready but is not currently reachable
    - PAUSING: the service is being paused
    - PAUSED: the service is paused (temporarily shut down)
    - RESUMING: the service is resuming after being paused
    - UPGRADING: the service is being updated

    OPTIMIZING is deprecated and should not be used.

    - `"QUEUED"`

    - `"DELETING"`

    - `"CONFIGURING"`

    - `"READY"`

    - `"DELETED"`

    - `"UNSTABLE"`

    - `"PAUSING"`

    - `"PAUSED"`

    - `"RESUMING"`

    - `"UPGRADING"`

    - `"OPTIMIZING"`

  - `connection_pooler: optional ConnectionPooler`

    Connection pooler configuration for a service.

    - `endpoint: optional Endpoint`

      A network endpoint for connecting to a service.

      - `host: optional string`

        The hostname of the endpoint.

      - `port: optional number`

        The port of the endpoint.

  - `data_tiering: optional object { enabled }`

    Data tiering configuration for a service.

    - `enabled: optional boolean`

      Whether tiered storage is enabled for this service.

  - `endpoint: optional Endpoint`

    A network endpoint for connecting to a service.

  - `forked_from: optional object { is_standby, project_id, service_id }`

    The service this service was forked from.

    - `is_standby: optional boolean`

      Whether this service is a standby of the parent service.

    - `project_id: optional string`

      The project of the parent service.

    - `service_id: optional string`

      The ID of the parent service.

  - `ha_replicas: optional object { replica_count, sync_replica_count }`

    High-availability replica configuration for a service.

    - `replica_count: optional number`

      Number of high-availability replicas (all replicas are asynchronous by default).

    - `sync_replica_count: optional number`

      Number of synchronous high-availability replicas.

  - `initial_password: optional string`

    The initial password for the service.

  - `metadata: optional object { environment }`

    Additional metadata for the service.

    - `environment: optional string`

      Environment tag for the service.

  - `metrics: optional object { cpu_millicores, memory_mb, milli_cpu, storage_mb }`

    Resource usage metrics for the service.

    - `cpu_millicores: optional number`

      CPU usage in millicores.

    - `memory_mb: optional number`

      Memory usage in megabytes.

    - `milli_cpu: optional number`

      Deprecated. Use `cpu_millicores` instead.

    - `storage_mb: optional number`

      Storage usage in megabytes.

  - `read_replica_sets: optional array of ReadReplicaSet`

    The read replica sets attached to the service.

    - `id: string`

      The unique identifier for the read replica set.

    - `cpu_millis: number`

      CPU allocation in milli-cores.

    - `memory_gbs: number`

      Memory allocation in gigabytes.

    - `name: string`

      The name of the read replica set.

    - `nodes: number`

      Number of nodes in the replica set.

    - `service_id: string`

      The ID of the parent service this read replica set was created from.

    - `status: "creating" or "active" or "resizing" or 2 more`

      The current status of the read replica set:

      - creating: the replica set is being provisioned
      - active: the replica set is provisioned and serving traffic
      - resizing: the replica set is being resized
      - deleting: the replica set is being deleted
      - error: the replica set is in an error state

      - `"creating"`

      - `"active"`

      - `"resizing"`

      - `"deleting"`

      - `"error"`

    - `connection_pooler: optional ConnectionPooler`

      Connection pooler configuration for a service.

    - `endpoint: optional Endpoint`

      A network endpoint for connecting to a service.

    - `metadata: optional object { environment }`

      Additional metadata for the read replica set.

      - `environment: optional string`

        Environment tag for the read replica set.

  - `vpc_endpoint: optional object { host, port, vpc_id }`

    VPC endpoint configuration for connecting to a service over VPC peering.

    - `host: optional string`

      The hostname for connecting to the service over VPC peering.

    - `port: optional number`

      The port for connecting to the service over VPC peering.

    - `vpc_id: optional string`

      The ID of the VPC the endpoint is associated with.

  - `vpcEndpoint: optional object { host, port, vpc_id }`

    VPC endpoint configuration for connecting to a service over VPC peering.

    - `host: optional string`

      The hostname for connecting to the service over VPC peering.

    - `port: optional number`

      The port for connecting to the service over VPC peering.

    - `vpc_id: optional string`

      The ID of the VPC the endpoint is associated with.

### Example

```http
curl https://console.cloud.tigerdata.com/public/api/v1/projects/$PROJECT_ID/services/$SERVICE_ID/setHA \
    -H 'Content-Type: application/json' \
    -H "Authorization: Bearer $TIGER_CLOUD_API_KEY" \
    -d '{
          "replica_count": 1,
          "sync_replica_count": 1
        }'
```

#### Response

```json
{
  "created": "2025-01-15T09:30:00Z",
  "name": "my-production-db",
  "project_id": "rp1pz7uyae",
  "region_code": "us-east-1",
  "resources": [
    {
      "id": "n4ph2tqz8r",
      "spec": {
        "cpu_millis": 1000,
        "memory_gbs": 4,
        "volume_type": "gp3"
      }
    }
  ],
  "service_id": "kd9w2xp4mz",
  "service_type": "TIMESCALEDB",
  "status": "QUEUED",
  "connection_pooler": {
    "endpoint": {
      "host": "i4wmp4crev.oec7sxsza2.tsdb.cloud.timescale.com",
      "port": 32625
    }
  },
  "data_tiering": {
    "enabled": false
  },
  "endpoint": {
    "host": "i4wmp4crev.oec7sxsza2.tsdb.cloud.timescale.com",
    "port": 32625
  },
  "forked_from": {
    "is_standby": false,
    "project_id": "rp1pz7uyae",
    "service_id": "kd9w2xp4mz"
  },
  "ha_replicas": {
    "replica_count": 1,
    "sync_replica_count": 1
  },
  "initial_password": "a-very-secure-initial-password",
  "metadata": {
    "environment": "PROD"
  },
  "metrics": {
    "cpu_millicores": 250,
    "memory_mb": 512,
    "milli_cpu": 250,
    "storage_mb": 1024
  },
  "read_replica_sets": [
    {
      "id": "alb8jicdpr",
      "cpu_millis": 250,
      "memory_gbs": 1,
      "name": "reporting-replica-1",
      "nodes": 2,
      "service_id": "d1k5vk7hf2",
      "status": "active",
      "connection_pooler": {
        "endpoint": {
          "host": "i4wmp4crev.oec7sxsza2.tsdb.cloud.timescale.com",
          "port": 32625
        }
      },
      "endpoint": {
        "host": "i4wmp4crev.oec7sxsza2.tsdb.cloud.timescale.com",
        "port": 32625
      },
      "metadata": {
        "environment": "PROD"
      }
    }
  ],
  "vpc_endpoint": {
    "host": "i4wmp4crev.oec7sxsza2.tsdb.cloud.timescale.com",
    "port": 5432,
    "vpc_id": "1337"
  },
  "vpcEndpoint": {
    "host": "i4wmp4crev.oec7sxsza2.tsdb.cloud.timescale.com",
    "port": 5432,
    "vpc_id": "1337"
  }
}
```

## Rename a Service

**post** `/projects/{project_id}/services/{service_id}/rename`

Updates the name of a specific service.

### Path Parameters

- `project_id: string`

- `service_id: string`

### Body Parameters

- `name: string`

  The new name for the service.

### Returns

- `Service object { created, name, project_id, 16 more }`

  A database service and its current configuration.

  - `created: string`

    Creation timestamp.

  - `name: string`

    The name of the service.

  - `project_id: string`

    The project this service belongs to.

  - `region_code: string`

    The cloud region where the service is hosted.

  - `resources: array of object { id, spec }`

    List of resources allocated to the service.

    - `id: optional string`

      Resource identifier.

    - `spec: optional object { cpu_millis, memory_gbs, volume_type }`

      Resource specification.

      - `cpu_millis: optional number`

        CPU allocation in millicores.

      - `memory_gbs: optional number`

        Memory allocation in gigabytes.

      - `volume_type: optional string`

        Type of storage volume.

  - `service_id: string`

    The unique identifier for the service.

  - `service_type: "TIMESCALEDB" or "POSTGRES" or "VECTOR"`

    The type of the service:

    - TIMESCALEDB: a TimescaleDB service (PostgreSQL with the TimescaleDB extension)
    - POSTGRES: a standard PostgreSQL service

    VECTOR is deprecated and should not be used.

    - `"TIMESCALEDB"`

    - `"POSTGRES"`

    - `"VECTOR"`

  - `status: "QUEUED" or "DELETING" or "CONFIGURING" or 8 more`

    The current deployment status of the service:

    - QUEUED: the create request has been submitted and is queued
    - DELETING: the service is being deleted
    - CONFIGURING: the service is up but still completing configuration
    - READY: fully configured and serving traffic
    - DELETED: the service has been deleted
    - UNSTABLE: the service was ready but is not currently reachable
    - PAUSING: the service is being paused
    - PAUSED: the service is paused (temporarily shut down)
    - RESUMING: the service is resuming after being paused
    - UPGRADING: the service is being updated

    OPTIMIZING is deprecated and should not be used.

    - `"QUEUED"`

    - `"DELETING"`

    - `"CONFIGURING"`

    - `"READY"`

    - `"DELETED"`

    - `"UNSTABLE"`

    - `"PAUSING"`

    - `"PAUSED"`

    - `"RESUMING"`

    - `"UPGRADING"`

    - `"OPTIMIZING"`

  - `connection_pooler: optional ConnectionPooler`

    Connection pooler configuration for a service.

    - `endpoint: optional Endpoint`

      A network endpoint for connecting to a service.

      - `host: optional string`

        The hostname of the endpoint.

      - `port: optional number`

        The port of the endpoint.

  - `data_tiering: optional object { enabled }`

    Data tiering configuration for a service.

    - `enabled: optional boolean`

      Whether tiered storage is enabled for this service.

  - `endpoint: optional Endpoint`

    A network endpoint for connecting to a service.

  - `forked_from: optional object { is_standby, project_id, service_id }`

    The service this service was forked from.

    - `is_standby: optional boolean`

      Whether this service is a standby of the parent service.

    - `project_id: optional string`

      The project of the parent service.

    - `service_id: optional string`

      The ID of the parent service.

  - `ha_replicas: optional object { replica_count, sync_replica_count }`

    High-availability replica configuration for a service.

    - `replica_count: optional number`

      Number of high-availability replicas (all replicas are asynchronous by default).

    - `sync_replica_count: optional number`

      Number of synchronous high-availability replicas.

  - `initial_password: optional string`

    The initial password for the service.

  - `metadata: optional object { environment }`

    Additional metadata for the service.

    - `environment: optional string`

      Environment tag for the service.

  - `metrics: optional object { cpu_millicores, memory_mb, milli_cpu, storage_mb }`

    Resource usage metrics for the service.

    - `cpu_millicores: optional number`

      CPU usage in millicores.

    - `memory_mb: optional number`

      Memory usage in megabytes.

    - `milli_cpu: optional number`

      Deprecated. Use `cpu_millicores` instead.

    - `storage_mb: optional number`

      Storage usage in megabytes.

  - `read_replica_sets: optional array of ReadReplicaSet`

    The read replica sets attached to the service.

    - `id: string`

      The unique identifier for the read replica set.

    - `cpu_millis: number`

      CPU allocation in milli-cores.

    - `memory_gbs: number`

      Memory allocation in gigabytes.

    - `name: string`

      The name of the read replica set.

    - `nodes: number`

      Number of nodes in the replica set.

    - `service_id: string`

      The ID of the parent service this read replica set was created from.

    - `status: "creating" or "active" or "resizing" or 2 more`

      The current status of the read replica set:

      - creating: the replica set is being provisioned
      - active: the replica set is provisioned and serving traffic
      - resizing: the replica set is being resized
      - deleting: the replica set is being deleted
      - error: the replica set is in an error state

      - `"creating"`

      - `"active"`

      - `"resizing"`

      - `"deleting"`

      - `"error"`

    - `connection_pooler: optional ConnectionPooler`

      Connection pooler configuration for a service.

    - `endpoint: optional Endpoint`

      A network endpoint for connecting to a service.

    - `metadata: optional object { environment }`

      Additional metadata for the read replica set.

      - `environment: optional string`

        Environment tag for the read replica set.

  - `vpc_endpoint: optional object { host, port, vpc_id }`

    VPC endpoint configuration for connecting to a service over VPC peering.

    - `host: optional string`

      The hostname for connecting to the service over VPC peering.

    - `port: optional number`

      The port for connecting to the service over VPC peering.

    - `vpc_id: optional string`

      The ID of the VPC the endpoint is associated with.

  - `vpcEndpoint: optional object { host, port, vpc_id }`

    VPC endpoint configuration for connecting to a service over VPC peering.

    - `host: optional string`

      The hostname for connecting to the service over VPC peering.

    - `port: optional number`

      The port for connecting to the service over VPC peering.

    - `vpc_id: optional string`

      The ID of the VPC the endpoint is associated with.

### Example

```http
curl https://console.cloud.tigerdata.com/public/api/v1/projects/$PROJECT_ID/services/$SERVICE_ID/rename \
    -H 'Content-Type: application/json' \
    -H "Authorization: Bearer $TIGER_CLOUD_API_KEY" \
    -d '{
          "name": "my-renamed-service"
        }'
```

#### Response

```json
{
  "created": "2025-01-15T09:30:00Z",
  "name": "my-production-db",
  "project_id": "rp1pz7uyae",
  "region_code": "us-east-1",
  "resources": [
    {
      "id": "n4ph2tqz8r",
      "spec": {
        "cpu_millis": 1000,
        "memory_gbs": 4,
        "volume_type": "gp3"
      }
    }
  ],
  "service_id": "kd9w2xp4mz",
  "service_type": "TIMESCALEDB",
  "status": "QUEUED",
  "connection_pooler": {
    "endpoint": {
      "host": "i4wmp4crev.oec7sxsza2.tsdb.cloud.timescale.com",
      "port": 32625
    }
  },
  "data_tiering": {
    "enabled": false
  },
  "endpoint": {
    "host": "i4wmp4crev.oec7sxsza2.tsdb.cloud.timescale.com",
    "port": 32625
  },
  "forked_from": {
    "is_standby": false,
    "project_id": "rp1pz7uyae",
    "service_id": "kd9w2xp4mz"
  },
  "ha_replicas": {
    "replica_count": 1,
    "sync_replica_count": 1
  },
  "initial_password": "a-very-secure-initial-password",
  "metadata": {
    "environment": "PROD"
  },
  "metrics": {
    "cpu_millicores": 250,
    "memory_mb": 512,
    "milli_cpu": 250,
    "storage_mb": 1024
  },
  "read_replica_sets": [
    {
      "id": "alb8jicdpr",
      "cpu_millis": 250,
      "memory_gbs": 1,
      "name": "reporting-replica-1",
      "nodes": 2,
      "service_id": "d1k5vk7hf2",
      "status": "active",
      "connection_pooler": {
        "endpoint": {
          "host": "i4wmp4crev.oec7sxsza2.tsdb.cloud.timescale.com",
          "port": 32625
        }
      },
      "endpoint": {
        "host": "i4wmp4crev.oec7sxsza2.tsdb.cloud.timescale.com",
        "port": 32625
      },
      "metadata": {
        "environment": "PROD"
      }
    }
  ],
  "vpc_endpoint": {
    "host": "i4wmp4crev.oec7sxsza2.tsdb.cloud.timescale.com",
    "port": 5432,
    "vpc_id": "1337"
  },
  "vpcEndpoint": {
    "host": "i4wmp4crev.oec7sxsza2.tsdb.cloud.timescale.com",
    "port": 5432,
    "vpc_id": "1337"
  }
}
```

## Enable Data Tiering for a Service

**post** `/projects/{project_id}/services/{service_id}/enableDataTiering`

Enables tiered storage on the service. Tiering policies move older,
rarely-accessed data from the high-performance storage tier to a
low-cost object storage tier. Tiered data stays queryable but becomes
read-only.

There is no way to disable tiering through this API. Contact Tiger
Data support if you need to turn it off.

### Path Parameters

- `project_id: string`

- `service_id: string`

### Returns

- `Service object { created, name, project_id, 16 more }`

  A database service and its current configuration.

  - `created: string`

    Creation timestamp.

  - `name: string`

    The name of the service.

  - `project_id: string`

    The project this service belongs to.

  - `region_code: string`

    The cloud region where the service is hosted.

  - `resources: array of object { id, spec }`

    List of resources allocated to the service.

    - `id: optional string`

      Resource identifier.

    - `spec: optional object { cpu_millis, memory_gbs, volume_type }`

      Resource specification.

      - `cpu_millis: optional number`

        CPU allocation in millicores.

      - `memory_gbs: optional number`

        Memory allocation in gigabytes.

      - `volume_type: optional string`

        Type of storage volume.

  - `service_id: string`

    The unique identifier for the service.

  - `service_type: "TIMESCALEDB" or "POSTGRES" or "VECTOR"`

    The type of the service:

    - TIMESCALEDB: a TimescaleDB service (PostgreSQL with the TimescaleDB extension)
    - POSTGRES: a standard PostgreSQL service

    VECTOR is deprecated and should not be used.

    - `"TIMESCALEDB"`

    - `"POSTGRES"`

    - `"VECTOR"`

  - `status: "QUEUED" or "DELETING" or "CONFIGURING" or 8 more`

    The current deployment status of the service:

    - QUEUED: the create request has been submitted and is queued
    - DELETING: the service is being deleted
    - CONFIGURING: the service is up but still completing configuration
    - READY: fully configured and serving traffic
    - DELETED: the service has been deleted
    - UNSTABLE: the service was ready but is not currently reachable
    - PAUSING: the service is being paused
    - PAUSED: the service is paused (temporarily shut down)
    - RESUMING: the service is resuming after being paused
    - UPGRADING: the service is being updated

    OPTIMIZING is deprecated and should not be used.

    - `"QUEUED"`

    - `"DELETING"`

    - `"CONFIGURING"`

    - `"READY"`

    - `"DELETED"`

    - `"UNSTABLE"`

    - `"PAUSING"`

    - `"PAUSED"`

    - `"RESUMING"`

    - `"UPGRADING"`

    - `"OPTIMIZING"`

  - `connection_pooler: optional ConnectionPooler`

    Connection pooler configuration for a service.

    - `endpoint: optional Endpoint`

      A network endpoint for connecting to a service.

      - `host: optional string`

        The hostname of the endpoint.

      - `port: optional number`

        The port of the endpoint.

  - `data_tiering: optional object { enabled }`

    Data tiering configuration for a service.

    - `enabled: optional boolean`

      Whether tiered storage is enabled for this service.

  - `endpoint: optional Endpoint`

    A network endpoint for connecting to a service.

  - `forked_from: optional object { is_standby, project_id, service_id }`

    The service this service was forked from.

    - `is_standby: optional boolean`

      Whether this service is a standby of the parent service.

    - `project_id: optional string`

      The project of the parent service.

    - `service_id: optional string`

      The ID of the parent service.

  - `ha_replicas: optional object { replica_count, sync_replica_count }`

    High-availability replica configuration for a service.

    - `replica_count: optional number`

      Number of high-availability replicas (all replicas are asynchronous by default).

    - `sync_replica_count: optional number`

      Number of synchronous high-availability replicas.

  - `initial_password: optional string`

    The initial password for the service.

  - `metadata: optional object { environment }`

    Additional metadata for the service.

    - `environment: optional string`

      Environment tag for the service.

  - `metrics: optional object { cpu_millicores, memory_mb, milli_cpu, storage_mb }`

    Resource usage metrics for the service.

    - `cpu_millicores: optional number`

      CPU usage in millicores.

    - `memory_mb: optional number`

      Memory usage in megabytes.

    - `milli_cpu: optional number`

      Deprecated. Use `cpu_millicores` instead.

    - `storage_mb: optional number`

      Storage usage in megabytes.

  - `read_replica_sets: optional array of ReadReplicaSet`

    The read replica sets attached to the service.

    - `id: string`

      The unique identifier for the read replica set.

    - `cpu_millis: number`

      CPU allocation in milli-cores.

    - `memory_gbs: number`

      Memory allocation in gigabytes.

    - `name: string`

      The name of the read replica set.

    - `nodes: number`

      Number of nodes in the replica set.

    - `service_id: string`

      The ID of the parent service this read replica set was created from.

    - `status: "creating" or "active" or "resizing" or 2 more`

      The current status of the read replica set:

      - creating: the replica set is being provisioned
      - active: the replica set is provisioned and serving traffic
      - resizing: the replica set is being resized
      - deleting: the replica set is being deleted
      - error: the replica set is in an error state

      - `"creating"`

      - `"active"`

      - `"resizing"`

      - `"deleting"`

      - `"error"`

    - `connection_pooler: optional ConnectionPooler`

      Connection pooler configuration for a service.

    - `endpoint: optional Endpoint`

      A network endpoint for connecting to a service.

    - `metadata: optional object { environment }`

      Additional metadata for the read replica set.

      - `environment: optional string`

        Environment tag for the read replica set.

  - `vpc_endpoint: optional object { host, port, vpc_id }`

    VPC endpoint configuration for connecting to a service over VPC peering.

    - `host: optional string`

      The hostname for connecting to the service over VPC peering.

    - `port: optional number`

      The port for connecting to the service over VPC peering.

    - `vpc_id: optional string`

      The ID of the VPC the endpoint is associated with.

  - `vpcEndpoint: optional object { host, port, vpc_id }`

    VPC endpoint configuration for connecting to a service over VPC peering.

    - `host: optional string`

      The hostname for connecting to the service over VPC peering.

    - `port: optional number`

      The port for connecting to the service over VPC peering.

    - `vpc_id: optional string`

      The ID of the VPC the endpoint is associated with.

### Example

```http
curl https://console.cloud.tigerdata.com/public/api/v1/projects/$PROJECT_ID/services/$SERVICE_ID/enableDataTiering \
    -X POST \
    -H "Authorization: Bearer $TIGER_CLOUD_API_KEY"
```

#### Response

```json
{
  "created": "2025-01-15T09:30:00Z",
  "name": "my-production-db",
  "project_id": "rp1pz7uyae",
  "region_code": "us-east-1",
  "resources": [
    {
      "id": "n4ph2tqz8r",
      "spec": {
        "cpu_millis": 1000,
        "memory_gbs": 4,
        "volume_type": "gp3"
      }
    }
  ],
  "service_id": "kd9w2xp4mz",
  "service_type": "TIMESCALEDB",
  "status": "QUEUED",
  "connection_pooler": {
    "endpoint": {
      "host": "i4wmp4crev.oec7sxsza2.tsdb.cloud.timescale.com",
      "port": 32625
    }
  },
  "data_tiering": {
    "enabled": false
  },
  "endpoint": {
    "host": "i4wmp4crev.oec7sxsza2.tsdb.cloud.timescale.com",
    "port": 32625
  },
  "forked_from": {
    "is_standby": false,
    "project_id": "rp1pz7uyae",
    "service_id": "kd9w2xp4mz"
  },
  "ha_replicas": {
    "replica_count": 1,
    "sync_replica_count": 1
  },
  "initial_password": "a-very-secure-initial-password",
  "metadata": {
    "environment": "PROD"
  },
  "metrics": {
    "cpu_millicores": 250,
    "memory_mb": 512,
    "milli_cpu": 250,
    "storage_mb": 1024
  },
  "read_replica_sets": [
    {
      "id": "alb8jicdpr",
      "cpu_millis": 250,
      "memory_gbs": 1,
      "name": "reporting-replica-1",
      "nodes": 2,
      "service_id": "d1k5vk7hf2",
      "status": "active",
      "connection_pooler": {
        "endpoint": {
          "host": "i4wmp4crev.oec7sxsza2.tsdb.cloud.timescale.com",
          "port": 32625
        }
      },
      "endpoint": {
        "host": "i4wmp4crev.oec7sxsza2.tsdb.cloud.timescale.com",
        "port": 32625
      },
      "metadata": {
        "environment": "PROD"
      }
    }
  ],
  "vpc_endpoint": {
    "host": "i4wmp4crev.oec7sxsza2.tsdb.cloud.timescale.com",
    "port": 5432,
    "vpc_id": "1337"
  },
  "vpcEndpoint": {
    "host": "i4wmp4crev.oec7sxsza2.tsdb.cloud.timescale.com",
    "port": 5432,
    "vpc_id": "1337"
  }
}
```

## Domain Types

### Connection Pooler

- `ConnectionPooler object { endpoint }`

  Connection pooler configuration for a service.

  - `endpoint: optional Endpoint`

    A network endpoint for connecting to a service.

    - `host: optional string`

      The hostname of the endpoint.

    - `port: optional number`

      The port of the endpoint.

### Endpoint

- `Endpoint object { host, port }`

  A network endpoint for connecting to a service.

  - `host: optional string`

    The hostname of the endpoint.

  - `port: optional number`

    The port of the endpoint.

### Environment Tag

- `EnvironmentTag = "DEV" or "PROD"`

  The environment tag for the service:

  - DEV: a development environment
  - PROD: a production environment

  - `"DEV"`

  - `"PROD"`

### Resize Input

- `ResizeInput object { cpu_millis, memory_gbs }`

  At least one of cpu_millis, memory_gbs, or iops must be provided. cpu_millis and memory_gbs must be provided together.

  - `cpu_millis: optional string`

    The new CPU allocation in milli-cores.

  - `memory_gbs: optional string`

    The new memory allocation in gigabytes.

### Service

- `Service object { created, name, project_id, 16 more }`

  A database service and its current configuration.

  - `created: string`

    Creation timestamp.

  - `name: string`

    The name of the service.

  - `project_id: string`

    The project this service belongs to.

  - `region_code: string`

    The cloud region where the service is hosted.

  - `resources: array of object { id, spec }`

    List of resources allocated to the service.

    - `id: optional string`

      Resource identifier.

    - `spec: optional object { cpu_millis, memory_gbs, volume_type }`

      Resource specification.

      - `cpu_millis: optional number`

        CPU allocation in millicores.

      - `memory_gbs: optional number`

        Memory allocation in gigabytes.

      - `volume_type: optional string`

        Type of storage volume.

  - `service_id: string`

    The unique identifier for the service.

  - `service_type: "TIMESCALEDB" or "POSTGRES" or "VECTOR"`

    The type of the service:

    - TIMESCALEDB: a TimescaleDB service (PostgreSQL with the TimescaleDB extension)
    - POSTGRES: a standard PostgreSQL service

    VECTOR is deprecated and should not be used.

    - `"TIMESCALEDB"`

    - `"POSTGRES"`

    - `"VECTOR"`

  - `status: "QUEUED" or "DELETING" or "CONFIGURING" or 8 more`

    The current deployment status of the service:

    - QUEUED: the create request has been submitted and is queued
    - DELETING: the service is being deleted
    - CONFIGURING: the service is up but still completing configuration
    - READY: fully configured and serving traffic
    - DELETED: the service has been deleted
    - UNSTABLE: the service was ready but is not currently reachable
    - PAUSING: the service is being paused
    - PAUSED: the service is paused (temporarily shut down)
    - RESUMING: the service is resuming after being paused
    - UPGRADING: the service is being updated

    OPTIMIZING is deprecated and should not be used.

    - `"QUEUED"`

    - `"DELETING"`

    - `"CONFIGURING"`

    - `"READY"`

    - `"DELETED"`

    - `"UNSTABLE"`

    - `"PAUSING"`

    - `"PAUSED"`

    - `"RESUMING"`

    - `"UPGRADING"`

    - `"OPTIMIZING"`

  - `connection_pooler: optional ConnectionPooler`

    Connection pooler configuration for a service.

    - `endpoint: optional Endpoint`

      A network endpoint for connecting to a service.

      - `host: optional string`

        The hostname of the endpoint.

      - `port: optional number`

        The port of the endpoint.

  - `data_tiering: optional object { enabled }`

    Data tiering configuration for a service.

    - `enabled: optional boolean`

      Whether tiered storage is enabled for this service.

  - `endpoint: optional Endpoint`

    A network endpoint for connecting to a service.

  - `forked_from: optional object { is_standby, project_id, service_id }`

    The service this service was forked from.

    - `is_standby: optional boolean`

      Whether this service is a standby of the parent service.

    - `project_id: optional string`

      The project of the parent service.

    - `service_id: optional string`

      The ID of the parent service.

  - `ha_replicas: optional object { replica_count, sync_replica_count }`

    High-availability replica configuration for a service.

    - `replica_count: optional number`

      Number of high-availability replicas (all replicas are asynchronous by default).

    - `sync_replica_count: optional number`

      Number of synchronous high-availability replicas.

  - `initial_password: optional string`

    The initial password for the service.

  - `metadata: optional object { environment }`

    Additional metadata for the service.

    - `environment: optional string`

      Environment tag for the service.

  - `metrics: optional object { cpu_millicores, memory_mb, milli_cpu, storage_mb }`

    Resource usage metrics for the service.

    - `cpu_millicores: optional number`

      CPU usage in millicores.

    - `memory_mb: optional number`

      Memory usage in megabytes.

    - `milli_cpu: optional number`

      Deprecated. Use `cpu_millicores` instead.

    - `storage_mb: optional number`

      Storage usage in megabytes.

  - `read_replica_sets: optional array of ReadReplicaSet`

    The read replica sets attached to the service.

    - `id: string`

      The unique identifier for the read replica set.

    - `cpu_millis: number`

      CPU allocation in milli-cores.

    - `memory_gbs: number`

      Memory allocation in gigabytes.

    - `name: string`

      The name of the read replica set.

    - `nodes: number`

      Number of nodes in the replica set.

    - `service_id: string`

      The ID of the parent service this read replica set was created from.

    - `status: "creating" or "active" or "resizing" or 2 more`

      The current status of the read replica set:

      - creating: the replica set is being provisioned
      - active: the replica set is provisioned and serving traffic
      - resizing: the replica set is being resized
      - deleting: the replica set is being deleted
      - error: the replica set is in an error state

      - `"creating"`

      - `"active"`

      - `"resizing"`

      - `"deleting"`

      - `"error"`

    - `connection_pooler: optional ConnectionPooler`

      Connection pooler configuration for a service.

    - `endpoint: optional Endpoint`

      A network endpoint for connecting to a service.

    - `metadata: optional object { environment }`

      Additional metadata for the read replica set.

      - `environment: optional string`

        Environment tag for the read replica set.

  - `vpc_endpoint: optional object { host, port, vpc_id }`

    VPC endpoint configuration for connecting to a service over VPC peering.

    - `host: optional string`

      The hostname for connecting to the service over VPC peering.

    - `port: optional number`

      The port for connecting to the service over VPC peering.

    - `vpc_id: optional string`

      The ID of the VPC the endpoint is associated with.

  - `vpcEndpoint: optional object { host, port, vpc_id }`

    VPC endpoint configuration for connecting to a service over VPC peering.

    - `host: optional string`

      The hostname for connecting to the service over VPC peering.

    - `port: optional number`

      The port for connecting to the service over VPC peering.

    - `vpc_id: optional string`

      The ID of the VPC the endpoint is associated with.

### Service Vpc Input

- `ServiceVpcInput object { vpc_id }`

  Parameters for attaching a service to a VPC.

  - `vpc_id: string`

    The ID of the VPC to attach the service to.

### Set Environment Input

- `SetEnvironmentInput object { environment }`

  Parameters for setting a service's environment.

  - `environment: "PROD" or "DEV"`

    The target environment for the service:

    - PROD: a production environment
    - DEV: a development environment

    - `"PROD"`

    - `"DEV"`

### Service List Response

- `ServiceListResponse = array of Service`

  - `created: string`

    Creation timestamp.

  - `name: string`

    The name of the service.

  - `project_id: string`

    The project this service belongs to.

  - `region_code: string`

    The cloud region where the service is hosted.

  - `resources: array of object { id, spec }`

    List of resources allocated to the service.

    - `id: optional string`

      Resource identifier.

    - `spec: optional object { cpu_millis, memory_gbs, volume_type }`

      Resource specification.

      - `cpu_millis: optional number`

        CPU allocation in millicores.

      - `memory_gbs: optional number`

        Memory allocation in gigabytes.

      - `volume_type: optional string`

        Type of storage volume.

  - `service_id: string`

    The unique identifier for the service.

  - `service_type: "TIMESCALEDB" or "POSTGRES" or "VECTOR"`

    The type of the service:

    - TIMESCALEDB: a TimescaleDB service (PostgreSQL with the TimescaleDB extension)
    - POSTGRES: a standard PostgreSQL service

    VECTOR is deprecated and should not be used.

    - `"TIMESCALEDB"`

    - `"POSTGRES"`

    - `"VECTOR"`

  - `status: "QUEUED" or "DELETING" or "CONFIGURING" or 8 more`

    The current deployment status of the service:

    - QUEUED: the create request has been submitted and is queued
    - DELETING: the service is being deleted
    - CONFIGURING: the service is up but still completing configuration
    - READY: fully configured and serving traffic
    - DELETED: the service has been deleted
    - UNSTABLE: the service was ready but is not currently reachable
    - PAUSING: the service is being paused
    - PAUSED: the service is paused (temporarily shut down)
    - RESUMING: the service is resuming after being paused
    - UPGRADING: the service is being updated

    OPTIMIZING is deprecated and should not be used.

    - `"QUEUED"`

    - `"DELETING"`

    - `"CONFIGURING"`

    - `"READY"`

    - `"DELETED"`

    - `"UNSTABLE"`

    - `"PAUSING"`

    - `"PAUSED"`

    - `"RESUMING"`

    - `"UPGRADING"`

    - `"OPTIMIZING"`

  - `connection_pooler: optional ConnectionPooler`

    Connection pooler configuration for a service.

    - `endpoint: optional Endpoint`

      A network endpoint for connecting to a service.

      - `host: optional string`

        The hostname of the endpoint.

      - `port: optional number`

        The port of the endpoint.

  - `data_tiering: optional object { enabled }`

    Data tiering configuration for a service.

    - `enabled: optional boolean`

      Whether tiered storage is enabled for this service.

  - `endpoint: optional Endpoint`

    A network endpoint for connecting to a service.

  - `forked_from: optional object { is_standby, project_id, service_id }`

    The service this service was forked from.

    - `is_standby: optional boolean`

      Whether this service is a standby of the parent service.

    - `project_id: optional string`

      The project of the parent service.

    - `service_id: optional string`

      The ID of the parent service.

  - `ha_replicas: optional object { replica_count, sync_replica_count }`

    High-availability replica configuration for a service.

    - `replica_count: optional number`

      Number of high-availability replicas (all replicas are asynchronous by default).

    - `sync_replica_count: optional number`

      Number of synchronous high-availability replicas.

  - `initial_password: optional string`

    The initial password for the service.

  - `metadata: optional object { environment }`

    Additional metadata for the service.

    - `environment: optional string`

      Environment tag for the service.

  - `metrics: optional object { cpu_millicores, memory_mb, milli_cpu, storage_mb }`

    Resource usage metrics for the service.

    - `cpu_millicores: optional number`

      CPU usage in millicores.

    - `memory_mb: optional number`

      Memory usage in megabytes.

    - `milli_cpu: optional number`

      Deprecated. Use `cpu_millicores` instead.

    - `storage_mb: optional number`

      Storage usage in megabytes.

  - `read_replica_sets: optional array of ReadReplicaSet`

    The read replica sets attached to the service.

    - `id: string`

      The unique identifier for the read replica set.

    - `cpu_millis: number`

      CPU allocation in milli-cores.

    - `memory_gbs: number`

      Memory allocation in gigabytes.

    - `name: string`

      The name of the read replica set.

    - `nodes: number`

      Number of nodes in the replica set.

    - `service_id: string`

      The ID of the parent service this read replica set was created from.

    - `status: "creating" or "active" or "resizing" or 2 more`

      The current status of the read replica set:

      - creating: the replica set is being provisioned
      - active: the replica set is provisioned and serving traffic
      - resizing: the replica set is being resized
      - deleting: the replica set is being deleted
      - error: the replica set is in an error state

      - `"creating"`

      - `"active"`

      - `"resizing"`

      - `"deleting"`

      - `"error"`

    - `connection_pooler: optional ConnectionPooler`

      Connection pooler configuration for a service.

    - `endpoint: optional Endpoint`

      A network endpoint for connecting to a service.

    - `metadata: optional object { environment }`

      Additional metadata for the read replica set.

      - `environment: optional string`

        Environment tag for the read replica set.

  - `vpc_endpoint: optional object { host, port, vpc_id }`

    VPC endpoint configuration for connecting to a service over VPC peering.

    - `host: optional string`

      The hostname for connecting to the service over VPC peering.

    - `port: optional number`

      The port for connecting to the service over VPC peering.

    - `vpc_id: optional string`

      The ID of the VPC the endpoint is associated with.

  - `vpcEndpoint: optional object { host, port, vpc_id }`

    VPC endpoint configuration for connecting to a service over VPC peering.

    - `host: optional string`

      The hostname for connecting to the service over VPC peering.

    - `port: optional number`

      The port for connecting to the service over VPC peering.

    - `vpc_id: optional string`

      The ID of the VPC the endpoint is associated with.

### Service Attach To Vpc Response

- `ServiceAttachToVpcResponse object { message }`

  - `message: optional string`

### Service Detach From Vpc Response

- `ServiceDetachFromVpcResponse object { message }`

  - `message: optional string`

### Service Enable Pooler Response

- `ServiceEnablePoolerResponse object { message }`

  - `message: optional string`

### Service Disable Pooler Response

- `ServiceDisablePoolerResponse object { message }`

  - `message: optional string`

### Service Set Environment Response

- `ServiceSetEnvironmentResponse object { message }`

  - `message: optional string`

### Service Logs Response

- `ServiceLogsResponse object { logs, entries, last_cursor, lastCursor }`

  The logs for a service.

  - `logs: array of string`

    Array of log message strings. Preserved for backwards compatibility.

  - `entries: optional array of object { message, severity, timestamp }`

    Structured log entries with timestamp and severity metadata.
    Entries are in the same order as logs and can be used in place of it
    by callers that need structured data.

    - `message: string`

      Log message text.

    - `severity: string`

      PostgreSQL severity level (e.g. LOG, WARNING, ERROR, FATAL).

    - `timestamp: string`

      Timestamp of the log entry (RFC3339 format).

  - `last_cursor: optional string`

    Opaque cursor for the next page of results. Present when more log entries
    exist older than the last entry in this response. Pass this value as the
    `cursor` query parameter to retrieve the next page. Absent when there are
    no further results.

  - `lastCursor: optional string`

    Deprecated. Use `last_cursor` instead.

# Replica Sets

## Get Read Replica Sets

**get** `/projects/{project_id}/services/{service_id}/replicaSets`

Retrieves a list of all read replica sets associated with a primary service within a project.

### Path Parameters

- `project_id: string`

- `service_id: string`

### Returns

- `id: string`

  The unique identifier for the read replica set.

- `cpu_millis: number`

  CPU allocation in milli-cores.

- `memory_gbs: number`

  Memory allocation in gigabytes.

- `name: string`

  The name of the read replica set.

- `nodes: number`

  Number of nodes in the replica set.

- `service_id: string`

  The ID of the parent service this read replica set was created from.

- `status: "creating" or "active" or "resizing" or 2 more`

  The current status of the read replica set:

  - creating: the replica set is being provisioned
  - active: the replica set is provisioned and serving traffic
  - resizing: the replica set is being resized
  - deleting: the replica set is being deleted
  - error: the replica set is in an error state

  - `"creating"`

  - `"active"`

  - `"resizing"`

  - `"deleting"`

  - `"error"`

- `connection_pooler: optional ConnectionPooler`

  Connection pooler configuration for a service.

  - `endpoint: optional Endpoint`

    A network endpoint for connecting to a service.

    - `host: optional string`

      The hostname of the endpoint.

    - `port: optional number`

      The port of the endpoint.

- `endpoint: optional Endpoint`

  A network endpoint for connecting to a service.

- `metadata: optional object { environment }`

  Additional metadata for the read replica set.

  - `environment: optional string`

    Environment tag for the read replica set.

### Example

```http
curl https://console.cloud.tigerdata.com/public/api/v1/projects/$PROJECT_ID/services/$SERVICE_ID/replicaSets \
    -H "Authorization: Bearer $TIGER_CLOUD_API_KEY"
```

#### Response

```json
[
  {
    "id": "alb8jicdpr",
    "cpu_millis": 250,
    "memory_gbs": 1,
    "name": "reporting-replica-1",
    "nodes": 2,
    "service_id": "d1k5vk7hf2",
    "status": "active",
    "connection_pooler": {
      "endpoint": {
        "host": "i4wmp4crev.oec7sxsza2.tsdb.cloud.timescale.com",
        "port": 32625
      }
    },
    "endpoint": {
      "host": "i4wmp4crev.oec7sxsza2.tsdb.cloud.timescale.com",
      "port": 32625
    },
    "metadata": {
      "environment": "PROD"
    }
  }
]
```

## Create a Read Replica Set

**post** `/projects/{project_id}/services/{service_id}/replicaSets`

Creates a new read replica set for a service. This is an asynchronous operation.

### Path Parameters

- `project_id: string`

- `service_id: string`

### Body Parameters

- `cpu_millis: number`

  The initial CPU allocation in milli-cores.

- `memory_gbs: number`

  The initial memory allocation in gigabytes.

- `name: string`

  A human-readable name for the read replica.

- `nodes: number`

  Number of nodes to create in the replica set.

### Returns

- `ReadReplicaSet object { id, cpu_millis, memory_gbs, 7 more }`

  A set of read replicas for a service.

  - `id: string`

    The unique identifier for the read replica set.

  - `cpu_millis: number`

    CPU allocation in milli-cores.

  - `memory_gbs: number`

    Memory allocation in gigabytes.

  - `name: string`

    The name of the read replica set.

  - `nodes: number`

    Number of nodes in the replica set.

  - `service_id: string`

    The ID of the parent service this read replica set was created from.

  - `status: "creating" or "active" or "resizing" or 2 more`

    The current status of the read replica set:

    - creating: the replica set is being provisioned
    - active: the replica set is provisioned and serving traffic
    - resizing: the replica set is being resized
    - deleting: the replica set is being deleted
    - error: the replica set is in an error state

    - `"creating"`

    - `"active"`

    - `"resizing"`

    - `"deleting"`

    - `"error"`

  - `connection_pooler: optional ConnectionPooler`

    Connection pooler configuration for a service.

    - `endpoint: optional Endpoint`

      A network endpoint for connecting to a service.

      - `host: optional string`

        The hostname of the endpoint.

      - `port: optional number`

        The port of the endpoint.

  - `endpoint: optional Endpoint`

    A network endpoint for connecting to a service.

  - `metadata: optional object { environment }`

    Additional metadata for the read replica set.

    - `environment: optional string`

      Environment tag for the read replica set.

### Example

```http
curl https://console.cloud.tigerdata.com/public/api/v1/projects/$PROJECT_ID/services/$SERVICE_ID/replicaSets \
    -H 'Content-Type: application/json' \
    -H "Authorization: Bearer $TIGER_CLOUD_API_KEY" \
    -d '{
          "cpu_millis": 250,
          "memory_gbs": 1,
          "name": "my-reporting-replica",
          "nodes": 2
        }'
```

#### Response

```json
{
  "id": "alb8jicdpr",
  "cpu_millis": 250,
  "memory_gbs": 1,
  "name": "reporting-replica-1",
  "nodes": 2,
  "service_id": "d1k5vk7hf2",
  "status": "active",
  "connection_pooler": {
    "endpoint": {
      "host": "i4wmp4crev.oec7sxsza2.tsdb.cloud.timescale.com",
      "port": 32625
    }
  },
  "endpoint": {
    "host": "i4wmp4crev.oec7sxsza2.tsdb.cloud.timescale.com",
    "port": 32625
  },
  "metadata": {
    "environment": "PROD"
  }
}
```

## Delete a Read Replica Set

**delete** `/projects/{project_id}/services/{service_id}/replicaSets/{replica_set_id}`

Deletes a specific read replica set. This is an asynchronous operation.

### Path Parameters

- `project_id: string`

- `service_id: string`

- `replica_set_id: string`

### Example

```http
curl https://console.cloud.tigerdata.com/public/api/v1/projects/$PROJECT_ID/services/$SERVICE_ID/replicaSets/$REPLICA_SET_ID \
    -X DELETE \
    -H "Authorization: Bearer $TIGER_CLOUD_API_KEY"
```

## Resize a Read Replica Set

**post** `/projects/{project_id}/services/{service_id}/replicaSets/{replica_set_id}/resize`

Changes the resource allocation for a specific read replica set.

### Path Parameters

- `project_id: string`

- `service_id: string`

- `replica_set_id: string`

### Body Parameters

- `cpu_millis: optional string`

  The new CPU allocation in milli-cores.

- `memory_gbs: optional string`

  The new memory allocation in gigabytes.

### Returns

- `message: optional string`

### Example

```http
curl https://console.cloud.tigerdata.com/public/api/v1/projects/$PROJECT_ID/services/$SERVICE_ID/replicaSets/$REPLICA_SET_ID/resize \
    -H 'Content-Type: application/json' \
    -H "Authorization: Bearer $TIGER_CLOUD_API_KEY" \
    -d '{
          "cpu_millis": "1000",
          "memory_gbs": "4"
        }'
```

#### Response

```json
{
  "message": "Action completed successfully."
}
```

## Enable Connection Pooler for a Read Replica

**post** `/projects/{project_id}/services/{service_id}/replicaSets/{replica_set_id}/enablePooler`

Activates the connection pooler for a specific read replica set.

### Path Parameters

- `project_id: string`

- `service_id: string`

- `replica_set_id: string`

### Returns

- `message: optional string`

### Example

```http
curl https://console.cloud.tigerdata.com/public/api/v1/projects/$PROJECT_ID/services/$SERVICE_ID/replicaSets/$REPLICA_SET_ID/enablePooler \
    -X POST \
    -H "Authorization: Bearer $TIGER_CLOUD_API_KEY"
```

#### Response

```json
{
  "message": "Action completed successfully."
}
```

## Disable Connection Pooler for a Read Replica

**post** `/projects/{project_id}/services/{service_id}/replicaSets/{replica_set_id}/disablePooler`

Deactivates the connection pooler for a specific read replica set.

### Path Parameters

- `project_id: string`

- `service_id: string`

- `replica_set_id: string`

### Returns

- `message: optional string`

### Example

```http
curl https://console.cloud.tigerdata.com/public/api/v1/projects/$PROJECT_ID/services/$SERVICE_ID/replicaSets/$REPLICA_SET_ID/disablePooler \
    -X POST \
    -H "Authorization: Bearer $TIGER_CLOUD_API_KEY"
```

#### Response

```json
{
  "message": "Action completed successfully."
}
```

## Set Environment for a Read Replica

**post** `/projects/{project_id}/services/{service_id}/replicaSets/{replica_set_id}/setEnvironment`

Sets the environment type for the read replica set.

### Path Parameters

- `project_id: string`

- `service_id: string`

- `replica_set_id: string`

### Body Parameters

- `environment: "PROD" or "DEV"`

  The target environment for the service:

  - PROD: a production environment
  - DEV: a development environment

  - `"PROD"`

  - `"DEV"`

### Returns

- `message: optional string`

### Example

```http
curl https://console.cloud.tigerdata.com/public/api/v1/projects/$PROJECT_ID/services/$SERVICE_ID/replicaSets/$REPLICA_SET_ID/setEnvironment \
    -H 'Content-Type: application/json' \
    -H "Authorization: Bearer $TIGER_CLOUD_API_KEY" \
    -d '{
          "environment": "PROD"
        }'
```

#### Response

```json
{
  "message": "Action completed successfully."
}
```

## Domain Types

### Read Replica Set

- `ReadReplicaSet object { id, cpu_millis, memory_gbs, 7 more }`

  A set of read replicas for a service.

  - `id: string`

    The unique identifier for the read replica set.

  - `cpu_millis: number`

    CPU allocation in milli-cores.

  - `memory_gbs: number`

    Memory allocation in gigabytes.

  - `name: string`

    The name of the read replica set.

  - `nodes: number`

    Number of nodes in the replica set.

  - `service_id: string`

    The ID of the parent service this read replica set was created from.

  - `status: "creating" or "active" or "resizing" or 2 more`

    The current status of the read replica set:

    - creating: the replica set is being provisioned
    - active: the replica set is provisioned and serving traffic
    - resizing: the replica set is being resized
    - deleting: the replica set is being deleted
    - error: the replica set is in an error state

    - `"creating"`

    - `"active"`

    - `"resizing"`

    - `"deleting"`

    - `"error"`

  - `connection_pooler: optional ConnectionPooler`

    Connection pooler configuration for a service.

    - `endpoint: optional Endpoint`

      A network endpoint for connecting to a service.

      - `host: optional string`

        The hostname of the endpoint.

      - `port: optional number`

        The port of the endpoint.

  - `endpoint: optional Endpoint`

    A network endpoint for connecting to a service.

  - `metadata: optional object { environment }`

    Additional metadata for the read replica set.

    - `environment: optional string`

      Environment tag for the read replica set.

### Replica Set Retrieve Replica Sets Response

- `ReplicaSetRetrieveReplicaSetsResponse = array of ReadReplicaSet`

  - `id: string`

    The unique identifier for the read replica set.

  - `cpu_millis: number`

    CPU allocation in milli-cores.

  - `memory_gbs: number`

    Memory allocation in gigabytes.

  - `name: string`

    The name of the read replica set.

  - `nodes: number`

    Number of nodes in the replica set.

  - `service_id: string`

    The ID of the parent service this read replica set was created from.

  - `status: "creating" or "active" or "resizing" or 2 more`

    The current status of the read replica set:

    - creating: the replica set is being provisioned
    - active: the replica set is provisioned and serving traffic
    - resizing: the replica set is being resized
    - deleting: the replica set is being deleted
    - error: the replica set is in an error state

    - `"creating"`

    - `"active"`

    - `"resizing"`

    - `"deleting"`

    - `"error"`

  - `connection_pooler: optional ConnectionPooler`

    Connection pooler configuration for a service.

    - `endpoint: optional Endpoint`

      A network endpoint for connecting to a service.

      - `host: optional string`

        The hostname of the endpoint.

      - `port: optional number`

        The port of the endpoint.

  - `endpoint: optional Endpoint`

    A network endpoint for connecting to a service.

  - `metadata: optional object { environment }`

    Additional metadata for the read replica set.

    - `environment: optional string`

      Environment tag for the read replica set.

### Replica Set Resize Response

- `ReplicaSetResizeResponse object { message }`

  - `message: optional string`

### Replica Set Enable Pooler Response

- `ReplicaSetEnablePoolerResponse object { message }`

  - `message: optional string`

### Replica Set Disable Pooler Response

- `ReplicaSetDisablePoolerResponse object { message }`

  - `message: optional string`

### Replica Set Set Environment Response

- `ReplicaSetSetEnvironmentResponse object { message }`

  - `message: optional string`

# Metrics

## List available metric series

**get** `/projects/{project_id}/services/{service_id}/metrics/available-series`

Returns the names of all metric series available for a service.

### Path Parameters

- `project_id: string`

- `service_id: string`

### Example

```http
curl https://console.cloud.tigerdata.com/public/api/v1/projects/$PROJECT_ID/services/$SERVICE_ID/metrics/available-series \
    -H "Authorization: Bearer $TIGER_CLOUD_API_KEY"
```

#### Response

```json
[
  "string"
]
```

## Get a metric series

**post** `/projects/{project_id}/services/{service_id}/metrics/series`

Returns time-series data points for a named metric within a time window.
Use getServiceMetricsAvailableSeries to discover valid metric names.

Parameters are sent as a JSON body so callers can pass an unbounded
filter set without query-string length pressure. The response is a list
of MetricSeries, each carrying its label set as a structured map
alongside its per-bucket data points.

### Path Parameters

- `project_id: string`

- `service_id: string`

### Body Parameters

- `from: string`

  Start of the time window (RFC3339; nanosecond precision accepted).

- `metric_name: string`

  Metric series name. Use getServiceMetricsAvailableSeries to discover valid values.

- `to: string`

  End of the time window (RFC3339; nanosecond precision accepted).

- `bucket_seconds: optional number`

  Aggregation bucket size in seconds. Optional: when omitted the
  server picks a default that matches the window (roughly 1m for
  windows up to 1h, 1h for up to 30d, 1d beyond that). Minimum is
  60s (finer buckets don't add resolution given scrape intervals).
  Must be coarse enough for the window's tier; requests that ask
  for a finer bucket than the tier can produce are rejected.

- `filters: optional array of object { key, value, match_type }`

  Label filters applied to the series query. Recognized label names
  depend on the metric. The most common is `role` (value `primary` or
  `replica`). When `role` is omitted, some metrics default to primary
  and others return data for all roles (one series per role); pass an
  explicit role for deterministic results. Role label values in the
  response are lowercased.

  - `key: string`

    Label key to match against, e.g. `role`.

  - `value: string`

    Label value to match. Case sensitivity follows the underlying metric's storage convention.

  - `match_type: optional "EQUAL" or "NOT_EQUAL"`

    - `EQUAL`: the series must have the label equal to `value`.
    - `NOT_EQUAL`: the series must not have the label equal to `value`. A
      series missing the label entirely also matches. To exclude multiple
      values of the same label, pass multiple filters with that key.

    - `"EQUAL"`

    - `"NOT_EQUAL"`

- `fn: optional "RATE" or "INCREASE" or "SUM" or 10 more`

  Aggregation function applied to raw/pre-aggregated samples when
  collapsing them into one value per output bucket.

  - `RATE`: counter-reset-aware per-second rate of change.
  - `INCREASE`: counter-reset-aware total increase over the bucket.
  - `SUM`: sum of samples in the bucket.
  - `AVG`: mean of samples in the bucket.
  - `MIN`: minimum sample in the bucket.
  - `MAX`: maximum sample in the bucket.
  - `MIN_TOTAL` / `MAX_TOTAL`: minimum/maximum of the bucket's samples
    added together across every series first — for a metric with
    labels (e.g. one series per database) where the combined total,
    not any single series' own extremum, is the meaningful quantity
    (e.g. peak of total connections across all databases). `MIN`/`MAX`
    give the single most extreme individual series instead, which is
    the right answer when the metric is itself an extremum or a
    timestamp (e.g. longest-running transaction).
  - `COUNT`: number of samples in the bucket.
  - `P50` / `P90` / `P99`: approximate percentiles.
  - `LAST`: the most recent sample in the bucket.

  - `"RATE"`

  - `"INCREASE"`

  - `"SUM"`

  - `"AVG"`

  - `"MIN"`

  - `"MAX"`

  - `"MIN_TOTAL"`

  - `"MAX_TOTAL"`

  - `"COUNT"`

  - `"P50"`

  - `"P90"`

  - `"P99"`

  - `"LAST"`

- `group_by: optional array of string`

  Label keys to break the result into one series per distinct value
  combination. Optional: when omitted (or empty), all matching
  label sets collapse into a single series.

  Not accepted on the following metrics — requests are rejected
  with `INVALID_REQUEST`:

  - `timescale_cloud_system_cpu_total_millicores`
  - `timescale_cloud_system_cpu_usage_millicores`
  - `timescale_cloud_system_disk_io_read_bytes`
  - `timescale_cloud_system_disk_io_read_ops`
  - `timescale_cloud_system_disk_io_total_bytes`
  - `timescale_cloud_system_disk_io_total_ops`
  - `timescale_cloud_system_disk_io_write_bytes`
  - `timescale_cloud_system_disk_io_write_ops`
  - `timescale_cloud_system_disk_usage_bytes`
  - `timescale_cloud_system_memory_total_bytes`
  - `timescale_cloud_system_memory_usage_bytes`

### Returns

- `data: array of object { time, value }`

  Per-bucket data points for this label set.

  - `time: string`

    The bucket start timestamp.

  - `value: optional number`

    The aggregated value at this bucket, or null for a gap bucket with
    no collected data. Gap buckets are still emitted (one entry per
    bucket in the window), so this is null rather than omitted.

- `labels: map[string]`

  Label set identifying this series. The key set depends on the
  metric (e.g. `role`, `ordinal`).

### Example

```http
curl https://console.cloud.tigerdata.com/public/api/v1/projects/$PROJECT_ID/services/$SERVICE_ID/metrics/series \
    -H 'Content-Type: application/json' \
    -H "Authorization: Bearer $TIGER_CLOUD_API_KEY" \
    -d '{
          "from": "2026-06-25T10:00:00Z",
          "metric_name": "timescale_cloud_system_cpu_usage_millicores",
          "to": "2026-06-25T11:00:00Z",
          "bucket_seconds": 3600,
          "fn": "RATE",
          "group_by": [
            "role"
          ]
        }'
```

#### Response

```json
[
  {
    "data": [
      {
        "time": "2026-06-25T10:00:00Z",
        "value": 247.5
      }
    ],
    "labels": {
      "foo": "string"
    }
  }
]
```

## Domain Types

### Metric Available Series Response

- `MetricAvailableSeriesResponse = array of string`

### Metric Series Response

- `MetricSeriesResponse = array of object { data, labels }`

  - `data: array of object { time, value }`

    Per-bucket data points for this label set.

    - `time: string`

      The bucket start timestamp.

    - `value: optional number`

      The aggregated value at this bucket, or null for a gap bucket with
      no collected data. Gap buckets are still emitted (one entry per
      bucket in the window), so this is null rather than omitted.

  - `labels: map[string]`

    Label set identifying this series. The key set depends on the
    metric (e.g. `role`, `ordinal`).

# Details

## Get details about a metric

**get** `/projects/{project_id}/services/{service_id}/metrics/details/{metric_name}`

Returns descriptive metadata for a named metric: what it measures,
its type, default aggregation, and every label it can be filtered or
grouped by — its own labels plus the region/role/ordinal labels most
metrics also carry. Use getServiceMetricsAvailableSeries to discover
valid metric names.

### Path Parameters

- `project_id: string`

- `service_id: string`

- `metric_name: string`

### Returns

- `default_agg: "RATE" or "INCREASE" or "SUM" or 10 more`

  Aggregation function applied to raw/pre-aggregated samples when
  collapsing them into one value per output bucket.

  - `RATE`: counter-reset-aware per-second rate of change.
  - `INCREASE`: counter-reset-aware total increase over the bucket.
  - `SUM`: sum of samples in the bucket.
  - `AVG`: mean of samples in the bucket.
  - `MIN`: minimum sample in the bucket.
  - `MAX`: maximum sample in the bucket.
  - `MIN_TOTAL` / `MAX_TOTAL`: minimum/maximum of the bucket's samples
    added together across every series first — for a metric with
    labels (e.g. one series per database) where the combined total,
    not any single series' own extremum, is the meaningful quantity
    (e.g. peak of total connections across all databases). `MIN`/`MAX`
    give the single most extreme individual series instead, which is
    the right answer when the metric is itself an extremum or a
    timestamp (e.g. longest-running transaction).
  - `COUNT`: number of samples in the bucket.
  - `P50` / `P90` / `P99`: approximate percentiles.
  - `LAST`: the most recent sample in the bucket.

  - `"RATE"`

  - `"INCREASE"`

  - `"SUM"`

  - `"AVG"`

  - `"MIN"`

  - `"MAX"`

  - `"MIN_TOTAL"`

  - `"MAX_TOTAL"`

  - `"COUNT"`

  - `"P50"`

  - `"P90"`

  - `"P99"`

  - `"LAST"`

- `description: string`

  What this metric measures, or empty if undocumented.

- `labels: array of object { description, name }`

  All labels this metric can be filtered or grouped by: its own
  labels (e.g. datname on pg_stat_database_*) plus the
  region/role/ordinal labels most metrics also carry. Some
  metrics only attach a subset of those — e.g.
  pgbouncer-sourced metrics only get region, not role/ordinal.

  - `description: string`

    What this label identifies, or empty if undocumented.

  - `name: string`

    The label's key.

- `metric_name: string`

  Metric series name.

- `type: "GAUGE" or "COUNTER" or "HISTOGRAM" or "SUMMARY"`

  The shape of a metric's underlying data.

  - `GAUGE`: a value that can go up or down (e.g. a current connection count).
  - `COUNTER`: a value that only increases until it resets (e.g. total queries run).
  - `HISTOGRAM`: a distribution of observed values grouped into ranges.
  - `SUMMARY`: a distribution of observed values summarized by quantile.

  - `"GAUGE"`

  - `"COUNTER"`

  - `"HISTOGRAM"`

  - `"SUMMARY"`

### Example

```http
curl https://console.cloud.tigerdata.com/public/api/v1/projects/$PROJECT_ID/services/$SERVICE_ID/metrics/details/$METRIC_NAME \
    -H "Authorization: Bearer $TIGER_CLOUD_API_KEY"
```

#### Response

```json
{
  "default_agg": "AVG",
  "description": "Number of locks currently held, grouped by relation and lock mode.",
  "labels": [
    {
      "description": "The database this row's values belong to.",
      "name": "datname"
    }
  ],
  "metric_name": "pg_locks_count",
  "type": "GAUGE"
}
```

## Domain Types

### Detail Retrieve Response

- `DetailRetrieveResponse object { default_agg, description, labels, 2 more }`

  Descriptive metadata for a metric series — what it is, not its
  data. Some series don't have full metadata yet: type and
  default_agg may be null and description/labels may be empty, but
  every field below is always present in the response.

  - `default_agg: "RATE" or "INCREASE" or "SUM" or 10 more`

    Aggregation function applied to raw/pre-aggregated samples when
    collapsing them into one value per output bucket.

    - `RATE`: counter-reset-aware per-second rate of change.
    - `INCREASE`: counter-reset-aware total increase over the bucket.
    - `SUM`: sum of samples in the bucket.
    - `AVG`: mean of samples in the bucket.
    - `MIN`: minimum sample in the bucket.
    - `MAX`: maximum sample in the bucket.
    - `MIN_TOTAL` / `MAX_TOTAL`: minimum/maximum of the bucket's samples
      added together across every series first — for a metric with
      labels (e.g. one series per database) where the combined total,
      not any single series' own extremum, is the meaningful quantity
      (e.g. peak of total connections across all databases). `MIN`/`MAX`
      give the single most extreme individual series instead, which is
      the right answer when the metric is itself an extremum or a
      timestamp (e.g. longest-running transaction).
    - `COUNT`: number of samples in the bucket.
    - `P50` / `P90` / `P99`: approximate percentiles.
    - `LAST`: the most recent sample in the bucket.

    - `"RATE"`

    - `"INCREASE"`

    - `"SUM"`

    - `"AVG"`

    - `"MIN"`

    - `"MAX"`

    - `"MIN_TOTAL"`

    - `"MAX_TOTAL"`

    - `"COUNT"`

    - `"P50"`

    - `"P90"`

    - `"P99"`

    - `"LAST"`

  - `description: string`

    What this metric measures, or empty if undocumented.

  - `labels: array of object { description, name }`

    All labels this metric can be filtered or grouped by: its own
    labels (e.g. datname on pg_stat_database_*) plus the
    region/role/ordinal labels most metrics also carry. Some
    metrics only attach a subset of those — e.g.
    pgbouncer-sourced metrics only get region, not role/ordinal.

    - `description: string`

      What this label identifies, or empty if undocumented.

    - `name: string`

      The label's key.

  - `metric_name: string`

    Metric series name.

  - `type: "GAUGE" or "COUNTER" or "HISTOGRAM" or "SUMMARY"`

    The shape of a metric's underlying data.

    - `GAUGE`: a value that can go up or down (e.g. a current connection count).
    - `COUNTER`: a value that only increases until it resets (e.g. total queries run).
    - `HISTOGRAM`: a distribution of observed values grouped into ranges.
    - `SUMMARY`: a distribution of observed values summarized by quantile.

    - `"GAUGE"`

    - `"COUNTER"`

    - `"HISTOGRAM"`

    - `"SUMMARY"`
