GET/tags/:entity_type/:entity_id
List Tagspublic
Required Parameters
entity_type
stringType of the entity
entity_id
stringID of the entity
Get a list of tags for entities (servers & loadbalancers) by entity type and entity ID.
Request
GET
/tags/:entity_type/:entity_idcurl -X GET \
"https://app.cloud66.com/api/3/tags/:entity_type/:entity_id" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json"
Response
{
"response": [
{
"entity_type": "loadbalancer",
"entity_id": "17823",
"tags": [
{
"value": "foo",
"reserved": false
},
{
"value": "bar",
"reserved": false
}
],
"created_at_iso": "2021-01-04T21:32:33+0000",
"updated_at_iso": "2021-01-05T11:12:23+0000"
}
],
"count": 1,
"pagination": {
"previous": null,
"next": null,
"current": 1,
"per_page": 30,
"count": 1,
"pages": 1
}
}
POST/tags/:entity_type/:entity_id
Add Tagspublic
Required Parameters
entity_type
stringType of the entity
entity_id
stringID of the entity
tags
arrayArray of tag values to be POSTed
Add tags to an entity (server or loadbalancer). Completely replaces tags of the object with tags provided.
Related Models:Tag
Request
POST
/tags/:entity_type/:entity_idcurl -X POST \
"https://app.cloud66.com/api/3/tags/:entity_type/:entity_id" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"entity_type": "server",
"entity_id": "57648",
"tags": "[\"foo\",\"bar\"]"
}'
Response
{
"response": [
{
"entity_type": "loadbalancer",
"entity_id": "17823",
"tags": [
{
"value": "foo",
"reserved": false
},
{
"value": "bar",
"reserved": false
}
],
"created_at_iso": "2021-01-04T21:32:33+0000",
"updated_at_iso": "2021-01-05T11:12:23+0000"
}
],
"count": 1,
"pagination": {
"previous": null,
"next": null,
"current": 1,
"per_page": 30,
"count": 1,
"pages": 1
}
}
PATCH/tags/:entity_type/:entity_id
Update Tagspublic
Required Parameters
entity_type
stringType of the entity
entity_id
stringID of the entity
operations
arrayAn array of operation objects with "op" (add or delete) and "tags" array
Update tags on an entity (server or loadbalancer). Adds or deletes tags based on the operations
parameter. Deleting non-existent tags is not an error, will simply be ignored. Performs deletions first, then additions.
Related Models:Tag
Request
PATCH
/tags/:entity_type/:entity_idcurl -X PATCH \
"https://app.cloud66.com/api/3/tags/:entity_type/:entity_id" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json"
Response
{
"response": [
{
"entity_type": "loadbalancer",
"entity_id": "17823",
"tags": [
{
"value": "foo",
"reserved": false
},
{
"value": "bar",
"reserved": false
}
],
"created_at_iso": "2021-01-04T21:32:33+0000",
"updated_at_iso": "2021-01-05T11:12:23+0000"
}
],
"count": 1,
"pagination": {
"previous": null,
"next": null,
"current": 1,
"per_page": 30,
"count": 1,
"pages": 1
}
}
DELETE/tags/:entity_type/:entity_id
Delete Tagspublic
Required Parameters
entity_type
stringType of the entity
entity_id
stringID of the entity
Delete all tags on an entity (server or loadbalancer).
Related Models:Tag
Request
DELETE
/tags/:entity_type/:entity_idcurl -X DELETE \
"https://app.cloud66.com/api/3/tags/:entity_type/:entity_id" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json"
Response
{
"response": [
{
"entity_type": "loadbalancer",
"entity_id": "17823",
"tags": [],
"created_at_iso": "2021-01-04T21:32:33+0000",
"updated_at_iso": "2021-01-05T11:12:23+0000"
}
],
"count": 1,
"pagination": {
"previous": null,
"next": null,
"current": 1,
"per_page": 30,
"count": 1,
"pages": 1
}
}