Skip to Content
Variables

Return a list of variables belonging to a resource

GET
/variables/{resource_type}/{resource_id}

Path Parameters

resource_id*integer

The resource ID.

Range1 <= value
resource_type*string

The resource type to get variables from.

Query Parameters

page?integer

Number of the page to be retrieved

Range1 <= value
per_page?integer

Number of items returned per page

Range1 <= value <= 100
include_virtual_variables?boolean

If true, include all virtual variables in the list. Defaults to true.

variable_target?string

Filter by variable's target.

Header Parameters

Accept*string

application/json

Authorization*string

Bearer {{access_token}}

Content-Type*string

application/json

Response Body

Ok

application/json
  1. response
[index: integer]?|null
Example Request
curl -X GET 'https://api.devopness.com/variables/server/123?page=1&per_page=25&include_virtual_variables=false&variable_target=resource-config-file' \  -H 'Accept: application/json' \  -H 'Authorization: Bearer <your_api_token>' \  -H 'Content-Type: application/json'
Example Response200
[  {    "id": 93023,    "key": "APP_URL",    "type": "file",    "description": "Sample variable description",    "value": "https://staging.devopness.com",    "target": "resource-config-file",    "target_human_readable": "Resource Configuration File",    "resource_id": 3426,    "resource_type": "application",    "hidden": false,    "created_by_user": {      "id": 1,      "name": "string",      "email": "user@example.com",      "url_slug": "someone",      "language": "en",      "active": true,      "created_at": "2019-09-25T15:50:48.000000Z",      "updated_at": "2019-09-25T13:52:04.000000Z"    },    "created_at": "2022-09-26T15:30:31.000000Z",    "updated_at": "2022-09-26T15:30:58.000000Z"  }]