List key metadata (GET /v1/{tenant_id}/secrets)
Lists key metadata.
{tenant_id}: Project ID used to retrieve key metadata
Request headers
X-Auth-Token
Specify the authentication token.
Data type | Cardinality |
---|---|
String | 1..1 |
Request parameters
limit
Maximum number of resources to return in the response (the default is 10)
Data type | Cardinality |
---|---|
int | 0..1 |
offset
Starting index of resources to be listed (the default is 0)
Data type | Cardinality |
---|---|
int | 0..1 |
Request body
None
Response headers
Status
The following error codes can be returned for the request.
One of the following values will be returned.
- 200:
- Normal completion
- 401:
- Authentication error (no authentication token, incorrect authentication token, etc.)
- 400:
- Invalid access (invalid parameter, etc.)
- 403:
- Cannot access (no privileges)
- 404:
- No applicable resources
- 500:
- Unexpected error
Data type | Cardinality |
---|---|
int | 1..1 |
Response elements
secrets
Envelope of key metadata list
Data type | Cardinality | Parent element | Child element |
---|---|---|---|
Element | 1..1 | None | (secret) |
(secret) Element name is not displayed in JSON
Envelope of key metadata
Data type | Cardinality | Parent element | Child element |
---|---|---|---|
Element | 0..* | secrets | name status algorithm mode bit_length content_types expiration secret_ref updated created |
name
Key name
Data type | Cardinality | Parent element | Child element |
---|---|---|---|
String | 1..1 | (secret) | None |
status
Key status
Data type | Cardinality | Parent element | Child element |
---|---|---|---|
Enum(ACTIVE,ERROR) | 1..1 | (secret) | None |
algorithm
Algorithm used to generate the key
Data type | Cardinality | Parent element | Child element |
---|---|---|---|
String | 1..1 | (secret) | None |
mode
Mode of algorithm associated with the key
Data type | Cardinality | Parent element | Child element |
---|---|---|---|
String | 1..1 | (secret) | None |
bit_length
Bit range of the key
Data type | Cardinality | Parent element | Child element |
---|---|---|---|
int | 1..1 | (secret) | None |
content_types
Accept header value required for browsing the payload
Data type | Cardinality | Parent element | Child element |
---|---|---|---|
String | 0..1 | (secret) | None |
expiration
Key expiry datetime Value is returned in ISO-8601 format. When the expiry datetime is reached, the key is automatically deleted. If set to null, the key will not expiry (it will not be deleted automatically)
Data type | Cardinality | Parent element | Child element |
---|---|---|---|
String | 1..1 | (secret) | None |
secret_ref
Key metadata resource URI
Data type | Cardinality | Parent element | Child element |
---|---|---|---|
String | 1..1 | (secret) | None |
updated
Timestamp (UTC) of last update
Data type | Cardinality | Parent element | Child element |
---|---|---|---|
datetime | 1..1 | (secret) | None |
created
Timestamp (UTC) of creation
Data type | Cardinality | Parent element | Child element |
---|---|---|---|
datetime | 1..1 | (secret) | None |
total
Number of key metadata records registered for the project
Data type | Cardinality | Parent element | Child element |
---|---|---|---|
int | 1..1 | None | None |
previous
The previous key metadata resource offset information in the retrieved key metadata list
Data type | Cardinality | Parent element | Child element |
---|---|---|---|
String | 0..1 | None | None |
next
The next key metadata resource offset information in the retrieved key metadata list
Data type | Cardinality | Parent element | Child element |
---|---|---|---|
String | 0..1 | None | None |
Example of request
GET /v1/a759452216fd41cf8ee5aba321cfbd49/secrets?limit=2&offset=3
X-Auth-Token: "JpZCI6ICJjM2VlNzA4YTZhZTI0ZGRmOTJjMDc4 . . ."
Example of response
Status Code: 200 OK
Content-Length: 2446
Content-Type: application/json; charset=UTF-8
{
"secrets": [
{
"status": "ACTIVE",
"secret_ref": "http://<host>:9311/v1/a759452216fd41cf8ee5aba321cfbd49/secrets/82b63ed0-3ec7-4f3c-93b6-dde9a3c81b99",
"updated": "2014-07-15T06:04:23.502093",
"name": "key1",
"algorithm": null,
"created": "2014-07-15T06:04:23.490168",
"content_types": {
"default": "text/plain"
},
"mode": null,
"bit_length": null,
"expiration": "2015-02-28T19:14:44.180394"
},
"total": 20,
"next": http://<host>:9311/v1/ a759452216fd41cf8ee5aba321cfbd49/secrets?limit=1&offset=3,
"previous": http://<host>:9311/v1/ a759452216fd41cf8ee5aba321cfbd49/secrets?limit=1&offset=1
}