Get all Custom Fields
GEThttps://useast.api.elasticpath.com/v2/settings/extensions/custom-apis/:custom_api_id/fields
Get all Custom Fields
Filtering
The following operators and attributes are available for filtering Custom Fields:
Attribute | Operators | Example |
---|---|---|
name | eq ,like | eq(name,"Last Name") |
description | eq ,like | like(description,*confidential*) |
slug | eq ,like ,in | like(slug,*private*) |
field_type | eq ,in | eq(field_type,string) |
id | lt ,le ,eq ,gt ,ge ,in | eq(id,859aeba1-03c2-4822-bd4c-89afce93d7eb) |
created_at | lt ,le ,eq ,gt ,ge | ge(created_at,2024-04-29T00:00:00.000Z) |
updated_at | lt ,le ,eq ,gt ,ge | le(updated_at,2024-04-29T00:00:00.000Z) |
Sorting
The following attributes are available for filtering. When specified, the results are sorted in ascending order based on the value of the field. To sort in descending order, prefix the attribute with -
, for example, -updated_at
. The default sort order is created_at
in descending order.
created_at
description
field_type
id
name
updated_at
Request
Path Parameters
The id of the Custom API.
Query Parameters
Possible values: <= 10000
The current offset by number of records, not pages. Offset is zero-based. The maximum records you can offset is 10,000. If no page size is set, the page length store setting is used.
The maximum number of records per page for this response. You can set this value up to 100. If no page size is set, the page length store setting is used.
Filter attributes. For more information, see the Filtering section.
Sort attributes, For more information, see the Sorting section.
Responses
- 200
- 400
- 404
- 500
OK
- application/json
- Schema
- Example (from schema)
- getFields
Schema
data object[]required
meta object
links object
{
"data": [
null,
null,
null,
null
],
"meta": {
"results": {
"total": 0
},
"page": {
"limit": 100,
"offset": 0,
"current": 1,
"total": 1
}
},
"links": {
"current": "/v2/settings/custom-apis?page[offset]=0&page[limit]=100",
"first": "/v2/settings/custom-apis?page[offset]=0&page[limit]=100",
"last": "/v2/settings/custom-apis?page[offset]=0&page[limit]=100",
"next": null,
"prev": null
}
}
{
"data": [
{
"type": "custom_field",
"name": "Name",
"description": "This field stores the name of the wishlist.",
"slug": "name",
"field_type": "string",
"validation": {
"string": {
"min_length": 3,
"max_length": 128,
"regex": "[a-zA-Z0-9 ]{3,128}",
"allow_null_values": true,
"immutable": false,
"unique": "no",
"unique_case_insensitivity": false
}
}
}
],
"meta": {
"page": {
"limit": 100,
"offset": 0,
"current": 1,
"total": 1
},
"results": {
"total": 1
}
},
"links": {
"current": "/settings/extensions/custom-apis/3fa85f64-5717-4562-b3fc-2c963f66afa6/fields?page[limit]=100&page[offset]=0",
"first": "/settings/extensions/custom-apis/3fa85f64-5717-4562-b3fc-2c963f66afa6/fields?page[limit]=100&page[offset]=0",
"last": "/settings/extensions/custom-apis/3fa85f64-5717-4562-b3fc-2c963f66afa6/fields?page[limit]=100&page[offset]=0",
"next": null,
"prev": null
}
}
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": [
{
"detail": "Invalid filter: unknown field [version] specified in search filter, allowed fields are [api_type created_at description id name slug updated_at]",
"status": "400",
"title": "Bad Request"
}
]
}
Not found. The requested entity does not exist.
- application/json
- Schema
- Example (from schema)
- not-found
Schema
errors Error[]required
{
"errors": [
{
"title": "string",
"status": "string",
"detail": "string"
}
]
}
Requested entity not found
{
"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
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 GET 'https://useast.api.elasticpath.com/v2/settings/extensions/custom-apis/:custom_api_id/fields' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>'