Tags

Tags List

get
https://api.linode.com/v4/tags

Tags are User-defined labels attached to objects in your Account, such as Linodes. They are used for specifying and grouping attributes of objects that are relevant to the User.

This endpoint returns a paginated list of Tags on your account.

Important: You must be an unrestricted User in order to access, add, or modify Tags information.

Query Parameters

page
integer > = 1
Default: 1

The page of a collection to return.

page_size
integer [25 .. 500]
Default: 100

The number of items to return per page.

Request Samples

curl -H "Authorization: Bearer $TOKEN" \
    https://api.linode.com/v4/tags

Response Samples

{
  "data": [
    {
      "label": "example tag"
    }
  ],
  "page": 1,
  "pages": 1,
  "results": 1
}

Responses

200: A paginated list of Tags

data
array of objects
label
string

A Label used for organization of objects on your Account.

page
integer

The current page.

pages
integer

The total number of pages.

results
integer

The total number of results.

default: Error

errors
array of objects
reason
string

What happened to cause this error. In most cases, this can be fixed immediately by changing the data you sent in the request, but in some cases you will be instructed to open a Support Ticket or perform some other action before you can complete the request successfully.

field
string

The field in the request that caused this error. This may be a path, separated by periods in the case of nested fields. In some cases this may come back as "null" if the error is not specific to any single element of the request.

New Tag Create

post
https://api.linode.com/v4/tags

Creates a new Tag and optionally tags requested objects with it immediately.

Important: You must be an unrestricted User in order to access, add, or modify Tags information.

Request Body Schema

label
Required
string [3 .. 50] characters

The new Tag.

domains
array

A list of Domain IDs to apply the new Tag to. You must be allowed to read_write all of the requested Domains, or the Tag will not be created and an error will be returned.

linodes
array

A list of Linode IDs to apply the new Tag to. You must be allowed to read_write all of the requested Linodes, or the Tag will not be created and an error will be returned.

nodebalancers
array

A list of NodeBalancer IDs to apply the new Tag to. You must be allowed to read_write all of the requested NodeBalancers, or the Tag will not be created and an error will be returned.

volumes
array

A list of Volume IDs to apply the new Tag to. You must be allowed to read_write all of the requested Volumes, or the Tag will not be created and an error will be returned.

Request Samples

curl -H "Content-Type: application/json" \
    -H "Authorization: Bearer $TOKEN" \
    -X POST -d '{
        "label": "example tag",
        "linodes": [123,456],
        "volumes": [9082,10003]
    }' \
    https://api.linode.com/v4/tags

Response Samples

{
  "label": "example tag"
}

Responses

200: The new Tag.

label
string

A Label used for organization of objects on your Account.

default: Error

errors
array of objects
reason
string

What happened to cause this error. In most cases, this can be fixed immediately by changing the data you sent in the request, but in some cases you will be instructed to open a Support Ticket or perform some other action before you can complete the request successfully.

field
string

The field in the request that caused this error. This may be a path, separated by periods in the case of nested fields. In some cases this may come back as "null" if the error is not specific to any single element of the request.