Using REST API in Managed Service for TimescaleDB
URL: llms-txt#using-rest-api-in-managed-service-for-timescaledb
Contents:
- Using cURL to get your details
Managed Service for TimescaleDB has an API for integration and automation tasks. For information about using the endpoints, see the [API Documentation][aiven-api]. MST offers an HTTP API with token authentication and JSON-formatted data. You can use the API for all the tasks that can be performed using the MST Console. To get started you need to first create an authentication token, and then use the token in the header to use the API endpoints.
- In [Managed Service for TimescaleDB][mst-login], click
User Informationin the top right corner. - In the
User Profilepage, navigate to theAuthenticationtab. - Click
Generate Token. - In the
Generate access tokendialog, type a descriptive name for the token and leave the rest of the fields blank. - Copy the generated authentication token and save it.
Using cURL to get your details
Set the environment variable
MST_API_TOKENwith the access token that you generate:To get the details about the current user session using the
/meendpoint:
The output looks similar to this:
===== PAGE: https://docs.tigerdata.com/mst/identify-index-issues/ =====
Examples:
Example 1 (bash):
export MST_API_TOKEN="access token"Example 2 (bash):
curl -s -H "Authorization: aivenv1 $MST_API_TOKEN" https://api.aiven.io/v1/me|json_ppExample 3 (bash):
{
"user": {
"auth": [],
"create_time": "string",
"features": { },
"intercom": {},
"invitations": [],
"project_membership": {},
"project_memberships": {},
"projects": [],
"real_name": "string",
"state": "string",
"token_validity_begin": "string",
"user": "string",
"user_id": "string"
}
}