---
title: REST API | Tiger Data Docs
description: Use REST API for integration and automation in Managed Service for TimescaleDB
---

Managed Service for TimescaleDB has an API for integration and automation tasks. For information about using the endpoints, see the [API Documentation](https://api.aiven.io/doc/). 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.

## Create an authentication token

1. **Open user information**

   In [Managed Service for TimescaleDB](https://portal.managed.timescale.com/login), click `User Information` in the top right corner.

2. **Generate a token**

   In the `User Profile` page, navigate to the `Authentication` tab. Click `Generate Token`.

3. **Save the token**

   In the `Generate access token` dialog, 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

1. **Set the API token**

   Set the environment variable `MST_API_TOKEN` with the access token that you generated:

   Terminal window

   ```
   export MST_API_TOKEN="access token"
   ```

2. **Query the /me endpoint**

   To get the details about the current user session using the `/me` endpoint:

   Terminal window

   ```
   curl -s -H "Authorization: aivenv1 $MST_API_TOKEN" https://api.aiven.io/v1/me|json_pp
   ```

   The output looks similar to this:

   Terminal window

   ```
   {
       "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"
       }
   }
   ```
