1.3 KiB
1.3 KiB
Keys API
Get keys list [GET /v3/keys]
Get keys list
Request
- Policy: read_keys
- Method: GET
- Headers:
- Accept: application/json
Response
Status: 200
- Headers:
- Content-Type: application/json
- Body:
[
{
"id" : "key_id",
"created_at": timestamp
}
]
Create key [POST /v3/key]
Create new key
Request
- Policy: create_keys
- Method: POST
- Headers:
- Accept: application/json
- Content-Type: application/json
- Body:
{
"key_name" : "key name",
"file_name" : "file name",
"content" : "file content"
}
Response
Status: 201
- Headers:
- Content-Type: application/json
- Body:
{
"id" : "key_id",
"message" : "Created"
}
Status: 422
- Headers:
- Content-Type: application/json
- Body:
{
"id" : "key_id",
"message" : "Created"
}
Delete key [DELETE /v3/key/:key_id]
Delete key with id ':key_id'
Request
- Policy: delete_keys
- Method: DELETE
- Headers:
- Accept: application/json
- Params:
- :key_id - key id
Response
Status: 200
- Headers:
- Content-Type: application/json
- Body:
{
"id" : "key_id",
"message" : "Deleted"
}