Getting Started

Servers

Sites

APIs

Need Help…

Pulse APIs - Clusters

The cluster APIs can be used to index, show, create, update or delete a cluster. They can also be used to add or delete a server node in an existing cluster.

Index - Retrieve All

This API is available via the following url:

/api/v1/clusters

It has the following parameters:

key type required example
page Integer no 1

The following is an example response:

{
    "data": [
        {
            "id": "8ca402e9-3b5f-48c4-a714-e170aebc1c62",
            "name": "European Cluster"
        }
    ],
    "links": {
        "first": "/api/v1/clusters?page=1",
        "last": "/api/v1/clusters?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "path": "/api/v1/clusters",
        "per_page": 15,
        "to": 1,
        "total": 1
    }
}

Show - Retrieve A Cluster

This API is available via the following url:

/api/v1/clusters/show

It has the following parameters:

key type required example
id String yes 8ca1e533-49d5-497a-93f0-1d5ecd79949d

The following is an example response:

{
    "data": {
        "id": "8ca402e9-3b5f-48c4-a714-e170aebc1c62",
        "name": "European Cluster",
        "nodes": [
            {
                "id": "8ca402e9-4fc1-492d-a7ad-26a5d22cb7ae",
                "server_id": "8ca402e8-83af-4cd0-bd17-20cf8b21d438"
            },
            {
                "id": "8ca402e9-5fc3-4043-a149-f922fe410d04",
                "server_id": "8ca402e8-8ebb-465c-b47e-114145bae8f2"
            },
            {
                "id": "8ca402e9-64fb-46c9-97c5-7771bb779f90",
                "server_id": "8ca402e8-93ea-49a5-bd53-3ffa0558db8e"
            },
            {
                "id": "8ca402e9-67d1-4a5b-974e-630e1a1013e5",
                "server_id": "8ca402e8-9808-43b8-93ff-81d75a986b70"
            }
        ]
    }
}

Store - Create A Cluster

This API is available via the following url:

/api/v1/clusters/store

It has the following parameters:

key type required example
name String yes European Cluster

The following is an example response:

{
    "id": "8ca40c9a-866f-44bd-84e4-5a93a745f9f7",
    "status": "The cluster has been created"
}

Update - Update A Cluster

This API is available via the following url:

/api/v1/clusters/update

It has the following parameters:

key type required example
id String yes 8ca1e533-49d5-497a-93f0-1d5ecd79949d
name String yes American Cluster

A string response is returned indicating that the update took place.

Destroy - Delete A Cluster

This API is available via the following url:

/api/v1/clusters/destroy

It has the following parameters:

key type required example
id String yes 8ca1e533-49d5-497a-93f0-1d5ecd79949d

A string response is returned indicating that the deletion took place.

Store Node - Attach A Server

This API is available via the following url:

/api/v1/nodes/store

It has the following parameters:

key type required example
server_id String yes 8ca1e533-49d5-497a-93f0-1d5ecd79949d
cluster_id String yes 8ca1e533-49d5-497a-93f0-1d5ecd79949d

The following is an example response:

{
    "id": "8ca40c9a-866f-44bd-84e4-5a93a745f9f7",
    "status": "The server node has been added to the cluster"
}

Destroy Node - Detach A Server

This API is available via the following url:

/api/v1/nodes/destroy

It has the following parameters:

key type required example
id String yes 8ca1e533-49d5-497a-93f0-1d5ecd79949d

A string response is returned indicating that the deletion took place.