Skip to main content
POST
/
projects
/
{project_id}
/
services
Create a Service
curl --request POST \
  --url https://console.cloud.timescale.com/public/api/v1/projects/{project_id}/services \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "my-production-db",
  "addons": [
    "time-series",
    "ai"
  ],
  "region_code": "us-east-1",
  "replica_count": 2,
  "cpu_millis": "1000",
  "memory_gbs": "4",
  "environment_tag": "DEV"
}'
{
  "service_id": "<string>",
  "project_id": "<string>",
  "name": "<string>",
  "region_code": "us-east-1",
  "service_type": "TIMESCALEDB",
  "created": "2023-11-07T05:31:56Z",
  "initial_password": "a-very-secure-initial-password",
  "paused": true,
  "status": "QUEUED",
  "resources": [
    {
      "id": "<string>",
      "spec": {
        "cpu_millis": 123,
        "memory_gbs": 123,
        "volume_type": "<string>"
      }
    }
  ],
  "metadata": {
    "environment": "<string>"
  },
  "endpoint": {
    "host": "my-service.com",
    "port": 8080
  },
  "vpcEndpoint": {},
  "forked_from": {
    "project_id": "asda1b2c3",
    "service_id": "bbss422fg",
    "is_standby": false
  },
  "ha_replicas": {
    "sync_replica_count": 1,
    "replica_count": 1
  },
  "connection_pooler": {
    "endpoint": {
      "host": "my-service.com",
      "port": 8080
    }
  },
  "read_replica_sets": [
    {
      "id": "alb8jicdpr",
      "name": "reporting-replica-1",
      "status": "active",
      "nodes": 2,
      "cpu_millis": 250,
      "memory_gbs": 1,
      "metadata": {
        "environment": "<string>"
      },
      "endpoint": {
        "host": "my-service.com",
        "port": 8080
      },
      "connection_pooler": {
        "endpoint": {
          "host": "my-service.com",
          "port": 8080
        }
      }
    }
  ]
}

Path Parameters

project_id
string
required

The unique identifier of the project.

Example:

"rp1pz7uyae"

Body

application/json
name
string
required

A human-readable name for the service.

Example:

"my-production-db"

addons
enum<string>[]

List of addons to enable for the service. 'time-series' enables TimescaleDB, 'ai' enables AI/vector extensions.

Example:
["time-series", "ai"]
region_code
string

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

Example:

"us-east-1"

replica_count
integer

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

Example:

2

cpu_millis
string

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

Example:

"1000"

memory_gbs
string

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

Example:

"4"

environment_tag
enum<string>

The environment tag for the service, 'DEV' by default.

Available options:
DEV,
PROD

Response

Service creation request has been accepted.

service_id
string

The unique identifier for the service.

project_id
string

The project this service belongs to.

name
string

The name of the service.

region_code
string

The cloud region where the service is hosted.

Example:

"us-east-1"

service_type
enum<string>

The type of the service.

Available options:
TIMESCALEDB,
POSTGRES,
VECTOR
created
string<date-time>

Creation timestamp

initial_password
string<password>

The initial password for the service.

Example:

"a-very-secure-initial-password"

paused
boolean

Whether the service is paused

status
enum<string>

Current status of the service

Available options:
QUEUED,
DELETING,
CONFIGURING,
READY,
DELETED,
UNSTABLE,
PAUSING,
PAUSED,
RESUMING,
UPGRADING,
OPTIMIZING
resources
object[]

List of resources allocated to the service

metadata
object

Additional metadata for the service

endpoint
object
vpcEndpoint
object | null

VPC endpoint configuration if available

forked_from
object
ha_replicas
object
connection_pooler
object
read_replica_sets
object[]