# Store new API key
API call format
POST /images/api-keys `` //Use token autorization
{
"name":"<api_key_name>",
"active":true/false
}
Description
Store new API key
Precondition:
- Authorization token is needed.
- Mandatory elements:
- name - API key name
- active - Flag which determine weather API key is active ot not
Postcondition
- On success response code should be 200
- On success message for successful creation and api key guid are returned.
- On failure an error will be returned with the right error code and description.
Example:
[Request] PUT https://<base_api_url>/images/api-keys/<api_key_guid>
{
"name":"<new_api_key_name>",
"active":true
}
[Request Headers] {"Content-Type":"application/json","Accept":"application/json","Authorization":"<IdToken>"} //Use token autorization
[Response] 201
[Response Headers] {"Content-Type":["application/json"],"Content-Length":["..."],"Connection":["keep-alive"],"Date":["..... GMT"],"x-amzn-RequestId":["....."],....]}
[Response]
{
"status": true,
"data": "Item was updated successfully"
}