Get a Custom API
GET/v2/settings/extensions/custom-apis/:custom_api_id
Get a Custom API
Request
Path Parameters
The id of the Custom API.
Responses
- 200
- 400
- 404
- 500
OK
- application/json
- Schema
- Example (from schema)
Schema
- Array [
- ]
data objectrequired
The unique identifier for the Custom API.
Specifies the type of the resource object, use custom_api
for Custom APIs.
Possible values: non-empty
and <= 255 characters
Specifies the name of this Custom API.
Possible values: <= 255 characters
Specifies the description for this Custom API.
Possible values: Value must match regular expression ^[a-z0-9_-]{1,63}$
Specifies a unique slug identifier for the Custom API. The API Entries for the created Custom API will be accessible at the location /v2/extensions/<slug>
.
Possible values: Value must match regular expression ^[a-z0-9_]{1,59}_ext$
Specifies a unique API type for this Custom API. Entries for this API will use this value for their type
field. This field must be suffixed with _ext
to distinguish it from built in APIs.
Controls whether upsert operations are allowed for Custom API Entries via the PUT
method. When set to true
, it allows the creation of new Custom API Entries using PUT
if the record doesn't exist, and updates the existing record if it does. When false
, PUT
requests can only update existing entries.
links object
Specifies the URI of the Custom API.
meta object
timestamps objectrequired
Specifies the date the entity is created.
Specifies the date the entity is last updated.
relationships object
parent_apis objectrequired
data object[]required
The unique identifier for the related Custom API. When the type
of an object is set to api_location
then id
must be /v2/extensions
.
When the type
of an object is set to custom_api
, then id
must be that of a Custom API that results in a relationship that does not have a depth exceeding 2 and does not result in a cycle.
Possible values: [custom_api
, api_location
]
Specifies the type of parent relationship, can be custom_api
or api_location
.
{
"data": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"type": "string",
"name": "string",
"description": "string",
"slug": "string",
"api_type": "string",
"allow_upserts": false,
"links": {
"self": "/settings/extensions/custom-apis/3fa85f64-5717-4562-b3fc-2c963f66afa6"
},
"meta": {
"timestamps": {
"updated_at": "2017-01-10T11:41:19.244Z",
"created_at": "2017-01-10T11:41:19.244Z"
}
},
"relationships": {
"parent_apis": {
"data": [
{
"id": "652e39d8-d613-493e-8c20-fef99ad6327a",
"type": "custom_api"
}
]
}
}
}
}
Bad request. The request failed validation.
- application/json
- Schema
- Example (from schema)
- missing-name
Schema
- Array [
- ]
errors Error[]required
A brief summary of the error.
The HTTP response code of the error.
Optional additional detail about the error.
{
"errors": [
{
"title": "string",
"status": "string",
"detail": "string"
}
]
}
{
"errors": [
{
"title": "Bad Request",
"status": "400",
"detail": "The field 'name' is required."
}
]
}
Not found. The requested entity does not exist.
- application/json
- Schema
- Example (from schema)
- not-found
Schema
- Array [
- ]
errors Error[]required
A brief summary of the error.
The HTTP response code of the error.
Optional additional detail about the error.
{
"errors": [
{
"title": "string",
"status": "string",
"detail": "string"
}
]
}
{
"errors": [
{
"title": "Not Found",
"status": "404",
"detail": "Not found"
}
]
}
Internal server error. There was a system failure in the platform.
- application/json
- Schema
- Example (from schema)
- internal-server-error
Schema
- Array [
- ]
errors Error[]required
A brief summary of the error.
The HTTP response code of the error.
Optional additional detail about the error.
{
"errors": [
{
"title": "string",
"status": "string",
"detail": "string"
}
]
}
{
"errors": [
{
"title": "Internal Server Error",
"status": "500",
"detail": "there was a problem processing your request"
}
]
}