Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
bbdd988
chore: add first files.
Aug 21, 2025
a48e482
chore: first draft of the REST API docs
Aug 25, 2025
496846a
chore: update and test.
Aug 27, 2025
0aa622e
chore: update and test.
Aug 27, 2025
5625bfd
Merge branch 'latest' into rest-api
billy-the-fish Aug 27, 2025
ddba359
Merge branch 'latest' into rest-api
billy-the-fish Sep 1, 2025
0141fbc
Merge branch 'latest' into rest-api
billy-the-fish Sep 3, 2025
20a0a27
Fix spec. Better examples and documentation
josesahad Sep 5, 2025
2f12d32
Fix replica set retrieval docs
josesahad Sep 5, 2025
b31c7e8
Merge branch 'latest' into rest-api
billy-the-fish Sep 9, 2025
81b21fc
chore: few small updates.
Sep 9, 2025
39a62ae
chore: few small updates.
Sep 9, 2025
15cc114
Merge branch 'latest' into rest-api
billy-the-fish Sep 10, 2025
131c385
Merge branch 'latest' into rest-api
billy-the-fish Sep 11, 2025
3238fef
chore: change title to give space for the CLI
Sep 11, 2025
df580c9
Merge branch 'latest' into rest-api
billy-the-fish Sep 25, 2025
fece7f1
Merge branch 'latest' into rest-api
billy-the-fish Sep 29, 2025
d77f554
chore: commit for pull from latest.
Sep 29, 2025
50daa6f
Merge branch 'latest' of https://github.com/timescale/docs into 424-d…
Sep 29, 2025
cd73149
chore: cli docs.
Sep 29, 2025
6c24803
Apply suggestions from code review
billy-the-fish Sep 30, 2025
a45b764
chore: updates on review.
Sep 30, 2025
f932dee
Merge branch 'latest' into rest-api
billy-the-fish Sep 30, 2025
1fac045
chore: updates on review.
Sep 30, 2025
6c51d65
Merge branch 'rest-api' of https://github.com/timescale/docs into res…
Sep 30, 2025
a11bf56
Merge branch 'rest-api' into 424-docs-rfcadd-docs-for-the-cli
billy-the-fish Sep 30, 2025
9519e90
Apply suggestion from @nathanjcochran
billy-the-fish Oct 1, 2025
acd6526
Apply suggestion from @nathanjcochran
billy-the-fish Oct 1, 2025
14e1e1f
chore: updates on review.
Oct 1, 2025
64eaeb2
Apply suggestions from code review
billy-the-fish Oct 2, 2025
2245ca6
chore: updates on review.
Oct 2, 2025
5180505
chore: updates on review.
Oct 2, 2025
8ef16b7
chore: updates on review.
Oct 2, 2025
1344101
chore: updates on review.
Oct 2, 2025
b6b978a
chore: updates on review.
Oct 2, 2025
ef3b492
chore: add fork and free.
billy-the-fish Oct 3, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
237 changes: 237 additions & 0 deletions _partials/_devops-cli-get-started.md

Large diffs are not rendered by default.

157 changes: 157 additions & 0 deletions _partials/_devops-rest-api-get-started.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,157 @@
import RESTPrereqs from "versionContent/_partials/_prereqs-cloud-account-only.mdx";

[$REST_LONG][rest-api-reference] is a comprehensive RESTful API you use to manage $CLOUD_LONG resources
including VPCs, $SERVICE_SHORTs, and read replicas.

This page shows you how to set up secure authentication for the $REST_LONG and create your first $SERVICE_SHORT.

## Prerequisites

<RESTPrereqs />

* Install [curl][curl].


## Configure secure authentication

$REST_LONG uses HTTP Basic Authentication with access keys and secret keys. All API requests must include
proper authentication headers.

<Procedure>

1. **Set up API credentials**

1. In $CONSOLE, copy your [project ID][get-project-id] and store it securely using an environment variable:

```bash
export TIGERDATA_PROJECT_ID="your-project-id"
```

1. [Create your client credentials][create-client-credentials] and store them securely using environment variables:

```bash
export TIGERDATA_ACCESS_KEY="Public key"
export TIGERDATA_SECRET_KEY="Secret key"
```

1. **Configure the API endpoint**

Set the base URL in your environment:

```bash
export API_BASE_URL="https://console.cloud.timescale.com/public/api/v1"
```

1. **Test your authenticated connection to $REST_LONG by listing the $SERVICE_SHORTs in the current $PROJECT_LONG**

```bash
curl -X GET "${API_BASE_URL}/projects/${TIGERDATA_PROJECT_ID}/services" \
-u "${TIGERDATA_ACCESS_KEY}:${TIGERDATA_SECRET_KEY}" \
-H "Content-Type: application/json"
```

This call returns something like:
- No $SERVICE_SHORTs:
```terminaloutput
[]%
```
- One or more $SERVICE_SHORTs:

```terminaloutput
[{"service_id":"a59clooxoe","project_id":"c8nmagk8zh","name":"events",
"region_code":"eu-central-1","service_type":"TIMESCALEDB",
"created":"2025-09-09T08:37:15.816443Z","paused":false,"status":"READY",
"resources":[{"id":"101228","spec":{"cpu_millis":500,"memory_gbs":2,"volume_type":""}}],
"metadata":{"environment":"DEV"},"endpoint":{"host":"oh.yeah.tsdb.cloud.timescale.com",
"port":12345}}]
```

</Procedure>


## Create your first $SERVICE_LONG

Create a new $SERVICE_SHORT using the $REST_LONG:

<Procedure>

1. **Create a $SERVICE_SHORT using the POST endpoint**
```bash
curl -X POST "${API_BASE_URL}/projects/${TIGERDATA_PROJECT_ID}/services" \
-u "${TIGERDATA_ACCESS_KEY}:${TIGERDATA_SECRET_KEY}" \
-H "Content-Type: application/json" \
-d '{
"name": "my-first-service",
"service_type": "TIMESCALEDB",
"region_code": "us-east-1",
"replica_count": 1,
"cpu_millis": 1000,
"memory_gbs": 4
}'
```
$CLOUD_LONG creates a Development environment for you. That is, no delete protection, high-availability, spooling or
read replication. You see something like:
```terminaloutput
{
"service_id":"asdfasdfasdf","project_id":"asdasdfasf","name":"my-first-service",
"region_code":"us-east-1", "service_type":"TIMESCALEDB",
"created":"2025-09-09T09:24:31.997767396Z", "paused":false,"status":"READY",
"resources":[{"id":"101240",
"spec":{"cpu_millis":1000,"memory_gbs":4,"volume_type":""}}],
"metadata":{"environment":"PROD"},
"endpoint":{"host":"oh.yeah.tsdb.cloud.timescale.com","port":123435},
"initial_password":"very-secret",
"ha_replicas":{"sync_replica_count":0,"replica_count":1}
}
```

1. **Save `service_id` from the response to a variable**
```bash
# Extract service_id from the JSON response
export SERVICE_ID="service_id-from-response"
```

1. **Check the configuration for the $SERVICE_SHORT**

```bash
curl -X GET "${API_BASE_URL}/projects/${TIGERDATA_PROJECT_ID}/services/${SERVICE_ID}" \
-u "${TIGERDATA_ACCESS_KEY}:${TIGERDATA_SECRET_KEY}" \
-H "Content-Type: application/json"
```
You see something like:
```terminaloutput
{"service_id":"tgrservice","project_id":"tgrproject","name":"my-first-service","region_code":"us-east-1",
"service_type":"TIMESCALEDB","created":"2025-09-30T12:08:54.438785Z","paused":false,"status":"READY",
"resources":[{"id":"102879","spec":{"cpu_millis":1000,"memory_gbs":4,"volume_type":""}}],
"metadata":{"environment":"DEV"},"endpoint":{"host":"ohhhh.yeahhhhh.tsdb.cloud.timescale.com","port":33867},
"ha_replicas":{"sync_replica_count":0,"replica_count":1}}
```

</Procedure>

And that is it, you are ready to use the [$REST_LONG][rest-api-reference] to manage your
$SERVICE_SHORTs in $CLOUD_LONG.

## Security best practices

Follow these security guidelines when working with the $REST_LONG:

- **Credential management**
- Store API credentials as environment variables, not in code
- Use credential rotation policies for production environments
- Never commit credentials to version control systems

- **Network security**
- Use HTTPS endpoints exclusively for API communication
- Implement proper certificate validation in your HTTP clients

- **Data protection**
- Use secure storage for service connection strings and passwords
- Implement proper backup and recovery procedures for created services
- Follow data residency requirements for your region

[rest-api-reference]: /api/:currentVersion:/api-reference/
[rest-api-credentials]: https://console.cloud.timescale.com/dashboard/settings
[get-project-id]: /integrations/:currentVersion:/find-connection-details/#find-your-project-and-service-id
[create-client-credentials]: /integrations/:currentVersion:/find-connection-details/#create-client-credentials
[curl]: https://curl.se/
5 changes: 5 additions & 0 deletions _partials/_prereqs-cloud-account-only.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
To follow the steps on this page:

* Create a target [$ACCOUNT_LONG][create-account].

[create-account]: /getting-started/:currentVersion:/services/#create-a-tiger-cloud-account
Loading