Updated Get Secrets request and response

Removed tenant ID
Added x-project-id header
Updated response with new format

Change-Id: I6e0cbb9e69f03734300e207245901febc13f0786
This commit is contained in:
Sheena Gregson 2014-08-27 15:58:58 -05:00
parent d7f50d3161
commit 898e44c8c2
2 changed files with 35 additions and 48 deletions

View File

@ -1,2 +1,2 @@
curl -H 'Accept: application/json'\
https://endpointURL/v1/12345/secrets
curl -H 'Accept: application/json' -H 'X-Project-Id: 12345' \
https://endpointURL/v1/secrets

View File

@ -1,48 +1,35 @@
{
"secrets": [
{
"status": "ACTIVE",
"updated": "2013-06-28T15:23:30.668641",
"mode": "cbc",
"name": "Main Encryption Key",
"algorithm": "AES",
"created": "2013-06-28T15:23:30.668619",
"secret_ref": "http://endpointURL/v1/12345/secrets/e171bb2d-f14f-433e-84f0-3dfcac7a7311",
"expiration": "2014-06-28T15:23:30.668619",
"bit_length": 256,
"content_types": {
"default": "application/octet-stream"
}
},
{
"status": "ACTIVE",
"updated": "2013-06-28T15:23:32.210474",
"mode": "cbc",
"name": "Backup Key",
"algorithm": "AES",
"created": "2013-06-28T15:23:32.210467",
"secret_ref": "http://endpointURL/v1/12345/secrets/6dba7827-c232-4a2b-8f3d-f523ca3a3f99",
"expiration": null,
"bit_length": 256,
"content_types": {
"default": "application/octet-stream"
}
},
{
"status": "ACTIVE",
"updated": "2013-06-28T15:23:33.092660",
"mode": null,
"name": "PostgreSQL admin password",
"algorithm": null,
"created": "2013-06-28T15:23:33.092635",
"secret_ref": "http://endpointURL/v1/12345/secrets/6dfa448d-c35a-4158-abaf-e4c249efb580",
"expiration": null,
"bit_length": null,
"content_types": {
"default": "text/plain"
}
}
],
"next": "http://endpointURL/v1/12345/secrets?limit=3&offset=5",
"previous": "http://endpointURL/v1/12345/secrets?limit=3&offset=0"
"secrets": [
{
"status": "ACTIVE",
"secret_ref": "http://endpointURL/v1/secrets/15108db8-4505-4c5b-96b9-a9838951f28f",
"updated": "2014-08-25T20:43:01.510569",
"name": "secretname",
"algorithm": "aes",
"created": "2014-08-25T20:43:01.421625",
"content_types": {
"default": "application/octet-stream"
},
"mode": "cbc",
"bit_length": 256,
"expiration": null
},
{
"status": "ACTIVE",
"secret_ref": "http://endpointURL/v1/secrets/f74a51d2-99a8-423a-8cea-2bf10b263584",
"updated": "2014-08-25T21:18:35.821340",
"name": "secretname",
"algorithm": "aes",
"created": "2014-08-25T21:18:35.719952",
"content_types": {
"default": "application/octet-stream"
},
"mode": "cbc",
"bit_length": 256,
"expiration": null
}
],
"total": 4,
"next": "http://endpointURL/v1/secrets?limit=2&offset=3",
"previous": "http://endpointURL/v1/secrets?limit=2&offset=0"
}