Server Sets

Attributes

id (read-only) Unique server set ID.
servers (read-only) IDs of servers that belong to this server tag.
name The name of the server set.
auto_detection Whether automatically detect applications on this server set (Boolean).
applications (read-only) A list of applications detected on this server set.
server_tags IDs of server tags that belong to this server set.
url (read-only) URL information about the requested item.

Available APIs

/api/server_sets/

Lists all available server sets or create a new server set.

GET

Lists all available server sets.

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_sets/
{
    "pagination": {
        "count": 34, 
        "next": null, 
        "previous": null
    }, 
    "data": [
        {
            "id": 431, 
            "name": "ACS", 
            "servers": [
                248923, 
                7984, 
                9711
            ], 
            "server_tags": [
                "/api/v5/server_tags/3061/"
            ], 
            "applications": [
                9611
            ], 
            "auto_detection": true, 
            "url": "/api/v5/server_sets/431/"
        }, 
        {
            "id": 377, 
            "name": "buildbot", 
            "servers": [
                258708, 
                12971, 
                11193, 
                11436, 
                11438, 
                245698, 
                258551, 
                249782, 
                251595, 
                11191, 
                258331, 
                249996, 
                11188, 
                249792, 
                249946, 
                249948, 
                11194
            ], 
            "server_tags": [
                "/api/v5/server_tags/2823/"
            ], 
            "applications": [
                9916
            ], 
            "auto_detection": false, 
            "url": "/api/v5/server_sets/377/"
        }, 
    ]
}

POST

Create a new server set.

Arguments

  • name (required) – the name of the server set, length must be 1 – 64 characters.
  • server_tags (required) – a list of server tag IDs.
  • auto_detection (optional) – whether auto detection applications on this server set.
curl --user {EMAIL}:{API_KEY} https://wwws.appfirst.com/api/server_sets/ -d "name=production&server_tags=/api/server_tags/431/"
{
    "id": 431, 
    "name": "ACS", 
    "servers": [
        248923, 
        7984, 
        9711
    ], 
    "server_tags": [
        "https://wwws.appfirst.com/api/v5/server_tags/3061/"
    ], 
    "applications": [
        9611
    ], 
    "auto_detection": true, 
    "url": "https://wwws.appfirst.com/api/v5/server_sets/431/"
}

/api/server_sets/{set_id}/

View, update or delete a server set.

GET

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

PUT

Update a server set.

Arguments

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

/api/server_sets/{set_id}/servers

View, update or delete a server set.

GET

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

curl --user {EMAIL}:{API_KEY} https://wwws.appfirst.com/api/server_sets/123/servers -X PUT -d 
[
        {
            "id": 248923, 
            "hostname": "fileserver2.appfirst.com", 
            "nickname": "pod1-lbfrontend0", 
            "url": "https://wwws.appfirst.com/api/servers/248923/"
        }, 
]

/api/server_sets/{set_id}/server_tags

View, update or delete a server set.

GET

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

curl --user {EMAIL}:{API_KEY} https://wwws.appfirst.com/api/server_sets/123/server_tags -X PUT -d 
 [
        {
            "id": 3061, 
            "name": "ACS", 
            "servers": [
                248923, 
                7984, 
                9711
            ], 
            "url": "https://wwws.appfirst.com/api/server_tags/3061/"
        }
    ]

DELETE

Delete a server set if it exists.