List variables in a scope
GET
The variables set on the whole project, or on one environment or one service when its id is given. Secrets come without their value.
bearerheader
AuthorizationBearer <token>An API key (opk_…) or a CLI token (opc_…).
projectId*stringThe project's id.
environmentId?stringserviceId?stringlimit?integerHow many items to return, 1 to 100. Default 50.
Range
1 <= value <= 100cursor?stringThe nextCursor of the previous page.
Length
length <= 500List variables in a scope
application/json- response
data*array<>nextCursor*|Pass as cursor for the next page; null on the last.
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"}Read a service's metrics GET
CPU, memory, network and restarts of each of its replicas over the range, from the samples its servers' agents report every few seconds. Anyone who can see the service may read them.
Set a variable PUT
Sets it on the project, an environment or a service, replacing one of the same name in that scope. The narrowest scope wins at deploy. Takes effect at the next deployment.