Classes API
The following parameters in headers are required for all api
- Content-Type (must be 'text/plain')
- Accept-Language (e.g. zh-CN,en-US)
Query ItemType
path Parameters
queryItemType required | string Must be "ItemType" |
header Parameters
Content-Type required | string Content Type(must be 'text/plain') |
Accept-Language required | string Accept Language(e.g. zh-CN,en-US) |
Request Body schema: text/plain
_ApplicationId required | string ApplicationId(e.g. osc) |
_SessionToken required | string User token |
_method required | string Value: "GET" must be "Get" |
skip | number Sets the number of results to skip before returning any results. This is useful for pagination. Default is to skip zero results. |
limit | number Sets the limit of the number of results to return. The default limit is 100. |
string or string[] Includes nested objects for the provided key.You can use dot notation to specify which fields in the included object are also fetched. | |
string or string[] Sorts the results in order by the given key, but can also add secondary sort descriptors without overwriting _order. e.g. | |
string or string[] Restricts the fields of the returned objects to include only the provided keys. | |
string or string[] Restricts the fields of the returned objects to all keys except the provided keys. | |
object Query condition |
Responses
Request samples
- js
const data = await axios({ url: '/parse/classes/ItemType', method: 'POST', data:{ _ApplicationId: 'osc', _SessionToken: '', _method: 'GET', where: { objectId: { $in: ['UWHEDRRz7j', 'jasPZZVVEQ'], }, key: { $regex: '\\Q\\E' }, name: 'Story' }, limit: 10, order: '-createAt' }, headers: { "Content-Type": "text/plain", "Accept-Language": "zh-CN", } })
Response samples
- 200
{- "count": 0,
- "results": [
- {
- "objectId": "fZRM3fnHyb",
- "name": "Story",
- "key": "story",
- "icon": "/icons/Issue_Risk.svg",
- "createdAt": "2023-02-08T08:24:11.137Z",
- "createdBy": {
- "__type": "Pointer",
- "className": "_User",
- "objectId": "jasPZZVVEQ"
}
}
]
}
Create ItemType
header Parameters
Content-Type required | string Content Type(must be 'text/plain') |
Accept-Language required | string Accept Language(e.g. zh-CN,en-US) |
Request Body schema: text/plain
_ApplicationId required | string ApplicationId(e.g. osc) |
_SessionToken required | string User token |
Responses
Request samples
- js
const data = await axios({ url: '/parse/classes/ItemType', method: 'POST', data:{ _ApplicationId: 'osc', _SessionToken: '', name: 'Story', key: 'story', icon: '/icons/Issue_Plan.svg', }, headers: { "Content-Type": "text/plain", "Accept-Language": "zh-CN", } })
Response samples
- 200
{- "objectId": "fZRM3fnHyb",
- "createAt": "2023-02-08T08:24:11.137Z",
- "createdBy": {
- "__type": "Pointer",
- "className": "_User",
- "objectId": "jasPZZVVEQ"
}
}
Update ItemType
path Parameters
UpdateId required | string The objectId to update |
header Parameters
Content-Type required | string Content Type(must be 'text/plain') |
Accept-Language required | string Accept Language(e.g. zh-CN,en-US) |
Request Body schema: text/plain
_ApplicationId required | string ApplicationId(e.g. osc) |
_SessionToken required | string User token |
_method required | string Value: "PUT" must be "PUT" |
Responses
Request samples
- js
const itemTypeId = 'uAKYZbdYP4'; const data = await axios({ url: `/parse/classes/ItemType/${itemTypeId}`, method: 'POST', data:{ _ApplicationId: 'osc', _SessionToken: '', _method: 'PUT', name: 'Story', key: 'story', icon: '/icons/Issue_Plan.svg', }, headers: { "Content-Type": "text/plain", "Accept-Language": "zh-CN", } })
Response samples
- 200
{- "updatedAt": "2023-02-08T08:24:11.137Z",
- "createdBy": {
- "__type": "Pointer",
- "className": "_User",
- "objectId": "jasPZZVVEQ"
}, - "updatedBy": {
- "__type": "Pointer",
- "className": "_User",
- "objectId": "jasPZZVVEQ"
}
}
Delete ItemType
path Parameters
DeleteId required | string The objectId to delete |
header Parameters
Content-Type required | string Content Type(must be 'text/plain') |
Accept-Language required | string Accept Language(e.g. zh-CN,en-US) |
Request Body schema: text/plain
_ApplicationId required | string ApplicationId(e.g. osc) |
_SessionToken required | string User token |
_method required | string Value: "DELETE" must be "DELETE" |
Responses
Request samples
- js
const itemTypeId = 'uAKYZbdYP4'; await axios({ url: `/parse/classes/ItemType/${itemTypeId}`, method: 'POST', data:{ _ApplicationId: 'osc', _SessionToken: '', _method: 'DELETE', }, headers: { "Content-Type": "text/plain", "Accept-Language": "zh-CN", } })
Response samples
- 200
{ }