Skip to content
Skip to Content

List variables in a scope

GET
/projects/{projectId}/variables

The variables set on the whole project, or on one environment or one service when its id is given. Secrets come without their value.

Authorization

bearer
headerAuthorizationBearer <token>

An API key (opk_…) or a CLI token (opc_…).

Path parameters

projectId*string

The project's id.

Query parameters

environmentId?string
serviceId?string
limit?integer

How many items to return, 1 to 100. Default 50.

Range1 <= value <= 100
cursor?string

The nextCursor of the previous page.

Lengthlength <= 500

Response body

List variables in a scope

application/json
  1. response
data*array<>
nextCursor*|

Pass as cursor for the next page; null on the last.

Example request
curl "https://openpanel.sh/api/v1/projects/$PROJECT_ID/variables" \  -H "Authorization: Bearer $OPENPANEL_TOKEN"
Example response
{  "data": [    {      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "projectId": "5a8591dd-4039-49df-9202-96385ba3eff8",      "environmentId": "19f5cc2e-7657-437a-9268-83cd3d563563",      "serviceId": "8f8bb40f-b96b-40fe-9064-5031fbe483f9",      "name": "string",      "secret": true,      "value": "string",      "updatedAt": "2019-08-24T14:15:22Z"    }  ],  "nextCursor": "string"}