To create a personal access token, head to the project settings, then to personal access tokens, then click generate token.
Everybody in your organization can create a personal access token (PAT). To provide additional security, we highly recommend adding an expiration to your personal access tokens.
Note that not all endpoints in the API will be accessible with PAT authentication.The PAT authentication is done via the HTTP Authorization request header.
Copy
Ask AI
Authorization: ApiKey <token>
Examples:
Copy
Ask AI
curl --location --request GET 'https://my.lightdash.com/api/v1/org/projects' \--header 'Authorization: ApiKey eeaa81d8bcd89a770bd8a581cabd052b'
Copy
Ask AI
GET /api/v1/org/projects HTTP/1.1Host: my.lightdash.comAuthorization: ApiKey eeaa81d8bcd89a770bd8a581cabd052b
To maintain security, you may want to rotate your personal access tokens periodically. Follow these steps to rotate an existing token.Requirements for Rotation
Token UUID: To rotate a token, you’ll need its unique identifier (UUID), which you can find on the tokens page in your account settings.
Expiration Date: You must specify a new expiration date when rotating a token. Tokens without an expiration cannot be rotated.
Time Interval: Tokens can only be rotated once per hour.
Use the following curl command to rotate a personal access token. Replace <personal-access-token-uuid> with the UUID of the token you wish to rotate, and <personal-access-token> with your current token.