The API uses links to standard hypermedia objects to help clients locate related resources relevant within a set of JSON data. For example, this JSON snippet shows the sort of response you might get when you GET a specific storage group. Its links
array contains several objects, one for each applicable resource. Each rel
represents the link relation. This can be self
for links referring to the storage group, itself, uploadAccounts
for an upload account, and zones
for a geographic replication zone assigned to the group. The associated href
provides a navigable path to the resource, once you prefix it with your hostname token.
"links": [
{
"rel": "self",
"href": "http://my.url.com/storage/api/v1/storage-groups/1234568"
},
{
"rel": "uploadAccounts",
"href": "http://my.url.com/storage/api/v1/upload-accounts?storageGroupId=1234568"
},
{
"rel": "cpcodes",
"href": "http://my.url.com/storage/api/v1/cpcodes"
},
{
"rel": "keys",
"href": "http://my.url.com/storage/api/v1/{uploadAccountId}/keys"
},
{
"rel": "rule-sets",
"href": "http://my.url.com/storage/api/v1/rule-sets"
},
{
"rel": "site-snapshots",
"href": "http://my.url.com/storage/api/v1/site-snapshots"
},
{
"rel": "zones",
"href": "http://my.url.com/storage/api/v1/zones"
}
]