Standard five endpoints created by default for each generated content type.
GET /api/{contentTypeName}
GET /api/{contentTypeName}/{documentId}
POST /api/{contentTypeName}
PUT /api/{contentTypeName}/{documentId}
DELETE /api/{contentTypeName}/{documentId}
paths:
/api/content_type_name:
get:
summary: Return many entities by query
parameters:
- name: page
in: query
description: The page of the paginated list
required: false
schema:
type: integer
default: 1
- name: pageSize
in: query
description: The max size of the page
required: false
schema:
type: integer
default: 20
- name: sort
in: query
description: The order to sort by, represented as a comma separated list of attribute names prefixed by '-' for descending order and not prefixed for ascending order
required: false
schema:
type: array
items:
type: string
- name: filter
in: query
description: The conditions to filter by
required: false
schema:
$ref: '#/components/schemas/Filter'
- name: fields
in: query
description: The attributes to return, represented as a comma separated list of attribute names
required: false
schema:
type: array
items:
type: string
- name: populate
in: query
description: The relations to populate, represented as a comma separated list of attribute names
required: false
schema:
type: array
items:
type: string
responses:
'200':
description: ok
content:
application/json:
schema:
$ref: '#/components/schemas/Response'
post:
summary: Create an entity
requestBody:
description: The entity to create
required: true
content:
application/json:
schema:
responses:
'200':
description: ok
content:
application/json:
schema:
$ref: '#/components/schemas/Response'
/api/content_type_name/{documentId}:
get:
summary: Return an entity by id
parameters:
- name: documentId
in: path
description: The id of the entity to return
required: true
schema:
type: string
responses:
'200':
description: ok
content:
application/json:
schema:
$ref: '#/components/schemas/Response'
put:
summary: Update an entity by id
parameters:
- name: documentId
in: path
description: The id of the entity to update
required: true
schema:
type: string
requestBody:
description: The entity to update to
required: true
content:
application/json:
schema:
responses:
'200':
description: ok
content:
application/json:
schema:
$ref: '#/components/schemas/Response'
delete:
summary: Delete an entity by id
parameters:
- name: documentId
in: path
description: The id of the entity to delete
required: true
schema:
type: string
responses:
'200':
description: ok
content:
application/json:
schema:
$ref: '#/components/schemas/Response'
components:
schemas:
Filter:
**HELP**
documentId is dependent on whether the model is a sensitive or non-sensitive model.
{
"documentId": "1", / "documentId": "uuid1231",
...,
"meta": {
... # Addable
"pagination": {
"page": 1,
"pageSize": 10
}
}
}