Cluster

List Clusters

Lists all clusters, optionally filtered by name, or uuid.

GET /api/v1/clusters/
Query Parameters:
 
  • id -- Filter responses by id
  • name -- Filter responses by exact name
  • uuid -- Filter responses by exact UUID
Status:

200 OK

Status:

400 Bad Request

Status:

404 Not Found

Example request:

curl -1 https://platform.swiftstack.com/api/v1/clusters/?format=json -H 'Authorization: apikey <user>:<api_key>'

Example response:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
{
    "meta": {
        "limit": 20,
        "next": null,
        "offset": 0,
        "previous": null,
        "total_count": 2
    },
    "objects": [
        {
            "id": 3,
            "name": "ProductionCluster",
            "resource_uri": "/api/v1/clusters/3/",
            "uuid": "e2e88667-e609-401e-8df6-3ae7c1ecf35b"
        },
        {
            "id": 2,
            "name": "TestCluster",
            "resource_uri": "/api/v1/clusters/2/",
            "uuid": "e94f1dc0-dd6b-4382-9189-1479857f539b"
        }
    ]
}

View Cluster Details

Display information about a cluster.

GET /api/v1/clusters/<cluster_id>/
Status:200 OK
Status:400 Bad Request
Status:404 Not Found

Example request:

curl -1 https://platform.swiftstack.com/api/v1/clusters/<cluster_id>/ -H 'Authorization: apikey <user>:<api_key>'

Example response:

1
2
3
4
5
6
{
    "id": 2,
    "name": "TestCluster",
    "resource_uri": "/api/v1/clusters/2/",
    "uuid": "e94f1dc0-dd6b-4382-9189-1479857f539b"
}

View Cluster Disk Capacity

Display per-ring-set summarized information about raw disk usage for a cluster. This is the same data from the table on the Cluster Capacity Planning page, but exposed as an API with raw values.

For each unique, unordered set of Storage Policies to which at least one device is assigned, there will be an element in the capacity list.

ring_set
Comma-separated list of Storage Policy names. The data in this capacity list element summarize raw used and free byte counts only for devices which are members of all of these Storage Policies.
total_raw_tb : TB (1012 bytes)
Total raw byte-storage capacity of the filesystems of all devices in the ring set. This does not include overhead of the filesystems themselves, nor does it include any "reserved" space unavailable to unprivileged users.
total_used_tb : TB (1012 bytes)
Total raw byte-storage used for all the filesystems of all devices in the ring set. This does not include overhead of the filesystems themselves, but it does include any space consumed inside any "reserved" space unavailable to unprivileged users.
total_free_tb : TB (1012 bytes)
Total raw byte-storage available to unprivileged users on all devices in the ring set.
total_used_pct : Percentage
The ratio of total_used_tb to total_raw_tb, expressed as a percentage.
pct_used_stats[count]
The number of devices in this ring set.
pct_used_stats[min] : Percentage
The minimum percent-used value for a single device in the ring set.
pct_used_stats[max] : Percentage
The maximum percent-used value for a single device in the ring set.
pct_used_stats[avg] : Percentage
The average percent-used value across all the devices in the ring set.
pct_used_stats[stddev]
The sample standard deviation of percent-used values across all the devices in the ring set. Note that Swift randomly distributes data, and should, on average, have an even distribution. However, like anything random, variation will occur.
pct_used_stats[pct_95] : Percentage
The 95-th percentile percent-used value across all the devices in the ring set computed using the Nearest Rank method.
GET /api/v1/clusters/<cluster_id>/capacity/list/
Status:200 OK
Status:400 Bad Request
Status:404 Not Found

Example request:

curl -1 https://platform.swiftstack.com/api/v1/clusters/<cluster_id>/capacity/list/ -H 'Authorization: apikey <user>:<api_key>'

Example response:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
{
    "capacity": [
        {
            "ring_set": "Standard-Replica",
            "total_raw_tb": 12.996313513984,
            "total_used_tb": 2.67910404096,
            "total_free_tb": 10.317209473023999,
            "total_used_pct": 20.614338351235457,
            "pct_used_stats": {
                "count": 13,
                "min": 18.475118181906865,
                "max": 25.144227616776725,
                "avg": 20.614338729567557,
                "stddev": 1.8081972513583315,
                "pct_95": 25.144227616776725
            }
        }, {
            "ring_set": "Account & Container",
            "total_raw_tb": 0.423917453312,
            "total_used_tb": 0.00345421824,
            "total_free_tb": 0.420463235072,
            "total_used_pct": 0.814832749397964,
            "pct_used_stats": {
                "count": 4,
                "min": 0.7437020450415022,
                "max": 0.8784735573007136,
                "avg": 0.822256983834592,
                "stddev": 0.05108436669142968,
                "pct_95": 0.8784735573007136
            }
        }
    ]
}