Logo

Command Palette

Search for a command to run...

GET/stacks/:stack_id/settings/:id

Required Parameters

stack_idstring
The stack UID
idstring
The setting item ID

Get information of a single setting item.

Related Models:Stack Setting

Request

GET
/stacks/:stack_id/settings/:id
curl -X GET \
  "https://app.cloud66.com/api/3/stacks/:stack_id/settings/:id" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json"

Response

{
  "response": {
    "key": "git.branch",
    "value": "master"
  }
}
GET/stacks/:stack_id/settings

Required Parameters

stack_idstring
The stack UID

Get list of all settings for a stack.

Request

GET
/stacks/:stack_id/settings
curl -X GET \
  "https://app.cloud66.com/api/3/stacks/:stack_id/settings" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json"

Response

{
  "response": [
    {
      "id": 1,
      "key": "stack.timezone",
      "value": "UTC",
      "readonly": false,
      "created_at": "2014-08-29T17:21:25Z",
      "updated_at": "2014-08-29T17:21:25Z"
    }
  ],
  "count": 1,
  "pagination": {
    "previous": null,
    "next": null,
    "current": 1,
    "per_page": 30,
    "count": 1,
    "pages": 1
  }
}
PUT/stacks/:stack_id/settings/:id

Required Parameters

stack_idstring
The stack UID
idinteger
The setting item ID
valuestring
The setting item new value

Update value of a setting item.

Related Models:Stack Setting

Request

PUT
/stacks/:stack_id/settings/:id
curl -X PUT \
  "https://app.cloud66.com/api/3/stacks/:stack_id/settings/:id" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "stack_id": "5999b763474b0eafa5fafb64bff0ba80",
  "id": "git-branch",
  "value": "staging"
}'

Response

{
  "response": {
    "id": 7,
    "user": "test@cloud66.com",
    "resource_type": "stack",
    "action": "stack-set: git.branch",
    "resource_id": "280",
    "started_via": "api",
    "started_at": "2014-09-01T12:47:24Z",
    "finished_at": null,
    "finished_success": null,
    "finished_message": null
  }
}