Create an Application Key
POSThttps://useast.api.elasticpath.com/v2/application-keys
Create an Application Key
Request
- application/json
Body
required
data ApplicationKeyrequired
Responses
- 201
- 400
- 409
- default
Created
- application/json
- Schema
- Example (from schema)
Schema
data object
{
"data": {
"id": "0c45e4ec-26e0-4043-86e4-c15b9cf985a0",
"name": "App Key",
"type": "string",
"client_id": "Z2dDp1f1Tg30p2C6ZVit7W1AKUtVhMVSTAPOIK4adA",
"client_secret": "jN8qLHneOn8C1rv0r3J3XZK1cRiZG3rajcLi9X1cZZ",
"reserved_rate_limit": 10,
"meta": {
"timestamps": {
"created_at": "2017-01-10T11:41:19.244Z",
"updated_at": "2017-01-10T11:41:19.244Z",
"last_used_at": "2017-01-10T11:41:19.244Z"
}
},
"links": {
"self": "https://useast.api.elasticpath.com/v2/application-keys/0c45e4ec-26e0-4043-86e4-c15b9cf985a0"
}
}
}
Bad request. The request failed validation.
- application/json
- Schema
- Example (from schema)
- missing-name
Schema
errors Error[]required
{
"errors": [
{
"title": "string",
"status": "string",
"detail": "string"
}
]
}
Required field missing
{
"errors": [
{
"title": "Bad Request",
"status": "400",
"detail": "The field 'name' is required."
}
]
}
Conflict
- application/json
- Schema
- Example (from schema)
- exceeds-limit
Schema
errors Error[]required
{
"errors": [
{
"title": "string",
"status": "string",
"detail": "string"
}
]
}
Requested limit exceeds maximum
{
"errors": [
{
"detail": "requested reserved rate limit will exceed the maximum",
"status": "409",
"title": "Conflict"
}
]
}
Internal server error. There was a system failure in the platform.
- application/json
- Schema
- Example (from schema)
- internal-server-error
Schema
errors Error[]required
{
"errors": [
{
"title": "string",
"status": "string",
"detail": "string"
}
]
}
Internal server error
{
"errors": [
{
"title": "Internal Server Error",
"status": "500",
"detail": "there was a problem processing your request"
}
]
}
Authorization: http
name: bearerAuthtype: httpscheme: bearer
- curl
- python
- go
- nodejs
- ruby
- csharp
- php
- java
- powershell
- CURL
curl -L -X POST 'https://useast.api.elasticpath.com/v2/application-keys' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
--data-raw '{
"data": {
"name": "App Key",
"reserved_rate_limit": 10,
"type": "string"
}
}'
ResponseClear