Coordination API (1.0.0)
Download OpenAPI specification:Download
Seaplane Global Coordination API
For information about authentication see authentication
Get contents of root directory
This query returns a single page of key-value pairs. If more keys exist,
it also returns a value for the next_key
. You can rerun the query with
the from
parameter set to next_key
to get the next page of results.
Some directories contain no keys, i.e., return an empty result while
still returning a value for next_key
. To get all your keys in your
account, rerun the query until the value of next_key
is null.
The CLI automatically reruns the query to return all key-value pairs in your account. This could take some time depending on the number of records in your account
Authorizations:
query Parameters
from | string Example: from=base64:dGhlIG5leHQga2V5 Values of the |
Responses
Request samples
- CLI
- cURL
- Python
- Javascript
seaplane metadata list --decode
Response samples
- 200
- 400
- 401
- 404
- 503
- 5XX
{- "next_key": "dGhlIG5leHQga2V5",
- "kvs": [
- {
- "key": "Zm9vL2Jhcgo",
- "value": "ZXhhbXBsZSB2YWx1ZQo"
}
]
}
Get the contents of a directory
This query returns a single page of key-value pairs. If more keys
exist, it also returns a value for the next_key
. You can rerun the
query with the from
parameter set to next_key
to get the next page of
results. To get all your keys in the specified directory, rerun the
query until the value of next_key
is null.
The CLI automatically reruns the query to return all key-value pairs in your account. This could take some time depending on the number of records in your account
Authorizations:
path Parameters
key required | string Example: Zm9vL2Jhcgo Key pointing to a directory, the key should be encoded using base64 encoding, unpadded, with URL and filename safe alphabet: RFC4648 section 5 |
query Parameters
from | string Example: from=base64:dGhlIG5leHQga2V5 Values of the |
Responses
Request samples
- CLI
- cURL
- Python
- Javascript
seaplane metadata list <DIRECTORY> --decode
Response samples
- 200
- 400
- 401
- 404
- 503
- 5XX
{- "next_key": "dGhlIG5leHQga2V5",
- "kvs": [
- {
- "key": "Zm9vL2Jhcgo",
- "value": "ZXhhbXBsZSB2YWx1ZQo"
}
]
}
Get a key-value pair
Authorizations:
path Parameters
key required | string Example: Zm9vL2Jhcgo Key of the key-value pair, the key should be encoded using base64 encoding, unpadded, with URL and filename safe alphabet: RFC4648 section 5 |
Responses
Request samples
- CLI
- cURL
- Python
seaplane metadata get <KEY> --decode
Response samples
- 200
- 400
- 401
- 404
- 503
- 5XX
{- "key": "key_foo",
- "value": "something"
}
Set a key-value pair
Authorizations:
path Parameters
key required | string Example: Zm9vL2Jhcgo Key of the key-value pair, the key should be encoded using base64 encoding, unpadded, with URL and filename safe alphabet: RFC4648 section 5 |
Request Body schema: application/octet-stream
Base64-encoded value of the key-value pair
Responses
Request samples
- CLI
- cURL
- Python
- Javascript
seaplane metadata set <KEY> <VALUE>
Response samples
- 200
- 400
- 401
- 503
- 5XX
"OK"
Delete a key-value pair
Authorizations:
path Parameters
key required | string Example: Zm9vL2Jhcgo Key of the key-value pair, the key should be encoded using base64 encoding, unpadded, with URL and filename safe alphabet: RFC4648 section 5 |
Responses
Request samples
- CLI
- cURL
- Python
- Javascript
seaplane metadata delete <KEY>
Response samples
- 200
- 400
- 401
- 404
- 503
- 5XX
"OK"
Get all locks in the root directory
This query returns a single page of locks. If more locks exist,
it also returns a value for the next_lock
. You can rerun the query with
the from
parameter set to next_lock
to get the next page of results. Some
directories contain no locks, i.e., return an empty result while still
returning a value for next_key
. To get all your keys in your account,
rerun the query until the value of next_lock
is null.
The CLI automatically reruns the query to return all key-value pairs in your account. This could take some time depending on the number of records in your account
Authorizations:
query Parameters
from | string Example: from=base64:bG9tb25k Listing a directory of locks returns one page of results, if a |
Responses
Request samples
- CLI
- cURL
- Python
- Javascript
seaplane locks list --decode
Response samples
- 200
- 400
- 401
- 404
- 503
- 5XX
{- "next_lock": "bG9tb25k",
- "locks": [
- {
- "name": "bG9tb25k",
- "id": "AOEHFRa4Ayg",
- "info": {
- "TTL": 3600,
- "client-id": "worker-321",
- "ip": "192.0.2.19"
}
}
]
}
Get locks in a given directory
This query returns a single page of locks. If more locks exist, it also
returns a value for the next_lock
. You can rerun the query with the
from
parameter set to next_lock
to get the next page of results.
To get all your locks
in the specified directory, rerun the query
until the value of next_lock
is null.
The CLI automatically reruns the query to return all key-value pairs in your account. This could take some time depending on the number of records in your account
Authorizations:
path Parameters
dir required | string (LockName) Example: bG9tb25k Name of a directory containing locks, the name should be encoded using base64 encoding, unpadded, with URL and filename safe alphabet: RFC4648 section 5 |
query Parameters
from | string Example: from=base64:bG9tb25k Listing a directory of locks returns one page of results, if a |
Responses
Request samples
- CLI
- cURL
- Python
- Javascript
seaplane locks list <DIRECTORY>/ --decode
Response samples
- 200
- 400
- 401
- 404
- 503
- 5XX
{- "next_lock": "bG9tb25k",
- "locks": [
- {
- "name": "bG9tb25k",
- "id": "AOEHFRa4Ayg",
- "info": {
- "TTL": 3600,
- "client-id": "worker-321",
- "ip": "192.0.2.19"
}
}
]
}
Get the information around a currently held lock
Authorizations:
path Parameters
name required | string (LockName) Example: bG9tb25k Name of the lock, the name should be encoded using base64 encoding, unpadded, with URL and filename safe alphabet: RFC4648 section 5 |
Responses
Request samples
- CLI
- cURL
- Python
- Javascript
seaplane locks list <LOCK-NAME> --decode
Response samples
- 200
- 400
- 401
- 404
- 503
- 5XX
{- "name": "bG9tb25k",
- "id": "AOEHFRa4Ayg",
- "info": {
- "TTL": 3600,
- "client-id": "worker-321",
- "ip": "192.0.2.19"
}
}
Attempt to acquire a lock
Authorizations:
path Parameters
name required | string (LockName) Example: bG9tb25k Name of the lock, the name should be encoded using base64 encoding, unpadded, with URL and filename safe alphabet: RFC4648 section 5 |
query Parameters
ttl required | integer (TTL) [ 1 .. 4095 ] Example: ttl=3600 The TTL set on the lock when it was last acquired/renewed in seconds |
client-id required | string (ClientID) Example: client-id=worker-321 The Client ID of the current lock holder. |
Responses
Request samples
- CLI
- cURL
- Python
- Javascript
seaplane locks acquire <LOCK-NAME> \ --client-id <CLIENT-ID> \ --ttl <TTL>
Response samples
- 200
- 400
- 401
- 409
- 503
- 5XX
{- "id": "AOEHFRa4Ayg",
- "sequencer": 3
}
Release a currently held lock
Authorizations:
path Parameters
name required | string (LockName) Example: bG9tb25k Name of the lock, the name should be encoded using base64 encoding, unpadded, with URL and filename safe alphabet: RFC4648 section 5 |
query Parameters
id required | string (LockID) Example: id=AOEHFRa4Ayg ID which allows for the renewal/release of a lock, represents "holding" the lock, this is usually only seen by the original acquirer of the lock but may be leaked by listing the locks. (NOTE: This allows you to alter lock semantics drastically so please ensure you understand the consequences before use) |
Responses
Request samples
- CLI
- cURL
- Python
- Javascript
seaplane locks release --lock-id <LOCK-ID> <LOCK-NAME>
Response samples
- 200
- 400
- 401
- 404
- 503
- 5XX
"OK"
Renew a held lock, with a given TTL
Authorizations:
path Parameters
name required | string (LockName) Example: bG9tb25k Name of the lock, the name should be encoded using base64 encoding, unpadded, with URL and filename safe alphabet: RFC4648 section 5 |
query Parameters
id required | string (LockID) Example: id=AOEHFRa4Ayg ID which allows for the renewal/release of a lock, represents "holding" the lock, this is usually only seen by the original acquirer of the lock but may be leaked by listing the locks. (NOTE: This allows you to alter lock semantics drastically so please ensure you understand the consequences before use) |
ttl required | integer (TTL) [ 1 .. 4095 ] Example: ttl=3600 The TTL set on the lock when it was last acquired/renewed in seconds |
Responses
Request samples
- CLI
- cURL
- Python
- Javascript
seaplane locks renew --lock-id <LOCK-ID> --ttl <TTL> <LOCK-NAME>
Response samples
- 200
- 400
- 401
- 404
- 503
- 5XX
"OK"
Provider and region restrictions API
For more information about restrictions see the restrictions background information documentation.
List information about all provider and region restrictions
This query returns a single page of restrictions. If more restrictions
exist, it also returns a value for the next_key
and next_api
. You
can rerun the query with the from
parameter set to next_key
and the
from_api
set to the next_api
to get the next page of results. To
get all restrictions in your account, rerun the query until the value of
next_key
and next_api
is null.
The CLI automatically reruns the query to return all restrictions. This could take some time depending on the number of restrictions in your account.
Authorizations:
query Parameters
from | string Example: from=base64:dGhlIG5leHQga2V5 Values of the |
from_api | string Example: from_api=locks |
Responses
Request samples
- CLI
- cURL
- Python
- Javascript
seaplane restrict list --decode
Response samples
- 200
- 400
- 401
- 404
- 503
- 5XX
{- "next_api": "locks",
- "next_key": "dGhlIG5leHQga2V5",
- "restrictions": [
- {
- "api": "config",
- "directory": "Zm9vL2Jhcgo",
- "details": {
- "regions_allowed": [
- "XE"
], - "regions_denied": [
- "XE"
], - "providers_allowed": [
- "AWS"
], - "providers_denied": [
- "AWS"
]
}, - "state": "enforced"
}
]
}
List information about the provider and region restrictions for an API
Authorizations:
path Parameters
api required | string (RestrictionApi) Enum: "config" "locks" Example: config The name of a metadata API, for example "config" or "locks" |
query Parameters
from | string Example: from=base64:dGhlIG5leHQga2V5 Values of the |
Responses
Request samples
- CLI
- cURL
- Python
- Javascript
seaplane restrict list <API> --decode
Response samples
- 200
- 400
- 401
- 404
- 503
- 5XX
{- "next_key": "dGhlIG5leHQga2V5",
- "restrictions": [
- {
- "api": "config",
- "directory": "Zm9vL2Jhcgo",
- "details": {
- "regions_allowed": [
- "XE"
], - "regions_denied": [
- "XE"
], - "providers_allowed": [
- "AWS"
], - "providers_denied": [
- "AWS"
]
}, - "state": "enforced"
}
]
}
Replace all geographical or provider restrictions on a given directory with new restrictions
Authorizations:
path Parameters
api required | string (RestrictionApi) Enum: "config" "locks" Example: config The name of a metadata API, for example "config" or "locks" |
key required | string Example: Zm9vL2Jhcgo Key pointing to a directory, the key should be encoded using base64 encoding, unpadded, with URL and filename safe alphabet: RFC4648 section 5 |
Request Body schema: application/json
JSON object containing explicit allow or deny lists for geographies and cloud providers to be associated with a given directory
regions_allowed | Array of strings or null (Region) Enum: "XA" "XC" "XE" "XF" "XN" "XO" "XQ" "XS" "XU" A list of region codes |
regions_denied | Array of strings or null (Region) Enum: "XA" "XC" "XE" "XF" "XN" "XO" "XQ" "XS" "XU" A list of region codes |
providers_allowed | Array of strings or null (Provider) Enum: "AWS" "Azure" "DigitalOcean" "Equinix" "GCP" A list of provider names |
providers_denied | Array of strings or null (Provider) Enum: "AWS" "Azure" "DigitalOcean" "Equinix" "GCP" A list of provider names |
Responses
Request samples
- Payload
- CLI
- cURL
- Python
- Javascript
{- "providers_allowed": [
- "AWS"
], - "providers_denied": [
- "Azure"
], - "regions_allowed": [
- "XE"
], - "regions_denied": [
- "XQ"
]
}
Response samples
- 200
- 400
- 401
- 404
- 503
- 5XX
"OK"
Get information about the provider and region restrictions for a specific directory
Authorizations:
path Parameters
api required | string (RestrictionApi) Enum: "config" "locks" Example: config The name of a metadata API, for example "config" or "locks" |
key required | string Example: Zm9vL2Jhcgo Key pointing to a directory, the key should be encoded using base64 encoding, unpadded, with URL and filename safe alphabet: RFC4648 section 5 |
Responses
Request samples
- CLI
- cURL
- Python
- Javascript
seaplane restrict get <API> <DIRECTORY> --decode
Response samples
- 200
- 400
- 401
- 404
- 503
- 5XX
{- "api": "config",
- "directory": "Zm9vL2Jhcgo",
- "details": {
- "regions_allowed": [
- "XE"
], - "regions_denied": [
- "XE"
], - "providers_allowed": [
- "AWS"
], - "providers_denied": [
- "AWS"
]
}, - "state": "enforced"
}
Remove restrictions on a directory
Authorizations:
path Parameters
api required | string (RestrictionApi) Enum: "config" "locks" Example: config The name of a metadata API, for example "config" or "locks" |
key required | string Example: Zm9vL2Jhcgo Key pointing to a directory, the key should be encoded using base64 encoding, unpadded, with URL and filename safe alphabet: RFC4648 section 5 |
Responses
Request samples
- CLI
- cURL
- Python
- Javascript
seaplane restrict delete <API> <DIRECTORY>
Response samples
- 200
- 400
- 401
- 404
- 503
- 5XX
"OK"