Skip to main content

Create a Custom API

POST 

/v2/settings/extensions/custom-apis

Create a Custom API

Request

Body

    data CustomApiAttributesrequired
    type stringrequired

    Specifies the type of the resource object, use custom_api for Custom APIs.

    name stringrequired

    Possible values: non-empty and <= 255 characters

    Specifies the name of this Custom API.

    description string

    Possible values: <= 255 characters

    Specifies the description for this Custom API.

    slug stringrequired

    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>.

    api_type stringrequired

    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.

    links object
    meta object
    timestamps objectrequired
    relationships object
    parent_apis objectrequired
    data object[]required
  • Array [
  • id stringrequired

    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.

    type stringrequired

    Possible values: [custom_api, api_location]

    Specifies the type of parent relationship, can be custom_api or api_location.

  • ]

Responses

Created

Schema
    data objectrequired
    id uuid

    The unique identifier for the Custom API.

    type stringrequired

    Specifies the type of the resource object, use custom_api for Custom APIs.

    name stringrequired

    Possible values: non-empty and <= 255 characters

    Specifies the name of this Custom API.

    description string

    Possible values: <= 255 characters

    Specifies the description for this Custom API.

    slug stringrequired

    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>.

    api_type stringrequired

    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.

    links objectrequired
    self uri

    Specifies the URI of the Custom API.

    meta object
    timestamps objectrequired
    updated_at stringrequired

    Specifies the date the entity is created.

    created_at stringrequired

    Specifies the date the entity is last updated.

    relationships objectrequired
    parent_apis objectrequired
    data object[]required
  • Array [
  • id stringrequired

    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.

    type stringrequired

    Possible values: [custom_api, api_location]

    Specifies the type of parent relationship, can be custom_api or api_location.

  • ]
Loading...