Server Tags

Attributes

id (read-only) Unique server tag ID.
name The name of the server tag.
servers IDs of servers that belong to this server tag.
url (read-only) URL information about the requested item.

Available APIs

/api/server_tags/

Lists all available server tags or create a new server tag.

GET

Lists all available server tags.

Arguments

  • filter (optional) – Returns a list of server tags with matching names to the user-defined filter.
  • limit (optional, default:2500, max:2500) – Sets the page size to a limit set by the user.
  • page (optional, default:0) – Retrieve the specific page of data of size limit.

Argument Examples

  • limit=10 – will get the first page of the first 10 items.
  • limit=25&page=3 – will get the 4th page of size 25 items.
curl --user {EMAIL}:{API_KEY} https://wwws.appfirst.com/api/server_tags/
{
    "pagination": {
        "count": 49, 
        "next": null, 
        "previous": null
    }, 
    "data": [
        {
            "id": 3061, 
            "name": "ACS", 
            "servers": [
                248923, 
                7984, 
                9711
            ], 
            "url": "/api/v5/server_tags/3061/"
        }, 
        {
            "id": 2807, 
            "name": "alert", 
            "servers": [
                248923, 
                9708, 
                10304
            ], 
            "url": "/api/v5/server_tags/2807/"
        }, 
    ]
}

POST

Create a new server tag.

Arguments

  • name (required) – the name of the server tag, length must be 1 – 256 characters.
  • servers (required) – a list of server IDs.
curl --user {EMAIL}:{API_KEY} https://wwws.appfirst.com/api/server_tags/ -d "name=production&servers=[1,2,3]"
{
    "id": 123,
    "url": "/api/v5/server_tags/123/",
    "name": "production",
    "servers": [
        1,
        2,
        3
    ]
}

/api/server_tags/{tag_id}/

View, update and delete a server tag.

GET

Get info about a server tag, given by the server tag id in the URL. It takes no additional parameters.

PUT

Update a server tag.

Arguments

  • name (required) – the name of the server tag, length must be 1 – 64 characters.
  • servers (required) -a list of server IDs.
curl --user {EMAIL}:{API_KEY} https://wwws.appfirst.com/api/server_tags/123/ -X PUT -d "name=development&servers=[1,2,3]"
{
    "id": 123,
    "url": "/api/v5/server_tags/123/",
    "name": "development",
    "servers": [
        1,
        2,
        3
    ]
}

/api/server_tags/{tag_id}/servers

View all servers within the server tag.

GET

Provides a detailed list of the server tag including server ID, hostname, nickname and url. It takes no additional parameters.

curl --user {EMAIL}:{API_KEY} https://wwws.appfirst.com/api/server_tags/28100/servers/
[
        {
            "id": 9869, 
            "hostname": "p0-dal05-m-streamer0.appfirst.com", 
            "nickname": "pod0-streamdb0", 
            "url": "https://wwws.appfirst.com/api/servers/9869/"
        }, 
]

DELETE

Delete a server tag if it exists.