Packages

GET /v1/servers/{server}/packages

List packages

Returns all active packages in a list.

Example
$ curl --header "Authorization: Bearer {token}" \
       --header "Accept: application/json" \
       https://api.checkdomain.de/v1/servers/{server}/packages
Response
HTTP/1.1 200 OK
{
    "page": 1,
    "limit": 10,
    "pages": 1,
    "total": 2,
    "_links": {
        "self": {
            "href": "/v1/servers/1/packages?page=1&limit=10"
        },
        "first": {
            "href": "/v1/servers/1/packages?page=1&limit=10"
        },
        "last": {
            "href": "/v1/servers/1/packages?page=1&limit=10"
        }
    },
    "_embedded": {
        "packages": [
            {
                "id": 1,
                "name": "Starter-Paket",
                "description": "Mustermann Media",
                "setup_date": "2018-01-30T13:02:55+0100",
                "_links": {
                    "self": {
                        "href": "/v1/servers/1/packages/1"
                    },
                    "configuration": {
                        "href": "/v1/servers/configurations/1"
                    }
                }
            },
            {
                "id": 2,
                "name": "Business-Paket",
                "description": "Media Agentur",
                "setup_date": null,
                "_links": {
                    "self": {
                        "href": "/v1/servers/1/packages/2"
                    },
                    "configuration": {
                        "href": "/v1/servers/configurations/2"
                    }
                }
            }
        ]
    }
}
Requirements
Name Type Required Description
server integer (\d+) Server identifier
Response
Name Type Required Description
root Show properties collection Yes array of objects (Package)
Properties of Package
Name Type Required Description
id integer Identifier
name string Package name
description string Package description
setup_date DateTime Date of setup
Status-Codes
Code Description
200 Ok
404 Server not found
500 Something on our end went wrong
GET /v1/servers/{server}/packages/{package}

Get package

Returns a single package by identifier

Example
$ curl --header "Authorization: Bearer {token}" \
       --header "Accept: application/json" \
       https://api.checkdomain.de/v1/servers/{server}/packages/{package}
Response
HTTP/1.1 200 OK
{
    "id": 1,
    "name": "Starter-Paket",
    "description": "Mustermann Media",
    "setup_date": "2018-01-30T13:02:55+0100",
    "disc_space": {
        "limit": 500,
        "used": 0,
        "unit": "MB"
    },
    "mail_space": {
        "limit": 128,
        "used": 0,
        "unit": null
    },
    "domain_space": {
        "limit": 0,
        "used": 0,
        "unit": null
    },
    "_links": {
        "self": {
            "href": "/v1/servers/1/packages/1"
        },
        "configuration": {
            "href": "/v1/servers/configurations/1"
        }
    }
}
Requirements
Name Type Required Description
server integer (\d+) Server identifier
package integer (\d+) Package identifier
Response
Name Type Required Description
id integer Identifier
name string Package name
description string Package description
setup_date DateTime Date of setup
disc_space Show properties model object (Space)
Properties of Space
Name Type Required Description
limit integer Total space
used integer Used space
value integer Value
unit string Values unit
mail_space object (Space) Available EMail slots
domain_space object (Space) Available domain slots
Status-Codes
Code Description
200 Ok
404 Server not found
500 Something on our end went wrong

Post

Create a new package on a server.

POST /v1/servers/{server}/packages

Create a new package on a server.

Example
$ curl --header "Authorization: Bearer {token}" \
       --header "Accept: application/json" \
       --header "Content-Type: application/json" \
       --data "{Request Data}" \
       --request POST \
       https://api.checkdomain.de/v1/servers/{server}/packages
Request Data
{
    "description": "Paket für Max Mustermann",
    "ip_address": "94.130.2.202",
    "configuration_id": 1
}
Response
HTTP/1.1 204 No Content
Requirements
Name Type Required Description
server (\d+)
Parameters
Name Type Required Description
description string Description of added package
ip_address string IP Address
configuration_id integer Configuration Identifier
Status-Codes
Code Description
204 No Content
400 Validation failed
404 Server not found
500 Something on our end went wrong