Movable Type Data API v4
The Movable Type Data API is a REST interface to the Movable Type Content Management System. The Data API is available for Movable Type Pro and Movable Type Advanced / Enterprise, Version 6.0 and higher.
Movable Type Data API v4 was released in Movable Type 7.0
Movable Type > 開発者向け ドキュメント > Movable Type Data API ドキュメント
Common API ¶
Common API
Version ¶
Get server API versionGET/version
Retrieves Data API version of the server.
This endpoint is available in Movable Type 6.2.4 or later.
This endpoint does not need /v3 or something API endpoint version identifier.
You can call like: https://host/path/your-mt-data-api.cgi/version
Example URI
JSON Message
Headers
Accept: application/json
200
Headers
Content-Type: application/json
Body
{
"endpointVersion": "v3",
"apiVersion": "3.01"
}
Authentication ¶
Authentication ¶
User authenticationPOST/authentication
Create a new session and access token. This is like sign-in.
The post data is follows
-
username (required, string) - The username for authentication.
-
password (required, string) - The password for authentication. From version 3, it was changed to use web services password instead of the password.
-
clientId (required, string) - If you want to create a new session or access token, you should specify the clientId. If you specify session id via “X-MT-Authorization” in the request header, clientId is not required.
-
remember (optional, boolean) - If true (generally, “1” is specified.), a new session will be created as a persistent session. If you want to specify false, you can pass “” or “0” to this parameter.
-
mtDataApiLoginMagicToken (optional, string) - This is not required if you authenticate except via browser. If this parameter is passed and valid Movable Type will set cookie in order to start a session.
Example URI
Headers
Content-Type: application/x-www-form-urlencoded
Body
username={Your Sign-in Name}&password={Your sign-in Password}&clientId={Your Client ID}
200
Headers
Content-Type: application/json
Body
{
"accessToken": "EowKdyeBcEUNbiFEXlp0bdQz5RJgdkJYLbBDRJ4m",
"sessionId": "8VtaTLTLp8V9OR5Dz40hO7by8wf0wbCsCkBue0Xv",
"expiresIn": 3600,
"remember": false
}
401
Headers
Content-Type: application/json
Body
{
"error": {
"code": 401,
"message": "Invalid login"
}
}
Invalidate current sessionDELETE/authentication
Invalidate current session. This is like sign-out. All access tokens related to that session will invalidated too.
This method accepts DELETE or POST with __method=DELETE.
Example URI
Headers
Content-Type: application/x-www-form-urlencoded
X-MT-Authorization: MTAuth sessionId={session_id}
200
Headers
Content-Type: application/json
Body
{
"status": "success"
}
User authentication via sing-in Screen ¶
User authentication via sing-in ScreenGET/authorization
When this endpoint called from application, user will move to sign-in screen of Movable Type.
And then user will move to new location that specified in the redirectUrl parameter when user has been authenticated.
If your application is running on web browser, you should use this endpoint instead of /authenticatoin
.
Example URI
200
Headers
Content-Type: text/html
Token ¶
Create a new access tokenPOST/token
Create a new access token that related to current session.
Example URI
Headers
Content-Type: application/x-www-form-urlencoded
X-MT-Authorization: MTAuth sessionId={SessionId}
Body
{
"clientId": "Hello, world!"
}
Schema
{
"type": "object",
"properties": {
"clientId": {
"type": "string",
"description": "If you specify session id via \"X-MT-Authorization\" in the request header, clientId is not required."
}
},
"$schema": "http://json-schema.org/draft-04/schema#"
}
200
Headers
Content-Type: application/json
Body
{
"accessToken": "EowKdyeBcEUNbiFEXlp0bdQz5RJgdkJYLbBDRJ4m",
"expiresIn": 3600
}
401
Headers
Content-Type: application/json
Body
{
"error": {
"code": 401,
"message": "Unauthorized"
}
}
Invalidate current access tokenDELETE/token
Invalidate current access token. This is not sign-out. If the browser has active session ID, new access token can be obtained easily.
This method accepts DELETE and POST with __method=DELETE.
Example URI
Headers
Content-Type: application/x-www-form-urlencoded
X-MT-Authorization: MTAuth accessToken={AccessToken}
200
Headers
Content-Type: application/json
Body
{
"status": "success"
}
Assets ¶
This is the Assets resource.
Upload ¶
Upload a single filePOST/assets/upload{?overwrite_once}
Upload a single file. This endpoint needs following permissions.
- upload
Post form data is following:
-
site_id: 1 (number, required) - The site ID to upload.
-
path:
/images
(string) - The upload destination. -
autoRenameIfExists: true (boolean) - If true specified, uploaded file will be renamed automatically when same file already exists.
-
normalizeOrientation: false (boolean) - If true spoecified, automatically modify file orientation by EXIF record.
Example URI
- overwrite_once
number
(optional)If specify “1”, the API always overwrites an existing file with the uploaded file. This parameter is available in Movable Type 6.1.2
Headers
Content-Type: multipart/form-data
X-MT-Authorization: MTAuth accessToken=<TOKEN>
200
No Errors.
Headers
Content-Type: application/json
Body
{
"blog": {
"id": 1
},
"class": "Hello, world!",
"createdBy": {
"id": 1,
"displayName": "Hello, world!",
"userpicUrl": "Hello, world!"
},
"createdDate": "Hello, world!",
"customFields": [
{
"basename": "Hello, world!",
"value": "Hello, world!"
}
],
"description": "Hello, world!",
"fileExt": "Hello, world!",
"filename": "Hello, world!",
"id": 1,
"label": "Hello, world!",
"meta": {
"fileSize": 1,
"height": 1,
"width": 1
},
"mimeType": "Hello, world!",
"modifiedBy": {
"id": 1,
"displayName": "Hello, world!",
"userpicUrl": "Hello, world!"
},
"modifiedDate": "Hello, world!",
"parent": {
"id": 1
},
"tags": [
"Hello, world!"
],
"updatable": true,
"url": "Hello, world!"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"blog": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "The ID of the site that contains this asset."
}
}
},
"class": {
"type": "string",
"description": "The type of this asset. This value is similar to 'type' attribute but this value is never localized."
},
"createdBy": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "The ID of user who created asset."
},
"displayName": {
"type": "string",
"description": "The display name of user who created asset."
},
"userpicUrl": {
"type": "string",
"description": "The URL of creating user’s userpic. The userpic will be made by UserpicThumbnailSize and UserpicAllowRect settings. If user does not set own userpic, empty string will be returned."
}
}
},
"createdDate": {
"type": "string",
"description": "The created time for this asset. (format: iso 8601 datetime)"
},
"customFields": {
"type": "array"
},
"description": {
"type": "string",
"description": "The description of this asset."
},
"fileExt": {
"type": "string",
"description": "The file extension of this asset. Returns the file extension without the leading period."
},
"filename": {
"type": "string",
"description": "The filename of this asset that includes file extension."
},
"id": {
"type": "number",
"description": "The ID of this asset."
},
"label": {
"type": "string",
"description": "The label of this asset."
},
"meta": {
"type": "object",
"properties": {
"fileSize": {
"type": "number",
"description": "The file size of this asset. If this asset is not file-based asset, will return null."
},
"height": {
"type": "number",
"description": "The height of this asset. If this asset has no height meta information, will return null"
},
"width": {
"type": "number",
"description": "The width of this asset. If this asset has no width meta information, will return null."
}
}
},
"mimeType": {
"type": "string",
"description": "The MIME Type of this asset."
},
"modifiedBy": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "The ID of user who modified asset."
},
"displayName": {
"type": "string",
"description": "The display name of user who modified asset."
},
"userpicUrl": {
"type": "string",
"description": "The URL of modifying user’s userpic. The userpic will be made by UserpicThumbnailSize and UserpicAllowRect settings. If user does not set own userpic, empty string will be returned."
}
}
},
"modifiedDate": {
"type": "string",
"description": "The last modified time for this asset. (format: iso 8601 datetime)"
},
"parent": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "The ID of parent asset."
}
}
},
"tags": {
"type": "array",
"description": "A list of tags associated with this asset."
},
"updatable": {
"type": "boolean",
"description": "true: The user who accessed can update this asset.\n\nfalse: The user who accessed cannot update this asset."
},
"url": {
"type": "string",
"description": "The permalink URL of this asset."
}
}
}
403
Do not have permission to upload file.
Headers
Content-Type: application/json
404
Site not found.
Headers
Content-Type: application/json
409
Uploaded file already exists.
Headers
Content-Type: application/json
413
Upload file size is larger than CGIMaxUpload.
Headers
Content-Type: application/json
Assets Collection ¶
Assets CollectionGET/sites/{site_id}/assets{?search,searchFields,limit,offset,class,sortBy,sortOrder,fields,relatedAssets,dateField,dateFrom,dateTo}
Retrieve list of assets in the specified site.
Example URI
- site_id
number
(required)The site ID. If 0 specified, will retrieve system-level assets.
- search
string
(optional)Search query.
- searchFields
string
(optional) Example: labelThe comma separated list of field names to search.
- limit
number
(optional) Example: 10Maximum number of assets to retrieve.
- offset
number
(optional) Example: 00-indexed offset.
- class
string
(optional)The target asset class to retrieve. Supported values are 'image’, 'audio’, 'video’, 'file’, and any values added by plugins. If you want to retrieve multiple classes, specify the values separated by commas.
- sortBy
string
(optional) Example: created_on-
file_name: Sort by the filename of each asset.
-
created_by: Sort by the ID of user who created each asset.
-
created_on (default): Sort by the created time of each asset.
-
- sortOrder
string
(optional) Example: descend-
descend (default): Return assets in descending order. For sorting by date, it means from newest to oldest.
-
ascend: Return assets in ascending order. For sorting by date, it means from oldest to newest.
-
- fields
string
(optional)The field list to retrieve as part of the Assets resource. The list of field names should be separated by commas. If this parameter is not specified, all fields will be returned.
- relatedAssets
boolean
(optional)If you want to retrieve related assets (e.g. thumbnail, popup html) that generated by original asset, you should specify this parameter as true.
- dateField
string
(optional) Example: created_onSpecifies the field name to be used as a date field for filtering. (new in v3)
- dateFrom
string
(optional)The start date to filtering. Specify in “YYYY-MM-DD” format. (new in v3)
- dateTo
string
(optional)The end date to filtering. Specify in “YYYY-MM-DD” format. (new in v3)
200
No Errors.
Headers
Content-Type: application/json
Body
{
"totalResults": 1,
"items": [
{
"blog": {
"id": 1
},
"class": "Hello, world!",
"createdBy": {
"id": 1,
"displayName": "Hello, world!",
"userpicUrl": "Hello, world!"
},
"createdDate": "Hello, world!",
"customFields": [
{
"basename": "Hello, world!",
"value": "Hello, world!"
}
],
"description": "Hello, world!",
"fileExt": "Hello, world!",
"filename": "Hello, world!",
"id": 1,
"label": "Hello, world!",
"meta": {
"fileSize": 1,
"height": 1,
"width": 1
},
"mimeType": "Hello, world!",
"modifiedBy": {
"id": 1,
"displayName": "Hello, world!",
"userpicUrl": "Hello, world!"
},
"modifiedDate": "Hello, world!",
"parent": {
"id": 1
},
"tags": [
"Hello, world!"
],
"updatable": true,
"url": "Hello, world!"
}
]
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"totalResults": {
"type": "number",
"description": "Total record count of this request."
},
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"blog": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "The ID of the site that contains this asset."
}
}
},
"class": {
"type": "string",
"description": "The type of this asset. This value is similar to 'type' attribute but this value is never localized."
},
"createdBy": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "The ID of user who created asset."
},
"displayName": {
"type": "string",
"description": "The display name of user who created asset."
},
"userpicUrl": {
"type": "string",
"description": "The URL of creating user’s userpic. The userpic will be made by UserpicThumbnailSize and UserpicAllowRect settings. If user does not set own userpic, empty string will be returned."
}
}
},
"createdDate": {
"type": "string",
"description": "The created time for this asset. (format: iso 8601 datetime)"
},
"customFields": {
"type": "array"
},
"description": {
"type": "string",
"description": "The description of this asset."
},
"fileExt": {
"type": "string",
"description": "The file extension of this asset. Returns the file extension without the leading period."
},
"filename": {
"type": "string",
"description": "The filename of this asset that includes file extension."
},
"id": {
"type": "number",
"description": "The ID of this asset."
},
"label": {
"type": "string",
"description": "The label of this asset."
},
"meta": {
"type": "object",
"properties": {
"fileSize": {
"type": "number",
"description": "The file size of this asset. If this asset is not file-based asset, will return null."
},
"height": {
"type": "number",
"description": "The height of this asset. If this asset has no height meta information, will return null"
},
"width": {
"type": "number",
"description": "The width of this asset. If this asset has no width meta information, will return null."
}
}
},
"mimeType": {
"type": "string",
"description": "The MIME Type of this asset."
},
"modifiedBy": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "The ID of user who modified asset."
},
"displayName": {
"type": "string",
"description": "The display name of user who modified asset."
},
"userpicUrl": {
"type": "string",
"description": "The URL of modifying user’s userpic. The userpic will be made by UserpicThumbnailSize and UserpicAllowRect settings. If user does not set own userpic, empty string will be returned."
}
}
},
"modifiedDate": {
"type": "string",
"description": "The last modified time for this asset. (format: iso 8601 datetime)"
},
"parent": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "The ID of parent asset."
}
}
},
"tags": {
"type": "array",
"description": "A list of tags associated with this asset."
},
"updatable": {
"type": "boolean",
"description": "true: The user who accessed can update this asset.\n\nfalse: The user who accessed cannot update this asset."
},
"url": {
"type": "string",
"description": "The permalink URL of this asset."
}
}
},
"description": "The array of result content."
}
}
}
403
Do not have permission to retrieve the list of assets.
Headers
Content-Type: application/json
404
Site not found.
Headers
Content-Type: application/json
Assets Collection by entry ¶
Assets Collection by entryGET/sites/{site_id}/entries/{entry_id}/assets{?limit,offset,class,sortBy,sortOrder,fields,dateField,dateFrom,dateTo}
Retrieve assets that related with specified entry.
Example URI
- site_id
number
(required)The site ID.
- entry_id
number
(required)The entry ID.
- limit
number
(optional) Example: 10Maximum number of assets to retrieve.
- offset
number
(optional) Example: 00-indexed offset.
- class
string
(optional)The target asset class to retrieve. Supported values are image, audio, video, file and any values added by plugins. If you want to retrieve multiple classes, specify the values separated by commas.
- sortBy
string
(optional) Example: created_on-
file_name: Sort by the filename of each asset.
-
created_by: Sort by the ID of user who created each asset.
-
created_on (default): Sort by the created time of each asset.
-
- sortOrder
string
(optional) Example: descend-
descend (default): Return assets in descending order. For sorting by date, it means from newest to oldest.
-
ascend: Return assets in ascending order. For sorting by date, it means from oldest to newest.
-
- fields
string
(optional)The field list to retrieve as part of the Assets resource. The list of field names should be separated by commas. If this parameter is not specified, all fields will be returned.
- dateField
string
(optional) Example: created_onSpecifies the field name to be used as a date field for filtering. (new in v3)
- dateFrom
string
(optional)The start date to filtering. Specify in “YYYY-MM-DD” format. (new in v3)
- dateTo
string
(optional)The end date to filtering. Specify in “YYYY-MM-DD” format. (new in v3)
200
Headers
Content-Type: application/json
Body
{
"totalResults": 1,
"items": [
{
"blog": {
"id": 1
},
"class": "Hello, world!",
"createdBy": {
"id": 1,
"displayName": "Hello, world!",
"userpicUrl": "Hello, world!"
},
"createdDate": "Hello, world!",
"customFields": [
{
"basename": "Hello, world!",
"value": "Hello, world!"
}
],
"description": "Hello, world!",
"fileExt": "Hello, world!",
"filename": "Hello, world!",
"id": 1,
"label": "Hello, world!",
"meta": {
"fileSize": 1,
"height": 1,
"width": 1
},
"mimeType": "Hello, world!",
"modifiedBy": {
"id": 1,
"displayName": "Hello, world!",
"userpicUrl": "Hello, world!"
},
"modifiedDate": "Hello, world!",
"parent": {
"id": 1
},
"tags": [
"Hello, world!"
],
"updatable": true,
"url": "Hello, world!"
}
]
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"totalResults": {
"type": "number",
"description": "Total record count of this request."
},
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"blog": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "The ID of the site that contains this asset."
}
}
},
"class": {
"type": "string",
"description": "The type of this asset. This value is similar to 'type' attribute but this value is never localized."
},
"createdBy": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "The ID of user who created asset."
},
"displayName": {
"type": "string",
"description": "The display name of user who created asset."
},
"userpicUrl": {
"type": "string",
"description": "The URL of creating user’s userpic. The userpic will be made by UserpicThumbnailSize and UserpicAllowRect settings. If user does not set own userpic, empty string will be returned."
}
}
},
"createdDate": {
"type": "string",
"description": "The created time for this asset. (format: iso 8601 datetime)"
},
"customFields": {
"type": "array"
},
"description": {
"type": "string",
"description": "The description of this asset."
},
"fileExt": {
"type": "string",
"description": "The file extension of this asset. Returns the file extension without the leading period."
},
"filename": {
"type": "string",
"description": "The filename of this asset that includes file extension."
},
"id": {
"type": "number",
"description": "The ID of this asset."
},
"label": {
"type": "string",
"description": "The label of this asset."
},
"meta": {
"type": "object",
"properties": {
"fileSize": {
"type": "number",
"description": "The file size of this asset. If this asset is not file-based asset, will return null."
},
"height": {
"type": "number",
"description": "The height of this asset. If this asset has no height meta information, will return null"
},
"width": {
"type": "number",
"description": "The width of this asset. If this asset has no width meta information, will return null."
}
}
},
"mimeType": {
"type": "string",
"description": "The MIME Type of this asset."
},
"modifiedBy": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "The ID of user who modified asset."
},
"displayName": {
"type": "string",
"description": "The display name of user who modified asset."
},
"userpicUrl": {
"type": "string",
"description": "The URL of modifying user’s userpic. The userpic will be made by UserpicThumbnailSize and UserpicAllowRect settings. If user does not set own userpic, empty string will be returned."
}
}
},
"modifiedDate": {
"type": "string",
"description": "The last modified time for this asset. (format: iso 8601 datetime)"
},
"parent": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "The ID of parent asset."
}
}
},
"tags": {
"type": "array",
"description": "A list of tags associated with this asset."
},
"updatable": {
"type": "boolean",
"description": "true: The user who accessed can update this asset.\n\nfalse: The user who accessed cannot update this asset."
},
"url": {
"type": "string",
"description": "The permalink URL of this asset."
}
}
},
"description": "The array of result content."
}
}
}
403
Do not have permission to retrieve the list of assets.
Headers
Content-Type: application/json
404
Site or entry not found.
Headers
Content-Type: application/json
Assets Collection by page ¶
Assets Collection by pageGET/sites/{site_id}/pages/{page_id}/assets{?limit,offset,class,sortBy,sortOrder,fields,dateField,dateFrom,dateTo}
Retrieve assets that related with specified page.
Example URI
- site_id
number
(required)The site ID.
- page_id
number
(required)The page ID.
- limit
number
(optional) Example: 10Maximum number of assets to retrieve.
- offset
number
(optional) Example: 00-indexed offset.
- class
string
(optional)The target asset class to retrieve. Supported values are image, audio, video, file and any values added by plugins. If you want to retrieve multiple classes, specify the values separated by commas.
- sortBy
string
(optional) Example: created_on-
file_name: Sort by the filename of each asset.
-
created_by: Sort by the ID of user who created each asset.
-
created_on (default): Sort by the created time of each asset.
-
- sortOrder
string
(optional) Example: descend-
descend (default): Return assets in descending order. For sorting by date, it means from newest to oldest.
-
ascend: Return assets in ascending order. For sorting by date, it means from oldest to newest.
-
- fields
string
(optional)The field list to retrieve as part of the Assets resource. The list of field names should be separated by commas. If this parameter is not specified, all fields will be returned.
- dateField
string
(optional) Example: created_onSpecifies the field name to be used as a date field for filtering. (new in v3)
- dateFrom
string
(optional)The start date to filtering. Specify in “YYYY-MM-DD” format. (new in v3)
- dateTo
string
(optional)The end date to filtering. Specify in “YYYY-MM-DD” format. (new in v3)
200
Headers
Content-Type: application/json
Body
{
"totalResults": 1,
"items": [
{
"blog": {
"id": 1
},
"class": "Hello, world!",
"createdBy": {
"id": 1,
"displayName": "Hello, world!",
"userpicUrl": "Hello, world!"
},
"createdDate": "Hello, world!",
"customFields": [
{
"basename": "Hello, world!",
"value": "Hello, world!"
}
],
"description": "Hello, world!",
"fileExt": "Hello, world!",
"filename": "Hello, world!",
"id": 1,
"label": "Hello, world!",
"meta": {
"fileSize": 1,
"height": 1,
"width": 1
},
"mimeType": "Hello, world!",
"modifiedBy": {
"id": 1,
"displayName": "Hello, world!",
"userpicUrl": "Hello, world!"
},
"modifiedDate": "Hello, world!",
"parent": {
"id": 1
},
"tags": [
"Hello, world!"
],
"updatable": true,
"url": "Hello, world!"
}
]
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"totalResults": {
"type": "number",
"description": "Total record count of this request."
},
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"blog": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "The ID of the site that contains this asset."
}
}
},
"class": {
"type": "string",
"description": "The type of this asset. This value is similar to 'type' attribute but this value is never localized."
},
"createdBy": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "The ID of user who created asset."
},
"displayName": {
"type": "string",
"description": "The display name of user who created asset."
},
"userpicUrl": {
"type": "string",
"description": "The URL of creating user’s userpic. The userpic will be made by UserpicThumbnailSize and UserpicAllowRect settings. If user does not set own userpic, empty string will be returned."
}
}
},
"createdDate": {
"type": "string",
"description": "The created time for this asset. (format: iso 8601 datetime)"
},
"customFields": {
"type": "array"
},
"description": {
"type": "string",
"description": "The description of this asset."
},
"fileExt": {
"type": "string",
"description": "The file extension of this asset. Returns the file extension without the leading period."
},
"filename": {
"type": "string",
"description": "The filename of this asset that includes file extension."
},
"id": {
"type": "number",
"description": "The ID of this asset."
},
"label": {
"type": "string",
"description": "The label of this asset."
},
"meta": {
"type": "object",
"properties": {
"fileSize": {
"type": "number",
"description": "The file size of this asset. If this asset is not file-based asset, will return null."
},
"height": {
"type": "number",
"description": "The height of this asset. If this asset has no height meta information, will return null"
},
"width": {
"type": "number",
"description": "The width of this asset. If this asset has no width meta information, will return null."
}
}
},
"mimeType": {
"type": "string",
"description": "The MIME Type of this asset."
},
"modifiedBy": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "The ID of user who modified asset."
},
"displayName": {
"type": "string",
"description": "The display name of user who modified asset."
},
"userpicUrl": {
"type": "string",
"description": "The URL of modifying user’s userpic. The userpic will be made by UserpicThumbnailSize and UserpicAllowRect settings. If user does not set own userpic, empty string will be returned."
}
}
},
"modifiedDate": {
"type": "string",
"description": "The last modified time for this asset. (format: iso 8601 datetime)"
},
"parent": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "The ID of parent asset."
}
}
},
"tags": {
"type": "array",
"description": "A list of tags associated with this asset."
},
"updatable": {
"type": "boolean",
"description": "true: The user who accessed can update this asset.\n\nfalse: The user who accessed cannot update this asset."
},
"url": {
"type": "string",
"description": "The permalink URL of this asset."
}
}
},
"description": "The array of result content."
}
}
}
403
Do not have permission to retrieve the list of assets.
Headers
Content-Type: application/json
404
Site or page not found.
Headers
Content-Type: application/json
Assets Collection by tag ¶
Assets Collection by tagGET/sites/{site_id}/tags/{tag_id}/assets{?limit,offset,class,sortBy,sortOrder,fields,dateField,dateFrom,dateTo}
Retrieve assets that related with specified tag.
Example URI
- site_id
number
(required)The site ID.
- tag_id
number
(required)The page ID.
- limit
number
(optional) Example: 10Maximum number of assets to retrieve.
- offset
number
(optional) Example: 00-indexed offset.
- class
string
(optional)The target asset class to retrieve. Supported values are image, audio, video, file and any values added by plugins. If you want to retrieve multiple classes, specify the values separated by commas.
- sortBy
string
(optional) Example: created_on-
file_name: Sort by the filename of each asset.
-
created_by: Sort by the ID of user who created each asset.
-
created_on (default): Sort by the created time of each asset.
-
- sortOrder
string
(optional) Example: descend-
descend (default): Return assets in descending order. For sorting by date, it means from newest to oldest.
-
ascend: Return assets in ascending order. For sorting by date, it means from oldest to newest.
-
- fields
string
(optional)The field list to retrieve as part of the Assets resource. The list of field names should be separated by commas. If this parameter is not specified, all fields will be returned.
- dateField
string
(optional) Example: created_onSpecifies the field name to be used as a date field for filtering. (new in v3)
- dateFrom
string
(optional)The start date to filtering. Specify in “YYYY-MM-DD” format. (new in v3)
- dateTo
string
(optional)The end date to filtering. Specify in “YYYY-MM-DD” format. (new in v3)
200
Headers
Content-Type: application/json
Body
{
"totalResults": 1,
"items": [
{
"blog": {
"id": 1
},
"class": "Hello, world!",
"createdBy": {
"id": 1,
"displayName": "Hello, world!",
"userpicUrl": "Hello, world!"
},
"createdDate": "Hello, world!",
"customFields": [
{
"basename": "Hello, world!",
"value": "Hello, world!"
}
],
"description": "Hello, world!",
"fileExt": "Hello, world!",
"filename": "Hello, world!",
"id": 1,
"label": "Hello, world!",
"meta": {
"fileSize": 1,
"height": 1,
"width": 1
},
"mimeType": "Hello, world!",
"modifiedBy": {
"id": 1,
"displayName": "Hello, world!",
"userpicUrl": "Hello, world!"
},
"modifiedDate": "Hello, world!",
"parent": {
"id": 1
},
"tags": [
"Hello, world!"
],
"updatable": true,
"url": "Hello, world!"
}
]
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"totalResults": {
"type": "number",
"description": "Total record count of this request."
},
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"blog": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "The ID of the site that contains this asset."
}
}
},
"class": {
"type": "string",
"description": "The type of this asset. This value is similar to 'type' attribute but this value is never localized."
},
"createdBy": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "The ID of user who created asset."
},
"displayName": {
"type": "string",
"description": "The display name of user who created asset."
},
"userpicUrl": {
"type": "string",
"description": "The URL of creating user’s userpic. The userpic will be made by UserpicThumbnailSize and UserpicAllowRect settings. If user does not set own userpic, empty string will be returned."
}
}
},
"createdDate": {
"type": "string",
"description": "The created time for this asset. (format: iso 8601 datetime)"
},
"customFields": {
"type": "array"
},
"description": {
"type": "string",
"description": "The description of this asset."
},
"fileExt": {
"type": "string",
"description": "The file extension of this asset. Returns the file extension without the leading period."
},
"filename": {
"type": "string",
"description": "The filename of this asset that includes file extension."
},
"id": {
"type": "number",
"description": "The ID of this asset."
},
"label": {
"type": "string",
"description": "The label of this asset."
},
"meta": {
"type": "object",
"properties": {
"fileSize": {
"type": "number",
"description": "The file size of this asset. If this asset is not file-based asset, will return null."
},
"height": {
"type": "number",
"description": "The height of this asset. If this asset has no height meta information, will return null"
},
"width": {
"type": "number",
"description": "The width of this asset. If this asset has no width meta information, will return null."
}
}
},
"mimeType": {
"type": "string",
"description": "The MIME Type of this asset."
},
"modifiedBy": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "The ID of user who modified asset."
},
"displayName": {
"type": "string",
"description": "The display name of user who modified asset."
},
"userpicUrl": {
"type": "string",
"description": "The URL of modifying user’s userpic. The userpic will be made by UserpicThumbnailSize and UserpicAllowRect settings. If user does not set own userpic, empty string will be returned."
}
}
},
"modifiedDate": {
"type": "string",
"description": "The last modified time for this asset. (format: iso 8601 datetime)"
},
"parent": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "The ID of parent asset."
}
}
},
"tags": {
"type": "array",
"description": "A list of tags associated with this asset."
},
"updatable": {
"type": "boolean",
"description": "true: The user who accessed can update this asset.\n\nfalse: The user who accessed cannot update this asset."
},
"url": {
"type": "string",
"description": "The permalink URL of this asset."
}
}
},
"description": "The array of result content."
}
}
}
403
Do not have permission to retrieve the list of assets.
Headers
Content-Type: application/json
404
Site or tag not found.
Headers
Content-Type: application/json
Asset ¶
Fetch single assetGET/sites/{site_id}/assets/{asset_id}{?fields}
Retrieve a single asset by its ID.
Example URI
- site_id
number
(required) Example: 1The site ID.
- asset_id
number
(required) Example: 1The asset ID.
- fields
string
(optional)The field list to retrieve as part of the Assets resource. The list of field names should be separated by commas. If this parameter is not specified, all fields will be returned.
200
Headers
Content-Type: application/json
Body
{
"blog": {
"id": 1
},
"class": "Hello, world!",
"createdBy": {
"id": 1,
"displayName": "Hello, world!",
"userpicUrl": "Hello, world!"
},
"createdDate": "Hello, world!",
"customFields": [
{
"basename": "Hello, world!",
"value": "Hello, world!"
}
],
"description": "Hello, world!",
"fileExt": "Hello, world!",
"filename": "Hello, world!",
"id": 1,
"label": "Hello, world!",
"meta": {
"fileSize": 1,
"height": 1,
"width": 1
},
"mimeType": "Hello, world!",
"modifiedBy": {
"id": 1,
"displayName": "Hello, world!",
"userpicUrl": "Hello, world!"
},
"modifiedDate": "Hello, world!",
"parent": {
"id": 1
},
"tags": [
"Hello, world!"
],
"updatable": true,
"url": "Hello, world!"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"blog": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "The ID of the site that contains this asset."
}
}
},
"class": {
"type": "string",
"description": "The type of this asset. This value is similar to 'type' attribute but this value is never localized."
},
"createdBy": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "The ID of user who created asset."
},
"displayName": {
"type": "string",
"description": "The display name of user who created asset."
},
"userpicUrl": {
"type": "string",
"description": "The URL of creating user’s userpic. The userpic will be made by UserpicThumbnailSize and UserpicAllowRect settings. If user does not set own userpic, empty string will be returned."
}
}
},
"createdDate": {
"type": "string",
"description": "The created time for this asset. (format: iso 8601 datetime)"
},
"customFields": {
"type": "array"
},
"description": {
"type": "string",
"description": "The description of this asset."
},
"fileExt": {
"type": "string",
"description": "The file extension of this asset. Returns the file extension without the leading period."
},
"filename": {
"type": "string",
"description": "The filename of this asset that includes file extension."
},
"id": {
"type": "number",
"description": "The ID of this asset."
},
"label": {
"type": "string",
"description": "The label of this asset."
},
"meta": {
"type": "object",
"properties": {
"fileSize": {
"type": "number",
"description": "The file size of this asset. If this asset is not file-based asset, will return null."
},
"height": {
"type": "number",
"description": "The height of this asset. If this asset has no height meta information, will return null"
},
"width": {
"type": "number",
"description": "The width of this asset. If this asset has no width meta information, will return null."
}
}
},
"mimeType": {
"type": "string",
"description": "The MIME Type of this asset."
},
"modifiedBy": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "The ID of user who modified asset."
},
"displayName": {
"type": "string",
"description": "The display name of user who modified asset."
},
"userpicUrl": {
"type": "string",
"description": "The URL of modifying user’s userpic. The userpic will be made by UserpicThumbnailSize and UserpicAllowRect settings. If user does not set own userpic, empty string will be returned."
}
}
},
"modifiedDate": {
"type": "string",
"description": "The last modified time for this asset. (format: iso 8601 datetime)"
},
"parent": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "The ID of parent asset."
}
}
},
"tags": {
"type": "array",
"description": "A list of tags associated with this asset."
},
"updatable": {
"type": "boolean",
"description": "true: The user who accessed can update this asset.\n\nfalse: The user who accessed cannot update this asset."
},
"url": {
"type": "string",
"description": "The permalink URL of this asset."
}
}
}
403
Do not have permission to retrieve an asset.
Headers
Content-Type: application/json
404
Site or asset not found.
Headers
Content-Type: application/json
Update asset.PUT/sites/{site_id}/assets/{asset_id}
Authentication required.
Update an asset. This endpoint needs following permissions.
- Manage Assets
This method accepts PUT and POST with __method=PUT.
Example URI
- site_id
number
(required) Example: 1The site ID.
- asset_id
number
(required) Example: 1The asset ID.
Assets resource
Headers
Content-Type: application/x-www-form-urlencoded
Body
asset={
"url" : "http://localhost/blog/20140917-2/images/0cf61aae.jpg",
"id" : "1",
"parent" : null,
"blog" : {
"id" : "1"
},
"description" : "Over the rainbow.",
"tags" : [
"boston",
"bridge",
"light",
"night"
],
"label" : "Night Bridge",
}
200
Headers
Content-Type: application/json
Body
{
"blog": {
"id": 1
},
"class": "Hello, world!",
"createdBy": {
"id": 1,
"displayName": "Hello, world!",
"userpicUrl": "Hello, world!"
},
"createdDate": "Hello, world!",
"customFields": [
{
"basename": "Hello, world!",
"value": "Hello, world!"
}
],
"description": "Hello, world!",
"fileExt": "Hello, world!",
"filename": "Hello, world!",
"id": 1,
"label": "Hello, world!",
"meta": {
"fileSize": 1,
"height": 1,
"width": 1
},
"mimeType": "Hello, world!",
"modifiedBy": {
"id": 1,
"displayName": "Hello, world!",
"userpicUrl": "Hello, world!"
},
"modifiedDate": "Hello, world!",
"parent": {
"id": 1
},
"tags": [
"Hello, world!"
],
"updatable": true,
"url": "Hello, world!"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"blog": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "The ID of the site that contains this asset."
}
}
},
"class": {
"type": "string",
"description": "The type of this asset. This value is similar to 'type' attribute but this value is never localized."
},
"createdBy": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "The ID of user who created asset."
},
"displayName": {
"type": "string",
"description": "The display name of user who created asset."
},
"userpicUrl": {
"type": "string",
"description": "The URL of creating user’s userpic. The userpic will be made by UserpicThumbnailSize and UserpicAllowRect settings. If user does not set own userpic, empty string will be returned."
}
}
},
"createdDate": {
"type": "string",
"description": "The created time for this asset. (format: iso 8601 datetime)"
},
"customFields": {
"type": "array"
},
"description": {
"type": "string",
"description": "The description of this asset."
},
"fileExt": {
"type": "string",
"description": "The file extension of this asset. Returns the file extension without the leading period."
},
"filename": {
"type": "string",
"description": "The filename of this asset that includes file extension."
},
"id": {
"type": "number",
"description": "The ID of this asset."
},
"label": {
"type": "string",
"description": "The label of this asset."
},
"meta": {
"type": "object",
"properties": {
"fileSize": {
"type": "number",
"description": "The file size of this asset. If this asset is not file-based asset, will return null."
},
"height": {
"type": "number",
"description": "The height of this asset. If this asset has no height meta information, will return null"
},
"width": {
"type": "number",
"description": "The width of this asset. If this asset has no width meta information, will return null."
}
}
},
"mimeType": {
"type": "string",
"description": "The MIME Type of this asset."
},
"modifiedBy": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "The ID of user who modified asset."
},
"displayName": {
"type": "string",
"description": "The display name of user who modified asset."
},
"userpicUrl": {
"type": "string",
"description": "The URL of modifying user’s userpic. The userpic will be made by UserpicThumbnailSize and UserpicAllowRect settings. If user does not set own userpic, empty string will be returned."
}
}
},
"modifiedDate": {
"type": "string",
"description": "The last modified time for this asset. (format: iso 8601 datetime)"
},
"parent": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "The ID of parent asset."
}
}
},
"tags": {
"type": "array",
"description": "A list of tags associated with this asset."
},
"updatable": {
"type": "boolean",
"description": "true: The user who accessed can update this asset.\n\nfalse: The user who accessed cannot update this asset."
},
"url": {
"type": "string",
"description": "The permalink URL of this asset."
}
}
}
401
Authentication required
Headers
Content-Type: application/json
403
Do not have permission to update an asset.
Headers
Content-Type: application/json
404
Asset (or site) not found.
Headers
Content-Type: application/json
405
Request method is not ‘PUT’ or ‘POST’ with ‘__method=PUT’.
Headers
Content-Type: application/json
Delete asset.DELETE/sites/{site_id}/assets/{asset_id}
Authentication required.
Delete an asset. This endpoint needs following permissions.
- Manage Assets
This method accepts DELETE and POST with __method=DELETE.
Example URI
- site_id
number
(required) Example: 1The site ID.
- asset_id
number
(required) Example: 1The asset ID.
200
Headers
Content-Type: application/json
Body
{
"blog": {
"id": 1
},
"class": "Hello, world!",
"createdBy": {
"id": 1,
"displayName": "Hello, world!",
"userpicUrl": "Hello, world!"
},
"createdDate": "Hello, world!",
"customFields": [
{
"basename": "Hello, world!",
"value": "Hello, world!"
}
],
"description": "Hello, world!",
"fileExt": "Hello, world!",
"filename": "Hello, world!",
"id": 1,
"label": "Hello, world!",
"meta": {
"fileSize": 1,
"height": 1,
"width": 1
},
"mimeType": "Hello, world!",
"modifiedBy": {
"id": 1,
"displayName": "Hello, world!",
"userpicUrl": "Hello, world!"
},
"modifiedDate": "Hello, world!",
"parent": {
"id": 1
},
"tags": [
"Hello, world!"
],
"updatable": true,
"url": "Hello, world!"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"blog": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "The ID of the site that contains this asset."
}
}
},
"class": {
"type": "string",
"description": "The type of this asset. This value is similar to 'type' attribute but this value is never localized."
},
"createdBy": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "The ID of user who created asset."
},
"displayName": {
"type": "string",
"description": "The display name of user who created asset."
},
"userpicUrl": {
"type": "string",
"description": "The URL of creating user’s userpic. The userpic will be made by UserpicThumbnailSize and UserpicAllowRect settings. If user does not set own userpic, empty string will be returned."
}
}
},
"createdDate": {
"type": "string",
"description": "The created time for this asset. (format: iso 8601 datetime)"
},
"customFields": {
"type": "array"
},
"description": {
"type": "string",
"description": "The description of this asset."
},
"fileExt": {
"type": "string",
"description": "The file extension of this asset. Returns the file extension without the leading period."
},
"filename": {
"type": "string",
"description": "The filename of this asset that includes file extension."
},
"id": {
"type": "number",
"description": "The ID of this asset."
},
"label": {
"type": "string",
"description": "The label of this asset."
},
"meta": {
"type": "object",
"properties": {
"fileSize": {
"type": "number",
"description": "The file size of this asset. If this asset is not file-based asset, will return null."
},
"height": {
"type": "number",
"description": "The height of this asset. If this asset has no height meta information, will return null"
},
"width": {
"type": "number",
"description": "The width of this asset. If this asset has no width meta information, will return null."
}
}
},
"mimeType": {
"type": "string",
"description": "The MIME Type of this asset."
},
"modifiedBy": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "The ID of user who modified asset."
},
"displayName": {
"type": "string",
"description": "The display name of user who modified asset."
},
"userpicUrl": {
"type": "string",
"description": "The URL of modifying user’s userpic. The userpic will be made by UserpicThumbnailSize and UserpicAllowRect settings. If user does not set own userpic, empty string will be returned."
}
}
},
"modifiedDate": {
"type": "string",
"description": "The last modified time for this asset. (format: iso 8601 datetime)"
},
"parent": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "The ID of parent asset."
}
}
},
"tags": {
"type": "array",
"description": "A list of tags associated with this asset."
},
"updatable": {
"type": "boolean",
"description": "true: The user who accessed can update this asset.\n\nfalse: The user who accessed cannot update this asset."
},
"url": {
"type": "string",
"description": "The permalink URL of this asset."
}
}
}
401
Authentication required
Headers
Content-Type: application/json
403
Do not have permission to delete an asset.
Headers
Content-Type: application/json
404
Asset (or site) not found.
Headers
Content-Type: application/json
405
Request method is not ‘DELETE’ or ‘POST’ with ‘__method=DELETE’.
Headers
Content-Type: application/json
Get thumbnail imageGET/sites/{site_id}/assets/{asset_id}/thumbnail{?width,height,scale,square}
This endpoint requires one of parameter ‘width’ or ‘height’ or ‘scale’ Also, cannot use these parameters at same time.
Example URI
- site_id
number
(required) Example: 1The site ID.
- asset_id
number
(required) Example: 1The asset ID.
- width
number
(optional) Example: 200The width of the thumbnail to generate. If this is the only parameter specified then the thumbnail’s width will be scaled proportionally to the height. When a value longer than the original image is specified, it will be ignored.
- height
number
(optional) Example: 200The height of the thumbnail to generate. If this is the only parameter specified then the thumbnail’s height will be scaled proportionally to the width. When both of height and width are specified, the longer side of the original image will be processed, and the lesser side will be scaled proportionally.
- scale
number
(optional) Example: 50The percentage by which to reduce or increase the size of the current asset.
- square
boolean
(optional) Example: trueIf set to true then the thumbnail generated will be square, where the length of each side of the square will be equal to the shortest side of the image.
200
Headers
Content-Type: application/json
Body
{
"height": 200,
"width": 200,
"url": "http://example.com/assets_c/2014/10/the-bridge-200x200-1.jpg"
}
400
An asset does not support to generate thumbnail file.
Headers
Content-Type: application/json
404
Asset (or site) not found.
Headers
Content-Type: application/json
Categories ¶
Categories Collection ¶
Create a new categoryPOST/sites/{site_id}/categories
Authentication required.
Create a new category. This endpoint needs following permissions.
- Manage Categories
Post form data is following:
- category (Category) - Category resource
Example URI
- site_id
number
(required)The site ID.
Headers
Content-Type: application/x-www-form-urlencoded
Body
category={"basename" : "news","parent" : "0","label","description" : null}
200
Headers
Content-Type: application/json
Body
{
"archiveLink": "Hello, world!",
"basename": "Hello, world!",
"blog": {
"id": 1
},
"class": "Hello, world!",
"createdBy": {
"displayName": "Hello, world!",
"id": 1,
"userpicUrl": "Hello, world!"
},
"createdDate": "Hello, world!",
"customFields": [
{
"basename": "Hello, world!",
"value": "Hello, world!"
}
],
"description": "Hello, world!",
"id": 1,
"label": "Hello, world!",
"modifiedBy": {
"displayName": "Hello, world!",
"id": 1,
"userpicUrl": "Hello, world!"
},
"modifiedDate": "Hello, world!",
"parent": 1,
"updatable": true
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"archiveLink": {
"type": "string",
"description": "The category archive URL of this category. If “Category” archive mapping is not configured, this value will be null."
},
"basename": {
"type": "string",
"description": "The basename of this category."
},
"blog": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "The ID of the site that contains this category."
}
}
},
"class": {
"type": "string",
"description": "The object class for this category."
},
"createdBy": {
"type": "object",
"properties": {
"displayName": {
"type": "string",
"description": "The display name of the user who created this category."
},
"id": {
"type": "number",
"description": "The ID of the user who created this category."
},
"userpicUrl": {
"type": "string",
"description": "The URL of created user’s userpic. The userpic will be made by UserpicThumbnailSize and UserpicAllowRect settings. If user does not set own userpic, empty string will be returned."
}
}
},
"createdDate": {
"type": "string",
"description": "he created time for this category. (format is iso 8601 datetime)"
},
"customFields": {
"type": "array"
},
"description": {
"type": "string",
"description": "The description of this category."
},
"id": {
"type": "number",
"description": "The ID of this category."
},
"label": {
"type": "string",
"description": "The label of this category."
},
"modifiedBy": {
"type": "object",
"properties": {
"displayName": {
"type": "string",
"description": "The display name of the user who modified this category."
},
"id": {
"type": "number",
"description": "The ID of the user who modified this category."
},
"userpicUrl": {
"type": "string",
"description": "The URL of modified user’s userpic. The userpic will be made by UserpicThumbnailSize and UserpicAllowRect settings. If user does not set own userpic, empty string will be returned."
}
}
},
"modifiedDate": {
"type": "string",
"description": "The last modified time for this category. (format is iso 8601 datetime)"
},
"parent": {
"type": "number",
"description": "The ID of the parent category for this category. This field can be updated from v2."
},
"updatable": {
"type": "boolean",
"description": "true: The user who accessed can update this category.\nfalse: The user who accessed cannot update this category."
}
}
}
403
Do not have permission to create a new category.
Headers
Content-Type: application/json
404
Site not found.
Headers
Content-Type: application/json
Retrieve a list of categoriesGET/sites/{site_id}/categories{?search,searchFields,limit,offset,sortBy,sortOrder,fields,top,includeIds,excludeIds,dateField,dateFrom,dateTo}
Retrieve list of categories in the specified site.
Example URI
- site_id
number
(required)The site ID.
- search
string
(optional)Search query.
- searchFields
string
(optional) Example: label,basenameThe comma separated list of field names to search.
- limit
number
(optional) Example: 10Maximum number of categories to retrieve.
- offset
number
(optional) Example: 00-indexed offset.
- sortBy
string
(optional) Example: user_custom-
user_custom: Sort order you specified on the Manage Categories screen.
-
created_by: Sort by the ID of user who created each category.
-
id: Sort by the ID of each category.
-
basename: Sort by the basename of each category.
-
label: Sort by the label of each category.
-
- sortOrder
string
(optional) Default: descend-
descend (default): Return categories in descending order.
-
*ascend: Return categories in ascending order.
-
- fields
string
(optional)The field list to retrieve as part of the Categories resource. The list of field names should be separated by commas. If this parameter is not specified, all fields will be returned.
- top
number
(optional) Example: 0If set to 1, retrieves only top level categories. New in v2
- includeIds
string
(optional)The comma separated list of category IDs to include in result.
- excludeIds
string
(optional)The comma separated list of category IDs to exclude from result.
- dateField
string
(optional) Example: created_onSpecifies the field name to be used as a date field for filtering. (new in v3)
- dateFrom
string
(optional)The start date to filtering. Specify in “YYYY-MM-DD” format. (new in v3)
- dateTo
string
(optional)The end date to filtering. Specify in “YYYY-MM-DD” format. (new in v3)
200
Headers
Content-Type: application/json
Body
{
"totalResults": 1,
"items": [
{
"archiveLink": "Hello, world!",
"basename": "Hello, world!",
"blog": {
"id": 1
},
"class": "Hello, world!",
"createdBy": {
"displayName": "Hello, world!",
"id": 1,
"userpicUrl": "Hello, world!"
},
"createdDate": "Hello, world!",
"customFields": [
{
"basename": "Hello, world!",
"value": "Hello, world!"
}
],
"description": "Hello, world!",
"id": 1,
"label": "Hello, world!",
"modifiedBy": {
"displayName": "Hello, world!",
"id": 1,
"userpicUrl": "Hello, world!"
},
"modifiedDate": "Hello, world!",
"parent": 1,
"updatable": true
}
]
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"totalResults": {
"type": "number",
"description": "Total record count of this request."
},
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"archiveLink": {
"type": "string",
"description": "The category archive URL of this category. If “Category” archive mapping is not configured, this value will be null."
},
"basename": {
"type": "string",
"description": "The basename of this category."
},
"blog": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "The ID of the site that contains this category."
}
}
},
"class": {
"type": "string",
"description": "The object class for this category."
},
"createdBy": {
"type": "object",
"properties": {
"displayName": {
"type": "string",
"description": "The display name of the user who created this category."
},
"id": {
"type": "number",
"description": "The ID of the user who created this category."
},
"userpicUrl": {
"type": "string",
"description": "The URL of created user’s userpic. The userpic will be made by UserpicThumbnailSize and UserpicAllowRect settings. If user does not set own userpic, empty string will be returned."
}
}
},
"createdDate": {
"type": "string",
"description": "he created time for this category. (format is iso 8601 datetime)"
},
"customFields": {
"type": "array"
},
"description": {
"type": "string",
"description": "The description of this category."
},
"id": {
"type": "number",
"description": "The ID of this category."
},
"label": {
"type": "string",
"description": "The label of this category."
},
"modifiedBy": {
"type": "object",
"properties": {
"displayName": {
"type": "string",
"description": "The display name of the user who modified this category."
},
"id": {
"type": "number",
"description": "The ID of the user who modified this category."
},
"userpicUrl": {
"type": "string",
"description": "The URL of modified user’s userpic. The userpic will be made by UserpicThumbnailSize and UserpicAllowRect settings. If user does not set own userpic, empty string will be returned."
}
}
},
"modifiedDate": {
"type": "string",
"description": "The last modified time for this category. (format is iso 8601 datetime)"
},
"parent": {
"type": "number",
"description": "The ID of the parent category for this category. This field can be updated from v2."
},
"updatable": {
"type": "boolean",
"description": "true: The user who accessed can update this category.\nfalse: The user who accessed cannot update this category."
}
}
},
"description": "The array of result content."
}
}
}
403
Do not have permission to retrieve the list of categories.
Headers
Content-Type: application/json
404
Site not found.
Headers
Content-Type: application/json
Categories Collection by entry ¶
Categories Collection by entryGET/sites/entries/categories{?search,searchFields,limit,offset,sortBy,sortOrder,fields,type,includeIds,excludeIds,top,dateField,dateFrom,dateTo}
Retrieve list of categories in the specified site. If you want to retrieve the non-published an entry’s categories, needs authentication and user must have following permission.
- edit_entry
Example URI
- search
string
(optional)Search query.
- searchFields
string
(optional) Example: label,basenameThe comma separated list of field names to search.
- limit
number
(optional) Example: 10Maximum number of categories to retrieve.
- offset
number
(optional) Example: 00-indexed offset.
- sortBy
string
(optional) Example: user_custom-
user_custom: Sort order you specified on the Manage Categories screen.
-
created_by: Sort by the ID of user who created each category.
-
id: Sort by the ID of each category.
-
basename: Sort by the basename of each category.
-
label: Sort by the label of each category.
-
- sortOrder
string
(optional) Default: descend-
descend (default): Return categories in descending order.
-
*ascend: Return categories in ascending order.
-
- fields
string
(optional)The field list to retrieve as part of the Categories resource. The list of field names should be separated by commas. If this parameter is not specified, all fields will be returned.
- top
number
(optional) Example: 0If set to 1, retrieves only top level categories. New in v2
- includeIds
string
(optional)The comma separated list of category IDs to include in result.
- excludeIds
string
(optional)The comma separated list of category IDs to exclude from result.
- dateField
string
(optional) Example: created_onSpecifies the field name to be used as a date field for filtering. (new in v3)
- dateFrom
string
(optional)The start date to filtering. Specify in “YYYY-MM-DD” format. (new in v3)
- dateTo
string
(optional)The end date to filtering. Specify in “YYYY-MM-DD” format. (new in v3)
- type
string
(optional)-
primary: Retrieve primary category only.
-
secondary: Retrieve secondary categories only.
-
200
Headers
Content-Type: application/json
Body
{
"totalResults": 1,
"items": [
{
"archiveLink": "Hello, world!",
"basename": "Hello, world!",
"blog": {
"id": 1
},
"class": "Hello, world!",
"createdBy": {
"displayName": "Hello, world!",
"id": 1,
"userpicUrl": "Hello, world!"
},
"createdDate": "Hello, world!",
"customFields": [
{
"basename": "Hello, world!",
"value": "Hello, world!"
}
],
"description": "Hello, world!",
"id": 1,
"label": "Hello, world!",
"modifiedBy": {
"displayName": "Hello, world!",
"id": 1,
"userpicUrl": "Hello, world!"
},
"modifiedDate": "Hello, world!",
"parent": 1,
"updatable": true
}
]
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"totalResults": {
"type": "number",
"description": "Total record count of this request."
},
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"archiveLink": {
"type": "string",
"description": "The category archive URL of this category. If “Category” archive mapping is not configured, this value will be null."
},
"basename": {
"type": "string",
"description": "The basename of this category."
},
"blog": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "The ID of the site that contains this category."
}
}
},
"class": {
"type": "string",
"description": "The object class for this category."
},
"createdBy": {
"type": "object",
"properties": {
"displayName": {
"type": "string",
"description": "The display name of the user who created this category."
},
"id": {
"type": "number",
"description": "The ID of the user who created this category."
},
"userpicUrl": {
"type": "string",
"description": "The URL of created user’s userpic. The userpic will be made by UserpicThumbnailSize and UserpicAllowRect settings. If user does not set own userpic, empty string will be returned."
}
}
},
"createdDate": {
"type": "string",
"description": "he created time for this category. (format is iso 8601 datetime)"
},
"customFields": {
"type": "array"
},
"description": {
"type": "string",
"description": "The description of this category."
},
"id": {
"type": "number",
"description": "The ID of this category."
},
"label": {
"type": "string",
"description": "The label of this category."
},
"modifiedBy": {
"type": "object",
"properties": {
"displayName": {
"type": "string",
"description": "The display name of the user who modified this category."
},
"id": {
"type": "number",
"description": "The ID of the user who modified this category."
},
"userpicUrl": {
"type": "string",
"description": "The URL of modified user’s userpic. The userpic will be made by UserpicThumbnailSize and UserpicAllowRect settings. If user does not set own userpic, empty string will be returned."
}
}
},
"modifiedDate": {
"type": "string",
"description": "The last modified time for this category. (format is iso 8601 datetime)"
},
"parent": {
"type": "number",
"description": "The ID of the parent category for this category. This field can be updated from v2."
},
"updatable": {
"type": "boolean",
"description": "true: The user who accessed can update this category.\nfalse: The user who accessed cannot update this category."
}
}
},
"description": "The array of result content."
}
}
}
403
Do not have permission to retrieve the list of categories.
Headers
Content-Type: application/json
404
Site or entry not found.
Headers
Content-Type: application/json
Categories Collection for parent categories ¶
Categories Collection for parent categoriesGET/sites/{site_id}/categories/{category_id}/parents{?maxDepth,includeCurrent,dateField,dateFrom,dateTo}
Retrieve list of parent categories of the specified category.
Example URI
- site_id
number
(required)The site ID.
- category_id
number
(required)The category ID.
- maxDepth
number
(optional) Example: 0The depth of retrieving parent categories.
- includeCurrent
number
(optional) Example: 0-
1: The list does not include current category.
-
The list includes current category.
-
- dateField
string
(optional) Example: created_onSpecifies the field name to be used as a date field for filtering. (new in v3)
- dateFrom
string
(optional)The start date to filtering. Specify in “YYYY-MM-DD” format. (new in v3)
- dateTo
string
(optional)The end date to filtering. Specify in “YYYY-MM-DD” format. (new in v3)
200
Headers
Content-Type: application/json
Body
{
"totalResults": 1,
"items": [
{
"archiveLink": "Hello, world!",
"basename": "Hello, world!",
"blog": {
"id": 1
},
"class": "Hello, world!",
"createdBy": {
"displayName": "Hello, world!",
"id": 1,
"userpicUrl": "Hello, world!"
},
"createdDate": "Hello, world!",
"customFields": [
{
"basename": "Hello, world!",
"value": "Hello, world!"
}
],
"description": "Hello, world!",
"id": 1,
"label": "Hello, world!",
"modifiedBy": {
"displayName": "Hello, world!",
"id": 1,
"userpicUrl": "Hello, world!"
},
"modifiedDate": "Hello, world!",
"parent": 1,
"updatable": true
}
]
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"totalResults": {
"type": "number",
"description": "Total record count of this request."
},
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"archiveLink": {
"type": "string",
"description": "The category archive URL of this category. If “Category” archive mapping is not configured, this value will be null."
},
"basename": {
"type": "string",
"description": "The basename of this category."
},
"blog": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "The ID of the site that contains this category."
}
}
},
"class": {
"type": "string",
"description": "The object class for this category."
},
"createdBy": {
"type": "object",
"properties": {
"displayName": {
"type": "string",
"description": "The display name of the user who created this category."
},
"id": {
"type": "number",
"description": "The ID of the user who created this category."
},
"userpicUrl": {
"type": "string",
"description": "The URL of created user’s userpic. The userpic will be made by UserpicThumbnailSize and UserpicAllowRect settings. If user does not set own userpic, empty string will be returned."
}
}
},
"createdDate": {
"type": "string",
"description": "he created time for this category. (format is iso 8601 datetime)"
},
"customFields": {
"type": "array"
},
"description": {
"type": "string",
"description": "The description of this category."
},
"id": {
"type": "number",
"description": "The ID of this category."
},
"label": {
"type": "string",
"description": "The label of this category."
},
"modifiedBy": {
"type": "object",
"properties": {
"displayName": {
"type": "string",
"description": "The display name of the user who modified this category."
},
"id": {
"type": "number",
"description": "The ID of the user who modified this category."
},
"userpicUrl": {
"type": "string",
"description": "The URL of modified user’s userpic. The userpic will be made by UserpicThumbnailSize and UserpicAllowRect settings. If user does not set own userpic, empty string will be returned."
}
}
},
"modifiedDate": {
"type": "string",
"description": "The last modified time for this category. (format is iso 8601 datetime)"
},
"parent": {
"type": "number",
"description": "The ID of the parent category for this category. This field can be updated from v2."
},
"updatable": {
"type": "boolean",
"description": "true: The user who accessed can update this category.\nfalse: The user who accessed cannot update this category."
}
}
},
"description": "The array of result content."
}
}
}
403
Do not have permission to retrieve the list of categories.
Headers
Content-Type: application/json
404
Site or category not found.
Headers
Content-Type: application/json
Categories Collection for siblings categories ¶
Categories Collection for siblings categoriesGET/sites/{site_id}/categories/{category_id}/siblings{?search,searchFields,limit,offset,sortBy,sortOrder,fields,top,includeIds,excludeIds,dateField,dateFrom,dateTo}
Retrieve list of siblings categories of the specified category.
Example URI
- site_id
number
(required)The site ID.
- category_id
number
(required)The category ID.
- search
string
(optional)Search query.
- searchFields
string
(optional) Example: label,basenameThe comma separated list of field names to search.
- limit
number
(optional) Example: 10Maximum number of categories to retrieve.
- offset
number
(optional) Example: 00-indexed offset.
- sortBy
string
(optional) Example: user_custom- user_custom: Sort order you specified on the Manage Categories screen.
-
created_by: Sort by the ID of user who created each category.
-
id: Sort by the ID of each category.
-
basename: Sort by the basename of each category.
-
label: Sort by the label of each category.
- sortOrder
string
(optional) Example: descend-
descend (default): Return categories in descending order.
-
ascend: Return categories in ascending order.
-
- fields
string
(optional)The field list to retrieve as part of the Categories resource. The list of field names should be separated by commas. If this parameter is not specified, all fields will be returned.
- top
number
(optional) Example: 0If set to 1, retrieves only top level categories. New in v2
- includeIds
string
(optional)The comma separated list of category IDs to include in result.
- excludeIds
string
(optional)The comma separated list of category IDs to exclude from result.
- dateField
string
(optional) Example: created_onSpecifies the field name to be used as a date field for filtering. (new in v3)
- dateFrom
string
(optional)The start date to filtering. Specify in “YYYY-MM-DD” format. (new in v3)
- dateTo
string
(optional)The end date to filtering. Specify in “YYYY-MM-DD” format. (new in v3)
200
Headers
Content-Type: application/json
Body
{
"totalResults": 1,
"items": [
{
"archiveLink": "Hello, world!",
"basename": "Hello, world!",
"blog": {
"id": 1
},
"class": "Hello, world!",
"createdBy": {
"displayName": "Hello, world!",
"id": 1,
"userpicUrl": "Hello, world!"
},
"createdDate": "Hello, world!",
"customFields": [
{
"basename": "Hello, world!",
"value": "Hello, world!"
}
],
"description": "Hello, world!",
"id": 1,
"label": "Hello, world!",
"modifiedBy": {
"displayName": "Hello, world!",
"id": 1,
"userpicUrl": "Hello, world!"
},
"modifiedDate": "Hello, world!",
"parent": 1,
"updatable": true
}
]
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"totalResults": {
"type": "number",
"description": "Total record count of this request."
},
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"archiveLink": {
"type": "string",
"description": "The category archive URL of this category. If “Category” archive mapping is not configured, this value will be null."
},
"basename": {
"type": "string",
"description": "The basename of this category."
},
"blog": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "The ID of the site that contains this category."
}
}
},
"class": {
"type": "string",
"description": "The object class for this category."
},
"createdBy": {
"type": "object",
"properties": {
"displayName": {
"type": "string",
"description": "The display name of the user who created this category."
},
"id": {
"type": "number",
"description": "The ID of the user who created this category."
},
"userpicUrl": {
"type": "string",
"description": "The URL of created user’s userpic. The userpic will be made by UserpicThumbnailSize and UserpicAllowRect settings. If user does not set own userpic, empty string will be returned."
}
}
},
"createdDate": {
"type": "string",
"description": "he created time for this category. (format is iso 8601 datetime)"
},
"customFields": {
"type": "array"
},
"description": {
"type": "string",
"description": "The description of this category."
},
"id": {
"type": "number",
"description": "The ID of this category."
},
"label": {
"type": "string",
"description": "The label of this category."
},
"modifiedBy": {
"type": "object",
"properties": {
"displayName": {
"type": "string",
"description": "The display name of the user who modified this category."
},
"id": {
"type": "number",
"description": "The ID of the user who modified this category."
},
"userpicUrl": {
"type": "string",
"description": "The URL of modified user’s userpic. The userpic will be made by UserpicThumbnailSize and UserpicAllowRect settings. If user does not set own userpic, empty string will be returned."
}
}
},
"modifiedDate": {
"type": "string",
"description": "The last modified time for this category. (format is iso 8601 datetime)"
},
"parent": {
"type": "number",
"description": "The ID of the parent category for this category. This field can be updated from v2."
},
"updatable": {
"type": "boolean",
"description": "true: The user who accessed can update this category.\nfalse: The user who accessed cannot update this category."
}
}
},
"description": "The array of result content."
}
}
}
403
Do not have permission to retrieve the list of categories.
Headers
Content-Type: application/json
404
Site or category not found.
Headers
Content-Type: application/json
Categoris Collection for child categories ¶
Categoris Collection for child categoriesGET/sites/{site_id}/categories/{category_id}/children{?maxDepth,includeCurrent,dateField,dateFrom,dateTo}
Retrieve list of child categories of the specified category.
Example URI
- site_id
number
(required)The site ID.
- category_id
number
(required)The category ID.
- maxDepth
number
(optional) Example: 0The depth of retrieving parent categories.
- includeCurrent
number
(optional) Example: 0-
1: The list does not include current category.
-
The list includes current category.
-
- dateField
string
(optional) Example: created_onSpecifies the field name to be used as a date field for filtering. (new in v3)
- dateFrom
string
(optional)The start date to filtering. Specify in “YYYY-MM-DD” format. (new in v3)
- dateTo
string
(optional)The end date to filtering. Specify in “YYYY-MM-DD” format. (new in v3)
200
Headers
Content-Type: application/json
Body
{
"totalResults": 1,
"items": [
{
"archiveLink": "Hello, world!",
"basename": "Hello, world!",
"blog": {
"id": 1
},
"class": "Hello, world!",
"createdBy": {
"displayName": "Hello, world!",
"id": 1,
"userpicUrl": "Hello, world!"
},
"createdDate": "Hello, world!",
"customFields": [
{
"basename": "Hello, world!",
"value": "Hello, world!"
}
],
"description": "Hello, world!",
"id": 1,
"label": "Hello, world!",
"modifiedBy": {
"displayName": "Hello, world!",
"id": 1,
"userpicUrl": "Hello, world!"
},
"modifiedDate": "Hello, world!",
"parent": 1,
"updatable": true
}
]
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"totalResults": {
"type": "number",
"description": "Total record count of this request."
},
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"archiveLink": {
"type": "string",
"description": "The category archive URL of this category. If “Category” archive mapping is not configured, this value will be null."
},
"basename": {
"type": "string",
"description": "The basename of this category."
},
"blog": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "The ID of the site that contains this category."
}
}
},
"class": {
"type": "string",
"description": "The object class for this category."
},
"createdBy": {
"type": "object",
"properties": {
"displayName": {
"type": "string",
"description": "The display name of the user who created this category."
},
"id": {
"type": "number",
"description": "The ID of the user who created this category."
},
"userpicUrl": {
"type": "string",
"description": "The URL of created user’s userpic. The userpic will be made by UserpicThumbnailSize and UserpicAllowRect settings. If user does not set own userpic, empty string will be returned."
}
}
},
"createdDate": {
"type": "string",
"description": "he created time for this category. (format is iso 8601 datetime)"
},
"customFields": {
"type": "array"
},
"description": {
"type": "string",
"description": "The description of this category."
},
"id": {
"type": "number",
"description": "The ID of this category."
},
"label": {
"type": "string",
"description": "The label of this category."
},
"modifiedBy": {
"type": "object",
"properties": {
"displayName": {
"type": "string",
"description": "The display name of the user who modified this category."
},
"id": {
"type": "number",
"description": "The ID of the user who modified this category."
},
"userpicUrl": {
"type": "string",
"description": "The URL of modified user’s userpic. The userpic will be made by UserpicThumbnailSize and UserpicAllowRect settings. If user does not set own userpic, empty string will be returned."
}
}
},
"modifiedDate": {
"type": "string",
"description": "The last modified time for this category. (format is iso 8601 datetime)"
},
"parent": {
"type": "number",
"description": "The ID of the parent category for this category. This field can be updated from v2."
},
"updatable": {
"type": "boolean",
"description": "true: The user who accessed can update this category.\nfalse: The user who accessed cannot update this category."
}
}
},
"description": "The array of result content."
}
}
}
403
Do not have permission to retrieve the list of categories.
Headers
Content-Type: application/json
404
Site or category not found.
Headers
Content-Type: application/json
Category ¶
Fetch single categoryGET/sites/{site_id}/categories/{category_id}{?fields}
Retrieve a single category by its ID.
Example URI
- site_id
number
(required)The site ID.
- category_id
number
(required)The category ID.
- fields
string
(optional)The field list to retrieve as part of the Categories resource. The list of field names should be separated by commas. If this parameter is not specified, all fields will be returned.
200
Headers
Content-Type: application/json
Body
{
"archiveLink": "Hello, world!",
"basename": "Hello, world!",
"blog": {
"id": 1
},
"class": "Hello, world!",
"createdBy": {
"displayName": "Hello, world!",
"id": 1,
"userpicUrl": "Hello, world!"
},
"createdDate": "Hello, world!",
"customFields": [
{
"basename": "Hello, world!",
"value": "Hello, world!"
}
],
"description": "Hello, world!",
"id": 1,
"label": "Hello, world!",
"modifiedBy": {
"displayName": "Hello, world!",
"id": 1,
"userpicUrl": "Hello, world!"
},
"modifiedDate": "Hello, world!",
"parent": 1,
"updatable": true
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"archiveLink": {
"type": "string",
"description": "The category archive URL of this category. If “Category” archive mapping is not configured, this value will be null."
},
"basename": {
"type": "string",
"description": "The basename of this category."
},
"blog": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "The ID of the site that contains this category."
}
}
},
"class": {
"type": "string",
"description": "The object class for this category."
},
"createdBy": {
"type": "object",
"properties": {
"displayName": {
"type": "string",
"description": "The display name of the user who created this category."
},
"id": {
"type": "number",
"description": "The ID of the user who created this category."
},
"userpicUrl": {
"type": "string",
"description": "The URL of created user’s userpic. The userpic will be made by UserpicThumbnailSize and UserpicAllowRect settings. If user does not set own userpic, empty string will be returned."
}
}
},
"createdDate": {
"type": "string",
"description": "he created time for this category. (format is iso 8601 datetime)"
},
"customFields": {
"type": "array"
},
"description": {
"type": "string",
"description": "The description of this category."
},
"id": {
"type": "number",
"description": "The ID of this category."
},
"label": {
"type": "string",
"description": "The label of this category."
},
"modifiedBy": {
"type": "object",
"properties": {
"displayName": {
"type": "string",
"description": "The display name of the user who modified this category."
},
"id": {
"type": "number",
"description": "The ID of the user who modified this category."
},
"userpicUrl": {
"type": "string",
"description": "The URL of modified user’s userpic. The userpic will be made by UserpicThumbnailSize and UserpicAllowRect settings. If user does not set own userpic, empty string will be returned."
}
}
},
"modifiedDate": {
"type": "string",
"description": "The last modified time for this category. (format is iso 8601 datetime)"
},
"parent": {
"type": "number",
"description": "The ID of the parent category for this category. This field can be updated from v2."
},
"updatable": {
"type": "boolean",
"description": "true: The user who accessed can update this category.\nfalse: The user who accessed cannot update this category."
}
}
}
403
Do not have permission to retrieve a category.
Headers
Content-Type: application/json
404
Site or category not found.
Headers
Content-Type: application/json
Update single categoryPUT/sites/{site_id}/categories/{category_id}
Authentication required.
Update an existing category. This endpoint need folllowing permissions.
- Manage Categories
This method accepts PUT and POST with __method=PUT.
Post form data is following:
- category (Category) - Category resource
Example URI
- site_id
number
(required)The site ID.
- category_id
number
(required)The category ID.
Headers
Content-Type: application/x-www-form-urlencoded
Body
category={"basename" : "news","parent" : "0","archiveLink" : "http://example.com/news/index.html","updatable" : false,"label" : "News","class" : "category","id" : "1","blog" : {"id" : "1"},"description" : null,"customFields" : [{"basename" : "bannerImage","value" : "http://example.com/images/banner.jpg"}]}
200
Headers
Content-Type: application/json
Body
{
"archiveLink": "Hello, world!",
"basename": "Hello, world!",
"blog": {
"id": 1
},
"class": "Hello, world!",
"createdBy": {
"displayName": "Hello, world!",
"id": 1,
"userpicUrl": "Hello, world!"
},
"createdDate": "Hello, world!",
"customFields": [
{
"basename": "Hello, world!",
"value": "Hello, world!"
}
],
"description": "Hello, world!",
"id": 1,
"label": "Hello, world!",
"modifiedBy": {
"displayName": "Hello, world!",
"id": 1,
"userpicUrl": "Hello, world!"
},
"modifiedDate": "Hello, world!",
"parent": 1,
"updatable": true
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"archiveLink": {
"type": "string",
"description": "The category archive URL of this category. If “Category” archive mapping is not configured, this value will be null."
},
"basename": {
"type": "string",
"description": "The basename of this category."
},
"blog": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "The ID of the site that contains this category."
}
}
},
"class": {
"type": "string",
"description": "The object class for this category."
},
"createdBy": {
"type": "object",
"properties": {
"displayName": {
"type": "string",
"description": "The display name of the user who created this category."
},
"id": {
"type": "number",
"description": "The ID of the user who created this category."
},
"userpicUrl": {
"type": "string",
"description": "The URL of created user’s userpic. The userpic will be made by UserpicThumbnailSize and UserpicAllowRect settings. If user does not set own userpic, empty string will be returned."
}
}
},
"createdDate": {
"type": "string",
"description": "he created time for this category. (format is iso 8601 datetime)"
},
"customFields": {
"type": "array"
},
"description": {
"type": "string",
"description": "The description of this category."
},
"id": {
"type": "number",
"description": "The ID of this category."
},
"label": {
"type": "string",
"description": "The label of this category."
},
"modifiedBy": {
"type": "object",
"properties": {
"displayName": {
"type": "string",
"description": "The display name of the user who modified this category."
},
"id": {
"type": "number",
"description": "The ID of the user who modified this category."
},
"userpicUrl": {
"type": "string",
"description": "The URL of modified user’s userpic. The userpic will be made by UserpicThumbnailSize and UserpicAllowRect settings. If user does not set own userpic, empty string will be returned."
}
}
},
"modifiedDate": {
"type": "string",
"description": "The last modified time for this category. (format is iso 8601 datetime)"
},
"parent": {
"type": "number",
"description": "The ID of the parent category for this category. This field can be updated from v2."
},
"updatable": {
"type": "boolean",
"description": "true: The user who accessed can update this category.\nfalse: The user who accessed cannot update this category."
}
}
}
403
Do not have permission to update a category.
Headers
Content-Type: application/json
404
Site or category not found.
Headers
Content-Type: application/json
Delete single categoryDELETE/sites/{site_id}/categories/{category_id}
Authentication required.
Update an existing category. This endpoint need folllowing permissions.
- Manage Categories
This method accepts DELETE and POST with __method=DELETE.
Example URI
- site_id
number
(required)The site ID.
- category_id
number
(required)The category ID.
200
Headers
Content-Type: application/json
Body
{
"archiveLink": "Hello, world!",
"basename": "Hello, world!",
"blog": {
"id": 1
},
"class": "Hello, world!",
"createdBy": {
"displayName": "Hello, world!",
"id": 1,
"userpicUrl": "Hello, world!"
},
"createdDate": "Hello, world!",
"customFields": [
{
"basename": "Hello, world!",
"value": "Hello, world!"
}
],
"description": "Hello, world!",
"id": 1,
"label": "Hello, world!",
"modifiedBy": {
"displayName": "Hello, world!",
"id": 1,
"userpicUrl": "Hello, world!"
},
"modifiedDate": "Hello, world!",
"parent": 1,
"updatable": true
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"archiveLink": {
"type": "string",
"description": "The category archive URL of this category. If “Category” archive mapping is not configured, this value will be null."
},
"basename": {
"type": "string",
"description": "The basename of this category."
},
"blog": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "The ID of the site that contains this category."
}
}
},
"class": {
"type": "string",
"description": "The object class for this category."
},
"createdBy": {
"type": "object",
"properties": {
"displayName": {
"type": "string",
"description": "The display name of the user who created this category."
},
"id": {
"type": "number",
"description": "The ID of the user who created this category."
},
"userpicUrl": {
"type": "string",
"description": "The URL of created user’s userpic. The userpic will be made by UserpicThumbnailSize and UserpicAllowRect settings. If user does not set own userpic, empty string will be returned."
}
}
},
"createdDate": {
"type": "string",
"description": "he created time for this category. (format is iso 8601 datetime)"
},
"customFields": {
"type": "array"
},
"description": {
"type": "string",
"description": "The description of this category."
},
"id": {
"type": "number",
"description": "The ID of this category."
},
"label": {
"type": "string",
"description": "The label of this category."
},
"modifiedBy": {
"type": "object",
"properties": {
"displayName": {
"type": "string",
"description": "The display name of the user who modified this category."
},
"id": {
"type": "number",
"description": "The ID of the user who modified this category."
},
"userpicUrl": {
"type": "string",
"description": "The URL of modified user’s userpic. The userpic will be made by UserpicThumbnailSize and UserpicAllowRect settings. If user does not set own userpic, empty string will be returned."
}
}
},
"modifiedDate": {
"type": "string",
"description": "The last modified time for this category. (format is iso 8601 datetime)"
},
"parent": {
"type": "number",
"description": "The ID of the parent category for this category. This field can be updated from v2."
},
"updatable": {
"type": "boolean",
"description": "true: The user who accessed can update this category.\nfalse: The user who accessed cannot update this category."
}
}
}
403
Do not have permission to update a category.
Headers
Content-Type: application/json
404
Site or category not found.
Headers
Content-Type: application/json
Save hierarchical categories order ¶
Save hierarchical categories orderPOST/sites/{site_id}/categories/permutate
Authentication required.
Save hierarchical categories order. This endpoint need folllowing permissions.
- Manage Categories
This method returns rearranged Categories collection.
Post form data is following:
- categories (array[Category]) - Array of Categories resource that were rearranged.
Example URI
- site_id
number
(required)The site ID.
Headers
Content-Type: application/x-www-form-urlencoded
Body
categories=[{"basename" : "news","parent" : "0","archiveLink" : "http://example.com/news/index.html","updatable" : false,"label" : "News","class" : "category","id" : "1","blog" : {"id" : "1"},"description" : null,"customFields" : [{"basename" : "bannerImage","value" : "http://example.com/images/banner.jpg"},{"basename" : "pressreleases","parent" : "0","archiveLink" : "http://example.com/pressreleases/index.html","updatable" : false,"label" : "Press releases","class" : "category","id" : "2","blog" : {"id" : "1"},"description" : null,}]
200
Headers
Content-Type: application/json
Body
[
{
"archiveLink": "Hello, world!",
"basename": "Hello, world!",
"blog": {
"id": 1
},
"class": "Hello, world!",
"createdBy": {
"displayName": "Hello, world!",
"id": 1,
"userpicUrl": "Hello, world!"
},
"createdDate": "Hello, world!",
"customFields": [
{
"basename": "Hello, world!",
"value": "Hello, world!"
}
],
"description": "Hello, world!",
"id": 1,
"label": "Hello, world!",
"modifiedBy": {
"displayName": "Hello, world!",
"id": 1,
"userpicUrl": "Hello, world!"
},
"modifiedDate": "Hello, world!",
"parent": 1,
"updatable": true
}
]
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "array",
"items": {
"type": "object",
"properties": {
"archiveLink": {
"type": "string",
"description": "The category archive URL of this category. If “Category” archive mapping is not configured, this value will be null."
},
"basename": {
"type": "string",
"description": "The basename of this category."
},
"blog": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "The ID of the site that contains this category."
}
}
},
"class": {
"type": "string",
"description": "The object class for this category."
},
"createdBy": {
"type": "object",
"properties": {
"displayName": {
"type": "string",
"description": "The display name of the user who created this category."
},
"id": {
"type": "number",
"description": "The ID of the user who created this category."
},
"userpicUrl": {
"type": "string",
"description": "The URL of created user’s userpic. The userpic will be made by UserpicThumbnailSize and UserpicAllowRect settings. If user does not set own userpic, empty string will be returned."
}
}
},
"createdDate": {
"type": "string",
"description": "he created time for this category. (format is iso 8601 datetime)"
},
"customFields": {
"type": "array"
},
"description": {
"type": "string",
"description": "The description of this category."
},
"id": {
"type": "number",
"description": "The ID of this category."
},
"label": {
"type": "string",
"description": "The label of this category."
},
"modifiedBy": {
"type": "object",
"properties": {
"displayName": {
"type": "string",
"description": "The display name of the user who modified this category."
},
"id": {
"type": "number",
"description": "The ID of the user who modified this category."
},
"userpicUrl": {
"type": "string",
"description": "The URL of modified user’s userpic. The userpic will be made by UserpicThumbnailSize and UserpicAllowRect settings. If user does not set own userpic, empty string will be returned."
}
}
},
"modifiedDate": {
"type": "string",
"description": "The last modified time for this category. (format is iso 8601 datetime)"
},
"parent": {
"type": "number",
"description": "The ID of the parent category for this category. This field can be updated from v2."
},
"updatable": {
"type": "boolean",
"description": "true: The user who accessed can update this category.\nfalse: The user who accessed cannot update this category."
}
}
}
}
Categoris Collection for category set ¶
Categoris Collection for category setGET/sites/{site_id}/categorySets/{category_set_id}/categories{?maxDepth,includeCurrent,dateField,dateFrom,dateTo}
Retrieve list of categories of the specified category set.
Example URI
- site_id
number
(required)The site ID.
- category_set_id
number
(required)The category set ID.
- maxDepth
number
(optional) Example: 0The depth of retrieving parent categories.
- includeCurrent
number
(optional) Example: 0-
1: The list does not include current category.
-
The list includes current category.
-
- dateField
string
(optional) Example: created_onSpecifies the field name to be used as a date field for filtering. (new in v3)
- dateFrom
string
(optional)The start date to filtering. Specify in “YYYY-MM-DD” format. (new in v3)
- dateTo
string
(optional)The end date to filtering. Specify in “YYYY-MM-DD” format. (new in v3)
200
Headers
Content-Type: application/json
Body
{
"totalResults": 1,
"items": [
{
"archiveLink": "Hello, world!",
"basename": "Hello, world!",
"blog": {
"id": 1
},
"class": "Hello, world!",
"createdBy": {
"displayName": "Hello, world!",
"id": 1,
"userpicUrl": "Hello, world!"
},
"createdDate": "Hello, world!",
"customFields": [
{
"basename": "Hello, world!",
"value": "Hello, world!"
}
],
"description": "Hello, world!",
"id": 1,
"label": "Hello, world!",
"modifiedBy": {
"displayName": "Hello, world!",
"id": 1,
"userpicUrl": "Hello, world!"
},
"modifiedDate": "Hello, world!",
"parent": 1,
"updatable": true
}
]
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"totalResults": {
"type": "number",
"description": "Total record count of this request."
},
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"archiveLink": {
"type": "string",
"description": "The category archive URL of this category. If “Category” archive mapping is not configured, this value will be null."
},
"basename": {
"type": "string",
"description": "The basename of this category."
},
"blog": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "The ID of the site that contains this category."
}
}
},
"class": {
"type": "string",
"description": "The object class for this category."
},
"createdBy": {
"type": "object",
"properties": {
"displayName": {
"type": "string",
"description": "The display name of the user who created this category."
},
"id": {
"type": "number",
"description": "The ID of the user who created this category."
},
"userpicUrl": {
"type": "string",
"description": "The URL of created user’s userpic. The userpic will be made by UserpicThumbnailSize and UserpicAllowRect settings. If user does not set own userpic, empty string will be returned."
}
}
},
"createdDate": {
"type": "string",
"description": "he created time for this category. (format is iso 8601 datetime)"
},
"customFields": {
"type": "array"
},
"description": {
"type": "string",
"description": "The description of this category."
},
"id": {
"type": "number",
"description": "The ID of this category."
},
"label": {
"type": "string",
"description": "The label of this category."
},
"modifiedBy": {
"type": "object",
"properties": {
"displayName": {
"type": "string",
"description": "The display name of the user who modified this category."
},
"id": {
"type": "number",
"description": "The ID of the user who modified this category."
},
"userpicUrl": {
"type": "string",
"description": "The URL of modified user’s userpic. The userpic will be made by UserpicThumbnailSize and UserpicAllowRect settings. If user does not set own userpic, empty string will be returned."
}
}
},
"modifiedDate": {
"type": "string",
"description": "The last modified time for this category. (format is iso 8601 datetime)"
},
"parent": {
"type": "number",
"description": "The ID of the parent category for this category. This field can be updated from v2."
},
"updatable": {
"type": "boolean",
"description": "true: The user who accessed can update this category.\nfalse: The user who accessed cannot update this category."
}
}
},
"description": "The array of result content."
}
}
}
403
Do not have permission to retrieve the list of categories.
Headers
Content-Type: application/json
404
Site or category set not found.
Headers
Content-Type: application/json
Create a new category for category setPOST/sites/{site_id}/categorySets/{category_set_id}/categories
Authentication required.
Create a new category in category set. This endpoint needs following permissions.
- Manage Category Set
Post form data is following:
- category (Category) - Category resource
Example URI
- site_id
number
(required)The site ID.
- category_set_id
number
(required)The category set ID.
Headers
Content-Type: application/x-www-form-urlencoded
X-MT-Authorization: MTAuth accessToken=<Token>
Body
category={"basename" : "news","parent" : "0","label" : "News",description" : null}
200
Headers
Content-Type: application/json
Body
{
"archiveLink": "Hello, world!",
"basename": "Hello, world!",
"blog": {
"id": 1
},
"class": "Hello, world!",
"createdBy": {
"displayName": "Hello, world!",
"id": 1,
"userpicUrl": "Hello, world!"
},
"createdDate": "Hello, world!",
"customFields": [
{
"basename": "Hello, world!",
"value": "Hello, world!"
}
],
"description": "Hello, world!",
"id": 1,
"label": "Hello, world!",
"modifiedBy": {
"displayName": "Hello, world!",
"id": 1,
"userpicUrl": "Hello, world!"
},
"modifiedDate": "Hello, world!",
"parent": 1,
"updatable": true
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"archiveLink": {
"type": "string",
"description": "The category archive URL of this category. If “Category” archive mapping is not configured, this value will be null."
},
"basename": {
"type": "string",
"description": "The basename of this category."
},
"blog": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "The ID of the site that contains this category."
}
}
},
"class": {
"type": "string",
"description": "The object class for this category."
},
"createdBy": {
"type": "object",
"properties": {
"displayName": {
"type": "string",
"description": "The display name of the user who created this category."
},
"id": {
"type": "number",
"description": "The ID of the user who created this category."
},
"userpicUrl": {
"type": "string",
"description": "The URL of created user’s userpic. The userpic will be made by UserpicThumbnailSize and UserpicAllowRect settings. If user does not set own userpic, empty string will be returned."
}
}
},
"createdDate": {
"type": "string",
"description": "he created time for this category. (format is iso 8601 datetime)"
},
"customFields": {
"type": "array"
},
"description": {
"type": "string",
"description": "The description of this category."
},
"id": {
"type": "number",
"description": "The ID of this category."
},
"label": {
"type": "string",
"description": "The label of this category."
},
"modifiedBy": {
"type": "object",
"properties": {
"displayName": {
"type": "string",
"description": "The display name of the user who modified this category."
},
"id": {
"type": "number",
"description": "The ID of the user who modified this category."
},
"userpicUrl": {
"type": "string",
"description": "The URL of modified user’s userpic. The userpic will be made by UserpicThumbnailSize and UserpicAllowRect settings. If user does not set own userpic, empty string will be returned."
}
}
},
"modifiedDate": {
"type": "string",
"description": "The last modified time for this category. (format is iso 8601 datetime)"
},
"parent": {
"type": "number",
"description": "The ID of the parent category for this category. This field can be updated from v2."
},
"updatable": {
"type": "boolean",
"description": "true: The user who accessed can update this category.\nfalse: The user who accessed cannot update this category."
}
}
}
403
Do not have permission to create a new category.
Headers
Content-Type: application/json
404
Site or category set not found.
Headers
Content-Type: application/json
Categoris Collection of parent categories for category set ¶
Categoris Collection of parent categories for category setGET/sites/{site_id}/categorySets/{category_set_id}/categories/{category_id}/parents{?maxDepth,includeCurrent,dateField,dateFrom,dateTo}
Retrieve list of parent categories of the specified category set.
Example URI
- site_id
number
(required)The site ID.
- category_set_id
number
(required)The category set ID.
- category_id
number
(required)The category ID.
- maxDepth
number
(optional) Example: 0The depth of retrieving parent categories.
- includeCurrent
number
(optional) Example: 0-
1: The list does not include current category.
-
The list includes current category.
-
- dateField
string
(optional) Example: created_onSpecifies the field name to be used as a date field for filtering. (new in v3)
- dateFrom
string
(optional)The start date to filtering. Specify in “YYYY-MM-DD” format. (new in v3)
- dateTo
string
(optional)The end date to filtering. Specify in “YYYY-MM-DD” format. (new in v3)
200
Headers
Content-Type: application/json
Body
{
"totalResults": 1,
"items": [
{
"archiveLink": "Hello, world!",
"basename": "Hello, world!",
"blog": {
"id": 1
},
"class": "Hello, world!",
"createdBy": {
"displayName": "Hello, world!",
"id": 1,
"userpicUrl": "Hello, world!"
},
"createdDate": "Hello, world!",
"customFields": [
{
"basename": "Hello, world!",
"value": "Hello, world!"
}
],
"description": "Hello, world!",
"id": 1,
"label": "Hello, world!",
"modifiedBy": {
"displayName": "Hello, world!",
"id": 1,
"userpicUrl": "Hello, world!"
},
"modifiedDate": "Hello, world!",
"parent": 1,
"updatable": true
}
]
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"totalResults": {
"type": "number",
"description": "Total record count of this request."
},
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"archiveLink": {
"type": "string",
"description": "The category archive URL of this category. If “Category” archive mapping is not configured, this value will be null."
},
"basename": {
"type": "string",
"description": "The basename of this category."
},
"blog": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "The ID of the site that contains this category."
}
}
},
"class": {
"type": "string",
"description": "The object class for this category."
},
"createdBy": {
"type": "object",
"properties": {
"displayName": {
"type": "string",
"description": "The display name of the user who created this category."
},
"id": {
"type": "number",
"description": "The ID of the user who created this category."
},
"userpicUrl": {
"type": "string",
"description": "The URL of created user’s userpic. The userpic will be made by UserpicThumbnailSize and UserpicAllowRect settings. If user does not set own userpic, empty string will be returned."
}
}
},
"createdDate": {
"type": "string",
"description": "he created time for this category. (format is iso 8601 datetime)"
},
"customFields": {
"type": "array"
},
"description": {
"type": "string",
"description": "The description of this category."
},
"id": {
"type": "number",
"description": "The ID of this category."
},
"label": {
"type": "string",
"description": "The label of this category."
},
"modifiedBy": {
"type": "object",
"properties": {
"displayName": {
"type": "string",
"description": "The display name of the user who modified this category."
},
"id": {
"type": "number",
"description": "The ID of the user who modified this category."
},
"userpicUrl": {
"type": "string",
"description": "The URL of modified user’s userpic. The userpic will be made by UserpicThumbnailSize and UserpicAllowRect settings. If user does not set own userpic, empty string will be returned."
}
}
},
"modifiedDate": {
"type": "string",
"description": "The last modified time for this category. (format is iso 8601 datetime)"
},
"parent": {
"type": "number",
"description": "The ID of the parent category for this category. This field can be updated from v2."
},
"updatable": {
"type": "boolean",
"description": "true: The user who accessed can update this category.\nfalse: The user who accessed cannot update this category."
}
}
},
"description": "The array of result content."
}
}
}
403
Do not have permission to retrieve the list of categories.
Headers
Content-Type: application/json
404
Site, category set or category not found.
Headers
Content-Type: application/json
Categoris Collection of child categories for category set ¶
Categoris Collection of child categories for category setGET/sites/{site_id}/categorySets/{category_set_id}/categories/{category_id}/siblings{?maxDepth,includeCurrent,dateField,dateFrom,dateTo}
Retrieve list of child categories of the specified category set.
Example URI
- site_id
number
(required)The site ID.
- category_set_id
number
(required)The category set ID.
- category_id
number
(required)The category ID.
- maxDepth
number
(optional) Example: 0The depth of retrieving parent categories.
- includeCurrent
number
(optional) Example: 0-
1: The list does not include current category.
-
The list includes current category.
-
- dateField
string
(optional) Example: created_onSpecifies the field name to be used as a date field for filtering. (new in v3)
- dateFrom
string
(optional)The start date to filtering. Specify in “YYYY-MM-DD” format. (new in v3)
- dateTo
string
(optional)The end date to filtering. Specify in “YYYY-MM-DD” format. (new in v3)
200
Headers
Content-Type: application/json
Body
{
"totalResults": 1,
"items": [
{
"archiveLink": "Hello, world!",
"basename": "Hello, world!",
"blog": {
"id": 1
},
"class": "Hello, world!",
"createdBy": {
"displayName": "Hello, world!",
"id": 1,
"userpicUrl": "Hello, world!"
},
"createdDate": "Hello, world!",
"customFields": [
{
"basename": "Hello, world!",
"value": "Hello, world!"
}
],
"description": "Hello, world!",
"id": 1,
"label": "Hello, world!",
"modifiedBy": {
"displayName": "Hello, world!",
"id": 1,
"userpicUrl": "Hello, world!"
},
"modifiedDate": "Hello, world!",
"parent": 1,
"updatable": true
}
]
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"totalResults": {
"type": "number",
"description": "Total record count of this request."
},
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"archiveLink": {
"type": "string",
"description": "The category archive URL of this category. If “Category” archive mapping is not configured, this value will be null."
},
"basename": {
"type": "string",
"description": "The basename of this category."
},
"blog": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "The ID of the site that contains this category."
}
}
},
"class": {
"type": "string",
"description": "The object class for this category."
},
"createdBy": {
"type": "object",
"properties": {
"displayName": {
"type": "string",
"description": "The display name of the user who created this category."
},
"id": {
"type": "number",
"description": "The ID of the user who created this category."
},
"userpicUrl": {
"type": "string",
"description": "The URL of created user’s userpic. The userpic will be made by UserpicThumbnailSize and UserpicAllowRect settings. If user does not set own userpic, empty string will be returned."
}
}
},
"createdDate": {
"type": "string",
"description": "he created time for this category. (format is iso 8601 datetime)"
},
"customFields": {
"type": "array"
},
"description": {
"type": "string",
"description": "The description of this category."
},
"id": {
"type": "number",
"description": "The ID of this category."
},
"label": {
"type": "string",
"description": "The label of this category."
},
"modifiedBy": {
"type": "object",
"properties": {
"displayName": {
"type": "string",
"description": "The display name of the user who modified this category."
},
"id": {
"type": "number",
"description": "The ID of the user who modified this category."
},
"userpicUrl": {
"type": "string",
"description": "The URL of modified user’s userpic. The userpic will be made by UserpicThumbnailSize and UserpicAllowRect settings. If user does not set own userpic, empty string will be returned."
}
}
},
"modifiedDate": {
"type": "string",
"description": "The last modified time for this category. (format is iso 8601 datetime)"
},
"parent": {
"type": "number",
"description": "The ID of the parent category for this category. This field can be updated from v2."
},
"updatable": {
"type": "boolean",
"description": "true: The user who accessed can update this category.\nfalse: The user who accessed cannot update this category."
}
}
},
"description": "The array of result content."
}
}
}
403
Do not have permission to retrieve the list of categories.
Headers
Content-Type: application/json
404
Site, category set or category not found.
Headers
Content-Type: application/json
Category for Category Set ¶
Fetch single category in category setGET/sites/{site_id}/categorySets/{category_set_id}/categories/{category_id}{?fields}
Retrieve a single category by its ID.
Example URI
- site_id
number
(required)The site ID.
- category_set_id
number
(required)The category set ID.
- category_id
number
(required)The category ID.
- fields
string
(optional)The field list to retrieve as part of the Categories resource. The list of field names should be separated by commas. If this parameter is not specified, all fields will be returned.
200
Headers
Content-Type: application/json
Body
{
"archiveLink": "Hello, world!",
"basename": "Hello, world!",
"blog": {
"id": 1
},
"class": "Hello, world!",
"createdBy": {
"displayName": "Hello, world!",
"id": 1,
"userpicUrl": "Hello, world!"
},
"createdDate": "Hello, world!",
"customFields": [
{
"basename": "Hello, world!",
"value": "Hello, world!"
}
],
"description": "Hello, world!",
"id": 1,
"label": "Hello, world!",
"modifiedBy": {
"displayName": "Hello, world!",
"id": 1,
"userpicUrl": "Hello, world!"
},
"modifiedDate": "Hello, world!",
"parent": 1,
"updatable": true
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"archiveLink": {
"type": "string",
"description": "The category archive URL of this category. If “Category” archive mapping is not configured, this value will be null."
},
"basename": {
"type": "string",
"description": "The basename of this category."
},
"blog": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "The ID of the site that contains this category."
}
}
},
"class": {
"type": "string",
"description": "The object class for this category."
},
"createdBy": {
"type": "object",
"properties": {
"displayName": {
"type": "string",
"description": "The display name of the user who created this category."
},
"id": {
"type": "number",
"description": "The ID of the user who created this category."
},
"userpicUrl": {
"type": "string",
"description": "The URL of created user’s userpic. The userpic will be made by UserpicThumbnailSize and UserpicAllowRect settings. If user does not set own userpic, empty string will be returned."
}
}
},
"createdDate": {
"type": "string",
"description": "he created time for this category. (format is iso 8601 datetime)"
},
"customFields": {
"type": "array"
},
"description": {
"type": "string",
"description": "The description of this category."
},
"id": {
"type": "number",
"description": "The ID of this category."
},
"label": {
"type": "string",
"description": "The label of this category."
},
"modifiedBy": {
"type": "object",
"properties": {
"displayName": {
"type": "string",
"description": "The display name of the user who modified this category."
},
"id": {
"type": "number",
"description": "The ID of the user who modified this category."
},
"userpicUrl": {
"type": "string",
"description": "The URL of modified user’s userpic. The userpic will be made by UserpicThumbnailSize and UserpicAllowRect settings. If user does not set own userpic, empty string will be returned."
}
}
},
"modifiedDate": {
"type": "string",
"description": "The last modified time for this category. (format is iso 8601 datetime)"
},
"parent": {
"type": "number",
"description": "The ID of the parent category for this category. This field can be updated from v2."
},
"updatable": {
"type": "boolean",
"description": "true: The user who accessed can update this category.\nfalse: The user who accessed cannot update this category."
}
}
}
403
Do not have permission to retrieve a category.
Headers
Content-Type: application/json
404
Site or category not found.
Headers
Content-Type: application/json
Update single category in category setPUT/sites/{site_id}/categorySets/{category_set_id}/categories/{category_id}
Authentication required.
Update an existing category. This endpoint need folllowing permissions.
- Manage Categoy Set
Post form data is following:
- category (Category) - Category resource
This method accepts PUT and POST with __method=PUT.
Example URI
- site_id
number
(required)The site ID.
- category_set_id
number
(required)The category set ID.
- category_id
number
(required)The category ID.
Headers
Content-Type: application/x-www-form-urlencoded
Body
category={"basename" : "news","parent" : "0","archiveLink" : "http://example.com/news/index.html","updatable" : false,"label" : "News","class" : "category","id" : "1","blog" : {"id" : "1"},"description" : null,"customFields" : [{"basename" : "bannerImage","value" : "http://example.com/images/banner.jpg"}]}
200
Headers
Content-Type: application/json
Body
{
"archiveLink": "Hello, world!",
"basename": "Hello, world!",
"blog": {
"id": 1
},
"class": "Hello, world!",
"createdBy": {
"displayName": "Hello, world!",
"id": 1,
"userpicUrl": "Hello, world!"
},
"createdDate": "Hello, world!",
"customFields": [
{
"basename": "Hello, world!",
"value": "Hello, world!"
}
],
"description": "Hello, world!",
"id": 1,
"label": "Hello, world!",
"modifiedBy": {
"displayName": "Hello, world!",
"id": 1,
"userpicUrl": "Hello, world!"
},
"modifiedDate": "Hello, world!",
"parent": 1,
"updatable": true
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"archiveLink": {
"type": "string",
"description": "The category archive URL of this category. If “Category” archive mapping is not configured, this value will be null."
},
"basename": {
"type": "string",
"description": "The basename of this category."
},
"blog": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "The ID of the site that contains this category."
}
}
},
"class": {
"type": "string",
"description": "The object class for this category."
},
"createdBy": {
"type": "object",
"properties": {
"displayName": {
"type": "string",
"description": "The display name of the user who created this category."
},
"id": {
"type": "number",
"description": "The ID of the user who created this category."
},
"userpicUrl": {
"type": "string",
"description": "The URL of created user’s userpic. The userpic will be made by UserpicThumbnailSize and UserpicAllowRect settings. If user does not set own userpic, empty string will be returned."
}
}
},
"createdDate": {
"type": "string",
"description": "he created time for this category. (format is iso 8601 datetime)"
},
"customFields": {
"type": "array"
},
"description": {
"type": "string",
"description": "The description of this category."
},
"id": {
"type": "number",
"description": "The ID of this category."
},
"label": {
"type": "string",
"description": "The label of this category."
},
"modifiedBy": {
"type": "object",
"properties": {
"displayName": {
"type": "string",
"description": "The display name of the user who modified this category."
},
"id": {
"type": "number",
"description": "The ID of the user who modified this category."
},
"userpicUrl": {
"type": "string",
"description": "The URL of modified user’s userpic. The userpic will be made by UserpicThumbnailSize and UserpicAllowRect settings. If user does not set own userpic, empty string will be returned."
}
}
},
"modifiedDate": {
"type": "string",
"description": "The last modified time for this category. (format is iso 8601 datetime)"
},
"parent": {
"type": "number",
"description": "The ID of the parent category for this category. This field can be updated from v2."
},
"updatable": {
"type": "boolean",
"description": "true: The user who accessed can update this category.\nfalse: The user who accessed cannot update this category."
}
}
}
403
Do not have permission to update a category.
Headers
Content-Type: application/json
404
Site or category not found.
Headers
Content-Type: application/json
Delete single category in category setDELETE/sites/{site_id}/categorySets/{category_set_id}/categories/{category_id}
Authentication required.
Update an existing category. This endpoint need folllowing permissions.
- Manage Category Set
This method accepts DELETE and POST with __method=DELETE.
Example URI
- site_id
number
(required)The site ID.
- category_set_id
number
(required)The category set ID.
- category_id
number
(required)The category ID.
200
Headers
Content-Type: application/json
Body
{
"archiveLink": "Hello, world!",
"basename": "Hello, world!",
"blog": {
"id": 1
},
"class": "Hello, world!",
"createdBy": {
"displayName": "Hello, world!",
"id": 1,
"userpicUrl": "Hello, world!"
},
"createdDate": "Hello, world!",
"customFields": [
{
"basename": "Hello, world!",
"value": "Hello, world!"
}
],
"description": "Hello, world!",
"id": 1,
"label": "Hello, world!",
"modifiedBy": {
"displayName": "Hello, world!",
"id": 1,
"userpicUrl": "Hello, world!"
},
"modifiedDate": "Hello, world!",
"parent": 1,
"updatable": true
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"archiveLink": {
"type": "string",
"description": "The category archive URL of this category. If “Category” archive mapping is not configured, this value will be null."
},
"basename": {
"type": "string",
"description": "The basename of this category."
},
"blog": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "The ID of the site that contains this category."
}
}
},
"class": {
"type": "string",
"description": "The object class for this category."
},
"createdBy": {
"type": "object",
"properties": {
"displayName": {
"type": "string",
"description": "The display name of the user who created this category."
},
"id": {
"type": "number",
"description": "The ID of the user who created this category."
},
"userpicUrl": {
"type": "string",
"description": "The URL of created user’s userpic. The userpic will be made by UserpicThumbnailSize and UserpicAllowRect settings. If user does not set own userpic, empty string will be returned."
}
}
},
"createdDate": {
"type": "string",
"description": "he created time for this category. (format is iso 8601 datetime)"
},
"customFields": {
"type": "array"
},
"description": {
"type": "string",
"description": "The description of this category."
},
"id": {
"type": "number",
"description": "The ID of this category."
},
"label": {
"type": "string",
"description": "The label of this category."
},
"modifiedBy": {
"type": "object",
"properties": {
"displayName": {
"type": "string",
"description": "The display name of the user who modified this category."
},
"id": {
"type": "number",
"description": "The ID of the user who modified this category."
},
"userpicUrl": {
"type": "string",
"description": "The URL of modified user’s userpic. The userpic will be made by UserpicThumbnailSize and UserpicAllowRect settings. If user does not set own userpic, empty string will be returned."
}
}
},
"modifiedDate": {
"type": "string",
"description": "The last modified time for this category. (format is iso 8601 datetime)"
},
"parent": {
"type": "number",
"description": "The ID of the parent category for this category. This field can be updated from v2."
},
"updatable": {
"type": "boolean",
"description": "true: The user who accessed can update this category.\nfalse: The user who accessed cannot update this category."
}
}
}
403
Do not have permission to update a category.
Headers
Content-Type: application/json
404
Site or category not found.
Headers
Content-Type: application/json
Save hierarchical categories order in category set ¶
Save hierarchical categories order in category setPOST/sites/{site_id}/categorySets/{category_set_id}/categories/permutate
Authentication required.
Save hierarchical categories order. This endpoint need folllowing permissions.
- Manage Category Set
This method returns rearranged Categories collection.
Post form data is following:
- categories (array[Category]) - Array of Categories resource that were rearranged.
Example URI
- site_id
number
(required)The site ID.
- category_set_id
number
(required)The category set ID.
Headers
Content-Type: application/x-www-form-urlencoded
Body
categories=[{"basename" : "news","parent" : "0","archiveLink" : "http://example.com/news/index.html","updatable" : false,"label" : "News","class" : "category","id" : "1","blog" : {"id" : "1"},"description" : null,"customFields" : [{"basename" : "bannerImage","value" : "http://example.com/images/banner.jpg"},{"basename" : "pressreleases","parent" : "0","archiveLink" : "http://example.com/pressreleases/index.html","updatable" : false,"label" : "Press releases","class" : "category","id" : "2","blog" : {"id" : "1"},"description" : null,}]
200
Headers
Content-Type: application/json
Body
[
{
"archiveLink": "Hello, world!",
"basename": "Hello, world!",
"blog": {
"id": 1
},
"class": "Hello, world!",
"createdBy": {
"displayName": "Hello, world!",
"id": 1,
"userpicUrl": "Hello, world!"
},
"createdDate": "Hello, world!",
"customFields": [
{
"basename": "Hello, world!",
"value": "Hello, world!"
}
],
"description": "Hello, world!",
"id": 1,
"label": "Hello, world!",
"modifiedBy": {
"displayName": "Hello, world!",
"id": 1,
"userpicUrl": "Hello, world!"
},
"modifiedDate": "Hello, world!",
"parent": 1,
"updatable": true
}
]
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "array",
"items": {
"type": "object",
"properties": {
"archiveLink": {
"type": "string",
"description": "The category archive URL of this category. If “Category” archive mapping is not configured, this value will be null."
},
"basename": {
"type": "string",
"description": "The basename of this category."
},
"blog": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "The ID of the site that contains this category."
}
}
},
"class": {
"type": "string",
"description": "The object class for this category."
},
"createdBy": {
"type": "object",
"properties": {
"displayName": {
"type": "string",
"description": "The display name of the user who created this category."
},
"id": {
"type": "number",
"description": "The ID of the user who created this category."
},
"userpicUrl": {
"type": "string",
"description": "The URL of created user’s userpic. The userpic will be made by UserpicThumbnailSize and UserpicAllowRect settings. If user does not set own userpic, empty string will be returned."
}
}
},
"createdDate": {
"type": "string",
"description": "he created time for this category. (format is iso 8601 datetime)"
},
"customFields": {
"type": "array"
},
"description": {
"type": "string",
"description": "The description of this category."
},
"id": {
"type": "number",
"description": "The ID of this category."
},
"label": {
"type": "string",
"description": "The label of this category."
},
"modifiedBy": {
"type": "object",
"properties": {
"displayName": {
"type": "string",
"description": "The display name of the user who modified this category."
},
"id": {
"type": "number",
"description": "The ID of the user who modified this category."
},
"userpicUrl": {
"type": "string",
"description": "The URL of modified user’s userpic. The userpic will be made by UserpicThumbnailSize and UserpicAllowRect settings. If user does not set own userpic, empty string will be returned."
}
}
},
"modifiedDate": {
"type": "string",
"description": "The last modified time for this category. (format is iso 8601 datetime)"
},
"parent": {
"type": "number",
"description": "The ID of the parent category for this category. This field can be updated from v2."
},
"updatable": {
"type": "boolean",
"description": "true: The user who accessed can update this category.\nfalse: The user who accessed cannot update this category."
}
}
}
}
Category Set ¶
Category Set Collection ¶
Category Set CollectionGET/sites/{site_id}/categorySets{?search,searchFields,limit,offset,sortBy,sortOrder,fields,includeIds,excludeIds,dateField,dateFrom,dateTo}
Retrieve list of category set in the specified site. Authentication required if you want retrieve private field in categorySet resource. Required permissions is follows.
- Manage Category Set
- If you use search parameter, you must specify search parameter with searchFields parameter. (This will be fixed in a future release.)
Example URI
- site_id
number
(required) Example: 1The site ID.
- search
string
(optional)Search query.
- searchFields
string
(optional) Example: nameThe comma separated field name list to search. In this version, only
name
is available.- limit
number
(optional) Example: 10Maximum number of category set to retrieve.
- offset
number
(optional) Example: 00-indexed offset.
- sortBy
string
(optional) Example: nameThe field name for sort. You can specify one of following values.
-
id
-
name
-
created_on
-
modified_on
-
content_type_count
-
- sortOrder
string
(optional) Example: descend-
descend (default): Return category set in descending order.
-
ascend: Return category set in ascending order.
-
- fields
string
(optional)The field list to retrieve as part of the CategorySet resource. That list should be separated by comma. If this parameter is not specified, All fields will be returned.
- includeIds
string
(optional)The comma separated ID list of category set to include to result.
- excludeIds
string
(optional)The comma separated ID list of category set to exclude from result.
- dateField
string
(optional) Example: created_onSpecifies the field name to be used as a date field for filtering.
- dateFrom
string
(optional)The start date to filtering. Specify in “YYYY-MM-DD” format.
- dateTo
string
(optional)The end date to filtering. Specify in “YYYY-MM-DD” format.
200
Headers
Content-Type: application/json
Body
{
"totalResults": 1,
"items": [
{
"blog": {
"id": 1
},
"categories": [
{
"basename": "Hello, world!",
"id": 1,
"label": "Hello, world!",
"parent": 1
}
],
"content_type_count": 1,
"createdDate": "Hello, world!",
"id": 1,
"modifiedBy": {
"displayName": "Hello, world!",
"id": 1,
"userpicUrl": "Hello, world!"
},
"modifiedDate": "Hello, world!",
"name": "Hello, world!",
"updatable": true
}
]
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"totalResults": {
"type": "number",
"description": "Total record count of this request."
},
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"blog": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "The ID of the site that contains this category set. Not writable"
}
}
},
"categories": {
"type": "array",
"description": "List of categories. Not writable."
},
"content_type_count": {
"type": "number",
"description": "The number of content types using this category set. Not writable.\n\ncreatedBy - Created user of this category set. Not writable.\n\n+ displayName (string) - The display name of this category set creator. Not writable.\n\n+ id (number) - The ID of this category set creator. Not writable.\n\n+ userpicUrl (string) - The URL of this category set creator's userpic. The userpic will be made by UserpicThumbnailSize and UserpicAllowRect settings. If user does not set own userpic, will be returned empty string. Not writable."
},
"createdDate": {
"type": "string",
"description": "Created date of this category set. (format is iso 8601 datetime) Not writable."
},
"id": {
"type": "number",
"description": "The ID of this category set. Not writable."
},
"modifiedBy": {
"type": "object",
"properties": {
"displayName": {
"type": "string",
"description": "The display name of this category set modifier. Not writable."
},
"id": {
"type": "number",
"description": "The ID of this category set modifier. Not writable."
},
"userpicUrl": {
"type": "string",
"description": "The URL of this category set modifier's userpic. The userpic will be made by UserpicThumbnailSize and UserpicAllowRect settings. If user does not set own userpic, will be returned empty string. Not writable."
}
},
"description": "Last modified user of this category set. Not writable."
},
"modifiedDate": {
"type": "string",
"description": "Last modified date of this category set. (format is iso 8601 datetime) Not writable."
},
"name": {
"type": "string",
"description": "The name of this category set."
},
"updatable": {
"type": "boolean",
"description": "true: The user who accessed can update this category set. false: The user who accessed cannot update this category set."
}
}
},
"description": "The array of result content."
}
}
}
403
Do not have permission to retrieve category set.
Headers
Content-Type: application/json
404
Site not found.
Headers
Content-Type: application/json
Create a new category setPOST/sites/{site_id}/categorySets
Authentication Required
Create a new category set. This endpoint requires following permissions.
- Manage Category Set
Post form data is following
- category_set (CategorySet) - Single CategorySet resource
Example URI
- site_id
number
(required) Example: 1The site ID.
Headers
Content-Type: Content-Type: application/x-www-form-urlencoded
X-MT-Authorization: MTAuth accessToken=<Token>
Body
category_set={"name":"New Category Set"}
200
Headers
Content-Type: application/json
Body
{
"blog": {
"id": 1
},
"categories": [
{
"basename": "Hello, world!",
"id": 1,
"label": "Hello, world!",
"parent": 1
}
],
"content_type_count": 1,
"createdDate": "Hello, world!",
"id": 1,
"modifiedBy": {
"displayName": "Hello, world!",
"id": 1,
"userpicUrl": "Hello, world!"
},
"modifiedDate": "Hello, world!",
"name": "Hello, world!",
"updatable": true
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"blog": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "The ID of the site that contains this category set. Not writable"
}
}
},
"categories": {
"type": "array",
"description": "List of categories. Not writable."
},
"content_type_count": {
"type": "number",
"description": "The number of content types using this category set. Not writable.\n\ncreatedBy - Created user of this category set. Not writable.\n\n+ displayName (string) - The display name of this category set creator. Not writable.\n\n+ id (number) - The ID of this category set creator. Not writable.\n\n+ userpicUrl (string) - The URL of this category set creator's userpic. The userpic will be made by UserpicThumbnailSize and UserpicAllowRect settings. If user does not set own userpic, will be returned empty string. Not writable."
},
"createdDate": {
"type": "string",
"description": "Created date of this category set. (format is iso 8601 datetime) Not writable."
},
"id": {
"type": "number",
"description": "The ID of this category set. Not writable."
},
"modifiedBy": {
"type": "object",
"properties": {
"displayName": {
"type": "string",
"description": "The display name of this category set modifier. Not writable."
},
"id": {
"type": "number",
"description": "The ID of this category set modifier. Not writable."
},
"userpicUrl": {
"type": "string",
"description": "The URL of this category set modifier's userpic. The userpic will be made by UserpicThumbnailSize and UserpicAllowRect settings. If user does not set own userpic, will be returned empty string. Not writable."
}
},
"description": "Last modified user of this category set. Not writable."
},
"modifiedDate": {
"type": "string",
"description": "Last modified date of this category set. (format is iso 8601 datetime) Not writable."
},
"name": {
"type": "string",
"description": "The name of this category set."
},
"updatable": {
"type": "boolean",
"description": "true: The user who accessed can update this category set. false: The user who accessed cannot update this category set."
}
}
}
403
Do not have permission to create a new category set.
Headers
Content-Type: application/json
404
Site not found
Headers
Content-Type: application/json
CategorySet ¶
Fetch single category setGET/sites/{site_id}/categorySets/{category_set_id}{?fields}
Fetch a single category set. Authentication required if you want retrieve private field in categorySet resource. Required permissions is follows.
- Manage Category Set
Example URI
- site_id
number
(required) Example: 1The site ID.
- category_set_id
number
(required) Example: 1The category set ID.
- fields
string
(optional)The field list to retrieve as part of the CategorySet resource. That list should be separated by comma. If this parameter is not specified, All fields will be returned.
200
Headers
Content-Type: application/json
Body
{
"blog": {
"id": 1
},
"categories": [
{
"basename": "Hello, world!",
"id": 1,
"label": "Hello, world!",
"parent": 1
}
],
"content_type_count": 1,
"createdDate": "Hello, world!",
"id": 1,
"modifiedBy": {
"displayName": "Hello, world!",
"id": 1,
"userpicUrl": "Hello, world!"
},
"modifiedDate": "Hello, world!",
"name": "Hello, world!",
"updatable": true
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"blog": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "The ID of the site that contains this category set. Not writable"
}
}
},
"categories": {
"type": "array",
"description": "List of categories. Not writable."
},
"content_type_count": {
"type": "number",
"description": "The number of content types using this category set. Not writable.\n\ncreatedBy - Created user of this category set. Not writable.\n\n+ displayName (string) - The display name of this category set creator. Not writable.\n\n+ id (number) - The ID of this category set creator. Not writable.\n\n+ userpicUrl (string) - The URL of this category set creator's userpic. The userpic will be made by UserpicThumbnailSize and UserpicAllowRect settings. If user does not set own userpic, will be returned empty string. Not writable."
},
"createdDate": {
"type": "string",
"description": "Created date of this category set. (format is iso 8601 datetime) Not writable."
},
"id": {
"type": "number",
"description": "The ID of this category set. Not writable."
},
"modifiedBy": {
"type": "object",
"properties": {
"displayName": {
"type": "string",
"description": "The display name of this category set modifier. Not writable."
},
"id": {
"type": "number",
"description": "The ID of this category set modifier. Not writable."
},
"userpicUrl": {
"type": "string",
"description": "The URL of this category set modifier's userpic. The userpic will be made by UserpicThumbnailSize and UserpicAllowRect settings. If user does not set own userpic, will be returned empty string. Not writable."
}
},
"description": "Last modified user of this category set. Not writable."
},
"modifiedDate": {
"type": "string",
"description": "Last modified date of this category set. (format is iso 8601 datetime) Not writable."
},
"name": {
"type": "string",
"description": "The name of this category set."
},
"updatable": {
"type": "boolean",
"description": "true: The user who accessed can update this category set. false: The user who accessed cannot update this category set."
}
}
}
403
Do not have permission to retrieve a category set.
Headers
Content-Type: application/json
404
Site or category set not found
Headers
Content-Type: application/json
Update category setPUT/sites/{site_id}/categorySets/{category_set_id}
Authentication required Update single category set. This endpoint requires following permissions.
- Manage Category Set
Cannot update/insert/delete categories by this endpoint. If you want to manage categories in category set, please use Categories API.
This method accepts PUT or POST with parameter ‘__method=PUT’.
Example URI
- site_id
number
(required) Example: 1The site ID.
- category_set_id
number
(required) Example: 1The category set ID.
Headers
Content-Type: Content-Type: application/x-www-form-urlencoded
X-MT-Authorization: MTAuth accessToken=<Token>
Body
category_set={"name":"Update Category Set"}
200
Headers
Content-Type: application/json
Body
{
"blog": {
"id": 1
},
"categories": [
{
"basename": "Hello, world!",
"id": 1,
"label": "Hello, world!",
"parent": 1
}
],
"content_type_count": 1,
"createdDate": "Hello, world!",
"id": 1,
"modifiedBy": {
"displayName": "Hello, world!",
"id": 1,
"userpicUrl": "Hello, world!"
},
"modifiedDate": "Hello, world!",
"name": "Hello, world!",
"updatable": true
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"blog": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "The ID of the site that contains this category set. Not writable"
}
}
},
"categories": {
"type": "array",
"description": "List of categories. Not writable."
},
"content_type_count": {
"type": "number",
"description": "The number of content types using this category set. Not writable.\n\ncreatedBy - Created user of this category set. Not writable.\n\n+ displayName (string) - The display name of this category set creator. Not writable.\n\n+ id (number) - The ID of this category set creator. Not writable.\n\n+ userpicUrl (string) - The URL of this category set creator's userpic. The userpic will be made by UserpicThumbnailSize and UserpicAllowRect settings. If user does not set own userpic, will be returned empty string. Not writable."
},
"createdDate": {
"type": "string",
"description": "Created date of this category set. (format is iso 8601 datetime) Not writable."
},
"id": {
"type": "number",
"description": "The ID of this category set. Not writable."
},
"modifiedBy": {
"type": "object",
"properties": {
"displayName": {
"type": "string",
"description": "The display name of this category set modifier. Not writable."
},
"id": {
"type": "number",
"description": "The ID of this category set modifier. Not writable."
},
"userpicUrl": {
"type": "string",
"description": "The URL of this category set modifier's userpic. The userpic will be made by UserpicThumbnailSize and UserpicAllowRect settings. If user does not set own userpic, will be returned empty string. Not writable."
}
},
"description": "Last modified user of this category set. Not writable."
},
"modifiedDate": {
"type": "string",
"description": "Last modified date of this category set. (format is iso 8601 datetime) Not writable."
},
"name": {
"type": "string",
"description": "The name of this category set."
},
"updatable": {
"type": "boolean",
"description": "true: The user who accessed can update this category set. false: The user who accessed cannot update this category set."
}
}
}
403
Do not have permission to update a category set.
Headers
Content-Type: application/json
404
Site or category set not found
Headers
Content-Type: application/json
Delete category setDELETE/sites/{site_id}/categorySets/{category_set_id}
Authentication required Delete a single category set. This endpoint requires following permissions.
- Manage Category Set
This method accepts DELETE or POST with parameter ‘__method=DELETE’.
Example URI
- site_id
number
(required) Example: 1The site ID.
- category_set_id
number
(required) Example: 1The category set ID.
200
Headers
Content-Type: application/json
Body
{
"blog": {
"id": 1
},
"categories": [
{
"basename": "Hello, world!",
"id": 1,
"label": "Hello, world!",
"parent": 1
}
],
"content_type_count": 1,
"createdDate": "Hello, world!",
"id": 1,
"modifiedBy": {
"displayName": "Hello, world!",
"id": 1,
"userpicUrl": "Hello, world!"
},
"modifiedDate": "Hello, world!",
"name": "Hello, world!",
"updatable": true
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"blog": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "The ID of the site that contains this category set. Not writable"
}
}
},
"categories": {
"type": "array",
"description": "List of categories. Not writable."
},
"content_type_count": {
"type": "number",
"description": "The number of content types using this category set. Not writable.\n\ncreatedBy - Created user of this category set. Not writable.\n\n+ displayName (string) - The display name of this category set creator. Not writable.\n\n+ id (number) - The ID of this category set creator. Not writable.\n\n+ userpicUrl (string) - The URL of this category set creator's userpic. The userpic will be made by UserpicThumbnailSize and UserpicAllowRect settings. If user does not set own userpic, will be returned empty string. Not writable."
},
"createdDate": {
"type": "string",
"description": "Created date of this category set. (format is iso 8601 datetime) Not writable."
},
"id": {
"type": "number",
"description": "The ID of this category set. Not writable."
},
"modifiedBy": {
"type": "object",
"properties": {
"displayName": {
"type": "string",
"description": "The display name of this category set modifier. Not writable."
},
"id": {
"type": "number",
"description": "The ID of this category set modifier. Not writable."
},
"userpicUrl": {
"type": "string",
"description": "The URL of this category set modifier's userpic. The userpic will be made by UserpicThumbnailSize and UserpicAllowRect settings. If user does not set own userpic, will be returned empty string. Not writable."
}
},
"description": "Last modified user of this category set. Not writable."
},
"modifiedDate": {
"type": "string",
"description": "Last modified date of this category set. (format is iso 8601 datetime) Not writable."
},
"name": {
"type": "string",
"description": "The name of this category set."
},
"updatable": {
"type": "boolean",
"description": "true: The user who accessed can update this category set. false: The user who accessed cannot update this category set."
}
}
}
403
Do not have permission to delete a category set.
Headers
Content-Type: application/json
404
Site or category set not found
Headers
Content-Type: application/json
Content Types ¶
Content Type Collection ¶
Content Type CollectionGET/sites/{site_id}/contentTypes{?limit,offset,sortBy,sortOrder,fields,includeIds,excludeIds}
Authentication required
Retrieve a list of Content Types. This endpoint requires following permission.
- Manage Content Types
Example URI
- site_id
number
(required) Example: 1The site ID.
- limit
number
(optional) Example: 10Maximum number of entries to retrieve.
- offset
number
(optional) Example: 00-indexed offset.
- sortBy
string
(optional) Example: idThe field name for sort. You can specify one of following values.
-
name
-
dataLabel
-
uniqueID
-
modified_on
-
- sortOrder
string
(optional) Example: descend-
descend (default): Return entries in descending order.
-
ascend: Return entries in ascending order.
-
- fields
string
(optional)The field list to retrieve as part of the Entries resource. That list should be separated by comma. If this parameter is not specified, All fields will be returned.
- includeIds
string
(optional)The comma separated ID list of entries to include to result.
- excludeIds
string
(optional)The comma separated ID list of entries to exclude from result.
200
Headers
Content-Type: application/json
Body
{
"totalResults": 1,
"items": [
{
"blog": {
"id": 1
},
"contentFields": [
{
"id": 1,
"label": "Hello, world!",
"type": "Hello, world!",
"uniqueID": "Hello, world!"
}
],
"createdBy": {
"displayName": "Hello, world!",
"id": 1,
"userpicUrl": "Hello, world!"
},
"createdDate": "Hello, world!",
"dataLabel": "Hello, world!",
"description": "Hello, world!",
"id": 1,
"modifiedBy": {
"displayName": "Hello, world!",
"id": 1,
"userpicUrl": "Hello, world!"
},
"modifiedDate": "Hello, world!",
"name": "Hello, world!",
"uniqueID": "Hello, world!",
"updatable": true,
"userDisplayOption": true
}
]
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"totalResults": {
"type": "number",
"description": "Total record count of this request."
},
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"blog": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "The site ID. Not writable."
}
},
"description": "The site of this content type. Not writable."
},
"contentFields": {
"type": "array",
"description": "The list of content fields."
},
"createdBy": {
"type": "object",
"properties": {
"displayName": {
"type": "string",
"description": "The display name of this content type creator. Not writable."
},
"id": {
"type": "number",
"description": "The ID of this content type creator. Not writable."
},
"userpicUrl": {
"type": "string",
"description": "The URL of this content type creator's userpic. The userpic will be made by UserpicThumbnailSize and UserpicAllowRect settings. If user does not set own userpic, will be returned empty string. Not writable."
}
},
"description": "Created user of this content type. Not writable."
},
"createdDate": {
"type": "string",
"description": "Created date of this content type. (format is iso 8601 datetime) Not writable."
},
"dataLabel": {
"type": "string",
"description": "The Unique ID of the content field that is data label. If not set will be NULL."
},
"description": {
"type": "string",
"description": "The description of this content type."
},
"id": {
"type": "number",
"description": "The ID of this content type. Not writable."
},
"modifiedBy": {
"type": "object",
"properties": {
"displayName": {
"type": "string",
"description": "The display name of this content type modifier. Not writable."
},
"id": {
"type": "number",
"description": "The ID of this content type modifier. Not writable."
},
"userpicUrl": {
"type": "string",
"description": "The URL of this content type modifier's userpic. The userpic will be made by UserpicThumbnailSize and UserpicAllowRect settings. If user does not set own userpic, will be returned empty string. Not writable."
}
},
"description": "Last modified user of this content type. Not writable."
},
"modifiedDate": {
"type": "string",
"description": "Last modified date of this content type. (format is iso 8601 datetime) Not writable."
},
"name": {
"type": "string",
"description": "The name of this content type."
},
"uniqueID": {
"type": "string",
"description": "The unique ID of this content type. Not writable."
},
"updatable": {
"type": "boolean",
"description": "`true`: Current user can update this content type. / `false`: Current user cannot update this content type. Not writable."
},
"userDisplayOption": {
"type": "boolean",
"description": "`true`: Signed-in user can change display options for edit content data screen of this content type in the CMS admin screen. / `false`: Signed-in user cannot change display options for edit content data screen of this content type in the CMS admin screen."
}
}
},
"description": "The array of result content."
}
}
}
403
Do not have permission to retrieve content types.
Headers
Content-Type: application/json
404
Site not found.
Headers
Content-Type: application/json
Create Content TypePOST/sites/{site_id}/contentTypes
Authentication required
Create a new Content Type. This endpoint requires following permission.
- Manage Content Types
Post form data is follows.
- content_type (required, ContentType) - Single Content Type resource
Example URI
- site_id
number
(required) Example: 1The site ID.
Headers
Content-Type: application/x-www-form-urlencoded
X-MT-Authorization: MTAuth accessToken=<Token>
Body
content_type={"description": "This is new content type.","name": "New Content Type","userDisplayOption": true}
200
Headers
Content-Type: application/json
Body
{
"blog": {
"id": 1
},
"contentFields": [
{
"id": 1,
"label": "Hello, world!",
"type": "Hello, world!",
"uniqueID": "Hello, world!"
}
],
"createdBy": {
"displayName": "Hello, world!",
"id": 1,
"userpicUrl": "Hello, world!"
},
"createdDate": "Hello, world!",
"dataLabel": "Hello, world!",
"description": "Hello, world!",
"id": 1,
"modifiedBy": {
"displayName": "Hello, world!",
"id": 1,
"userpicUrl": "Hello, world!"
},
"modifiedDate": "Hello, world!",
"name": "Hello, world!",
"uniqueID": "Hello, world!",
"updatable": true,
"userDisplayOption": true
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"blog": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "The site ID. Not writable."
}
},
"description": "The site of this content type. Not writable."
},
"contentFields": {
"type": "array",
"description": "The list of content fields."
},
"createdBy": {
"type": "object",
"properties": {
"displayName": {
"type": "string",
"description": "The display name of this content type creator. Not writable."
},
"id": {
"type": "number",
"description": "The ID of this content type creator. Not writable."
},
"userpicUrl": {
"type": "string",
"description": "The URL of this content type creator's userpic. The userpic will be made by UserpicThumbnailSize and UserpicAllowRect settings. If user does not set own userpic, will be returned empty string. Not writable."
}
},
"description": "Created user of this content type. Not writable."
},
"createdDate": {
"type": "string",
"description": "Created date of this content type. (format is iso 8601 datetime) Not writable."
},
"dataLabel": {
"type": "string",
"description": "The Unique ID of the content field that is data label. If not set will be NULL."
},
"description": {
"type": "string",
"description": "The description of this content type."
},
"id": {
"type": "number",
"description": "The ID of this content type. Not writable."
},
"modifiedBy": {
"type": "object",
"properties": {
"displayName": {
"type": "string",
"description": "The display name of this content type modifier. Not writable."
},
"id": {
"type": "number",
"description": "The ID of this content type modifier. Not writable."
},
"userpicUrl": {
"type": "string",
"description": "The URL of this content type modifier's userpic. The userpic will be made by UserpicThumbnailSize and UserpicAllowRect settings. If user does not set own userpic, will be returned empty string. Not writable."
}
},
"description": "Last modified user of this content type. Not writable."
},
"modifiedDate": {
"type": "string",
"description": "Last modified date of this content type. (format is iso 8601 datetime) Not writable."
},
"name": {
"type": "string",
"description": "The name of this content type."
},
"uniqueID": {
"type": "string",
"description": "The unique ID of this content type. Not writable."
},
"updatable": {
"type": "boolean",
"description": "`true`: Current user can update this content type. / `false`: Current user cannot update this content type. Not writable."
},
"userDisplayOption": {
"type": "boolean",
"description": "`true`: Signed-in user can change display options for edit content data screen of this content type in the CMS admin screen. / `false`: Signed-in user cannot change display options for edit content data screen of this content type in the CMS admin screen."
}
}
}
403
Do not have permission to create a new content type.
Headers
Content-Type: application/json
404
Site not found.
Headers
Content-Type: application/json
Content Type ¶
Fetch single Content TypeGET/sites/{site_id}/contentTypes/{content_type_id}
Authentication required
Fetch single content type. This endpoint requires following permission.
- Manage Content Types
Example URI
- site_id
number
(required) Example: 1The site ID
- content_type_id
number
(required) Example: 1The content type ID
200
Headers
Content-Type: application/json
Body
{
"blog": {
"id": 1
},
"contentFields": [
{
"id": 1,
"label": "Hello, world!",
"type": "Hello, world!",
"uniqueID": "Hello, world!"
}
],
"createdBy": {
"displayName": "Hello, world!",
"id": 1,
"userpicUrl": "Hello, world!"
},
"createdDate": "Hello, world!",
"dataLabel": "Hello, world!",
"description": "Hello, world!",
"id": 1,
"modifiedBy": {
"displayName": "Hello, world!",
"id": 1,
"userpicUrl": "Hello, world!"
},
"modifiedDate": "Hello, world!",
"name": "Hello, world!",
"uniqueID": "Hello, world!",
"updatable": true,
"userDisplayOption": true
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"blog": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "The site ID. Not writable."
}
},
"description": "The site of this content type. Not writable."
},
"contentFields": {
"type": "array",
"description": "The list of content fields."
},
"createdBy": {
"type": "object",
"properties": {
"displayName": {
"type": "string",
"description": "The display name of this content type creator. Not writable."
},
"id": {
"type": "number",
"description": "The ID of this content type creator. Not writable."
},
"userpicUrl": {
"type": "string",
"description": "The URL of this content type creator's userpic. The userpic will be made by UserpicThumbnailSize and UserpicAllowRect settings. If user does not set own userpic, will be returned empty string. Not writable."
}
},
"description": "Created user of this content type. Not writable."
},
"createdDate": {
"type": "string",
"description": "Created date of this content type. (format is iso 8601 datetime) Not writable."
},
"dataLabel": {
"type": "string",
"description": "The Unique ID of the content field that is data label. If not set will be NULL."
},
"description": {
"type": "string",
"description": "The description of this content type."
},
"id": {
"type": "number",
"description": "The ID of this content type. Not writable."
},
"modifiedBy": {
"type": "object",
"properties": {
"displayName": {
"type": "string",
"description": "The display name of this content type modifier. Not writable."
},
"id": {
"type": "number",
"description": "The ID of this content type modifier. Not writable."
},
"userpicUrl": {
"type": "string",
"description": "The URL of this content type modifier's userpic. The userpic will be made by UserpicThumbnailSize and UserpicAllowRect settings. If user does not set own userpic, will be returned empty string. Not writable."
}
},
"description": "Last modified user of this content type. Not writable."
},
"modifiedDate": {
"type": "string",
"description": "Last modified date of this content type. (format is iso 8601 datetime) Not writable."
},
"name": {
"type": "string",
"description": "The name of this content type."
},
"uniqueID": {
"type": "string",
"description": "The unique ID of this content type. Not writable."
},
"updatable": {
"type": "boolean",
"description": "`true`: Current user can update this content type. / `false`: Current user cannot update this content type. Not writable."
},
"userDisplayOption": {
"type": "boolean",
"description": "`true`: Signed-in user can change display options for edit content data screen of this content type in the CMS admin screen. / `false`: Signed-in user cannot change display options for edit content data screen of this content type in the CMS admin screen."
}
}
}
403
Do not have permission to retrieve a content type.
Headers
Content-Type: application/json
404
Site or content type not found.
Headers
Content-Type: application/json
Update Content TypePUT/sites/{site_id}/contentTypes/{content_type_id}
Authentication required
Update content type. This endpoint requires following permission.
- Manage Content Types
Cannot update/insert/delete content fields by this endpoint. If you want to manage content fields, please use ContentFields API.
This method accepts PUT or POST with parameter ‘__method=PUT’.
Example URI
- site_id
number
(required) Example: 1The site ID
- content_type_id
number
(required) Example: 1The content type ID
Headers
Content-Type: application/x-www-form-urlencoded
X-MT-Authorization: MTAuth accessToken=<Token>
Body
content_type={"description": "New description"}
200
Headers
Content-Type: application/json
Body
{
"blog": {
"id": 1
},
"contentFields": [
{
"id": 1,
"label": "Hello, world!",
"type": "Hello, world!",
"uniqueID": "Hello, world!"
}
],
"createdBy": {
"displayName": "Hello, world!",
"id": 1,
"userpicUrl": "Hello, world!"
},
"createdDate": "Hello, world!",
"dataLabel": "Hello, world!",
"description": "Hello, world!",
"id": 1,
"modifiedBy": {
"displayName": "Hello, world!",
"id": 1,
"userpicUrl": "Hello, world!"
},
"modifiedDate": "Hello, world!",
"name": "Hello, world!",
"uniqueID": "Hello, world!",
"updatable": true,
"userDisplayOption": true
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"blog": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "The site ID. Not writable."
}
},
"description": "The site of this content type. Not writable."
},
"contentFields": {
"type": "array",
"description": "The list of content fields."
},
"createdBy": {
"type": "object",
"properties": {
"displayName": {
"type": "string",
"description": "The display name of this content type creator. Not writable."
},
"id": {
"type": "number",
"description": "The ID of this content type creator. Not writable."
},
"userpicUrl": {
"type": "string",
"description": "The URL of this content type creator's userpic. The userpic will be made by UserpicThumbnailSize and UserpicAllowRect settings. If user does not set own userpic, will be returned empty string. Not writable."
}
},
"description": "Created user of this content type. Not writable."
},
"createdDate": {
"type": "string",
"description": "Created date of this content type. (format is iso 8601 datetime) Not writable."
},
"dataLabel": {
"type": "string",
"description": "The Unique ID of the content field that is data label. If not set will be NULL."
},
"description": {
"type": "string",
"description": "The description of this content type."
},
"id": {
"type": "number",
"description": "The ID of this content type. Not writable."
},
"modifiedBy": {
"type": "object",
"properties": {
"displayName": {
"type": "string",
"description": "The display name of this content type modifier. Not writable."
},
"id": {
"type": "number",
"description": "The ID of this content type modifier. Not writable."
},
"userpicUrl": {
"type": "string",
"description": "The URL of this content type modifier's userpic. The userpic will be made by UserpicThumbnailSize and UserpicAllowRect settings. If user does not set own userpic, will be returned empty string. Not writable."
}
},
"description": "Last modified user of this content type. Not writable."
},
"modifiedDate": {
"type": "string",
"description": "Last modified date of this content type. (format is iso 8601 datetime) Not writable."
},
"name": {
"type": "string",
"description": "The name of this content type."
},
"uniqueID": {
"type": "string",
"description": "The unique ID of this content type. Not writable."
},
"updatable": {
"type": "boolean",
"description": "`true`: Current user can update this content type. / `false`: Current user cannot update this content type. Not writable."
},
"userDisplayOption": {
"type": "boolean",
"description": "`true`: Signed-in user can change display options for edit content data screen of this content type in the CMS admin screen. / `false`: Signed-in user cannot change display options for edit content data screen of this content type in the CMS admin screen."
}
}
}
403
Do not have permission to update a content type.
Headers
Content-Type: application/json
404
Site or content type not found.
Headers
Content-Type: application/json
Delete Content TypeDELETE/sites/{site_id}/contentTypes/{content_type_id}
Authentication required
Delete content type. This endpoint requires following permission.
- Manage Content Types
This method accepts DELETE or POST with parameter ‘__method=DELETE’.
Example URI
- site_id
number
(required) Example: 1The site ID
- content_type_id
number
(required) Example: 1The content type ID
200
Headers
Content-Type: application/json
Body
{
"blog": {
"id": 1
},
"contentFields": [
{
"id": 1,
"label": "Hello, world!",
"type": "Hello, world!",
"uniqueID": "Hello, world!"
}
],
"createdBy": {
"displayName": "Hello, world!",
"id": 1,
"userpicUrl": "Hello, world!"
},
"createdDate": "Hello, world!",
"dataLabel": "Hello, world!",
"description": "Hello, world!",
"id": 1,
"modifiedBy": {
"displayName": "Hello, world!",
"id": 1,
"userpicUrl": "Hello, world!"
},
"modifiedDate": "Hello, world!",
"name": "Hello, world!",
"uniqueID": "Hello, world!",
"updatable": true,
"userDisplayOption": true
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"blog": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "The site ID. Not writable."
}
},
"description": "The site of this content type. Not writable."
},
"contentFields": {
"type": "array",
"description": "The list of content fields."
},
"createdBy": {
"type": "object",
"properties": {
"displayName": {
"type": "string",
"description": "The display name of this content type creator. Not writable."
},
"id": {
"type": "number",
"description": "The ID of this content type creator. Not writable."
},
"userpicUrl": {
"type": "string",
"description": "The URL of this content type creator's userpic. The userpic will be made by UserpicThumbnailSize and UserpicAllowRect settings. If user does not set own userpic, will be returned empty string. Not writable."
}
},
"description": "Created user of this content type. Not writable."
},
"createdDate": {
"type": "string",
"description": "Created date of this content type. (format is iso 8601 datetime) Not writable."
},
"dataLabel": {
"type": "string",
"description": "The Unique ID of the content field that is data label. If not set will be NULL."
},
"description": {
"type": "string",
"description": "The description of this content type."
},
"id": {
"type": "number",
"description": "The ID of this content type. Not writable."
},
"modifiedBy": {
"type": "object",
"properties": {
"displayName": {
"type": "string",
"description": "The display name of this content type modifier. Not writable."
},
"id": {
"type": "number",
"description": "The ID of this content type modifier. Not writable."
},
"userpicUrl": {
"type": "string",
"description": "The URL of this content type modifier's userpic. The userpic will be made by UserpicThumbnailSize and UserpicAllowRect settings. If user does not set own userpic, will be returned empty string. Not writable."
}
},
"description": "Last modified user of this content type. Not writable."
},
"modifiedDate": {
"type": "string",
"description": "Last modified date of this content type. (format is iso 8601 datetime) Not writable."
},
"name": {
"type": "string",
"description": "The name of this content type."
},
"uniqueID": {
"type": "string",
"description": "The unique ID of this content type. Not writable."
},
"updatable": {
"type": "boolean",
"description": "`true`: Current user can update this content type. / `false`: Current user cannot update this content type. Not writable."
},
"userDisplayOption": {
"type": "boolean",
"description": "`true`: Signed-in user can change display options for edit content data screen of this content type in the CMS admin screen. / `false`: Signed-in user cannot change display options for edit content data screen of this content type in the CMS admin screen."
}
}
}
403
Do not have permission to delete a content type.
Headers
Content-Type: application/json
404
Site or content type not found.
Headers
Content-Type: application/json
Content Fields ¶
Each content fields contains some option fields. Which options are available by the field, please see the table below.
Content Field Options
Single Line Text
-
description (string) - The descrption of this field.
-
display (string) - The display option that for the listing screen of this field .
-
initial_value - Initial value of this field. This means the initial display value rather than the default value at save.
-
label (string) - The label of this field.
-
max_length (number) - The maximum length of this field value.
-
min_length (number) - The minimum length of this field value.
-
required (number) -
0
: This field is not required.1
: This field is required.
Multi Line Text
-
description (string) - The descrption of this field.
-
display (string) - The display option that for the listing screen of this field .
-
initial_value - Initial value of this field. This means the initial display + value rather than the default value at save.
-
input_format (string) - The name of input format of this field.
-
label (string) - The label of this field.
-
required (number) -
0
: This field is not required.1
: This field is required.
Number
-
decimal_places (number) - The length of decimal places.
-
description (string) - The descrption of this field.
-
display (string) - The display option that for the listing screen of this field .
-
initial_value - Initial value of this field. This means the initial display value rather than the default value at save.
-
label (string) - The label of this field.
-
max_value (number) - The maximum value of this field.
-
min_value (number) - The minimum value of this field.
-
required (number) -
0
: This field is not required.1
: This field is required.
URL
-
description (string) - The descrption of this field.
-
display (string) - The display option that for the listing screen of this field .
-
initial_value - Initial value of this field. This means the initial display value rather than the default value at save.
-
label (string) - The label of this field.
-
required (number) -
0
: This field is not required.1
: This field is required.
Date and Time
-
description (string) - The descrption of this field.
-
display (string) - The display option that for the listing screen of this field .
-
initial_value - Initial value of this field. This means the initial display value rather than the default value at save.
-
label (string) - The label of this field.
-
required (number) -
0
: This field is not required.1
: This field is required.
Date
-
description (string) - The descrption of this field.
-
display (string) - The display option that for the listing screen of this field .
-
initial_value - Initial value of this field. This means the initial display value rather than the default value at save.
-
label (string) - The label of this field.
-
required (number) -
0
: This field is not required.1
: This field is required.
Time
-
description (string) - The descrption of this field.
-
display (string) - The display option that for the listing screen of this field .
-
initial_value - Initial value of this field. This means the initial display value rather than the default value at save.
-
label (string) - The label of this field.
-
required (number) -
0
: This field is not required.1
: This field is required.
Select Box
-
description (string) - The descrption of this field.
-
display (string) - The display option that for the listing screen of this field .
-
label (string) - The label of this field.
-
max (number) - The maximum number that can be selected for this field.
-
min (number) - The minimum number that should be selected for this field.
-
multiple (number) -
0
: This field cannot accept multiple selection.1
: This field accept multiple selection.
-
required (number) -
0
: This field is not required.1
: This field is required.
-
values (array) - List of label-value pairs.
- checked:
checked
(string) - If this field value is checked, returnchecked
. Otherwise, return null. - label (string) - The label of this field value.
- value (string) - The value of this field value.
- checked:
Radio Button
-
description (string) - The descrption of this field.
-
display (string) - The display option that for the listing screen of this field .
-
label (string) - The label of this field.
-
required (number) -
0
: This field is not required.1
: This field is required.
-
values (array) - List of label-value pairs.
- checked:
checked
(string) - If this field value is checked, returnchecked
. Otherwise, return null. - label (string) - The label of this field value.
- value (string) - The value of this field value.
- checked:
Checkboxes
-
description (string) - The descrption of this field.
-
display (string) - The display option that for the listing screen of this field .
-
label (string) - The label of this field.
-
max (number) - The maximum number that can be selected for this field.
-
min (number) - The minimum number that should be selected for this field.
-
multiple (number) -
0
: This field cannot accept multiple selection.1
: This field accept multiple selection.
-
required (number) -
0
: This field is not required.1
: This field is required.
-
values (array) - List of label-value pairs.
- checked:
checked
(string) - If this field value is checked, returnchecked
. Otherwise, return null. - label (string) - The label of this field value.
- value (string) - The value of this field value.
- checked:
Asset
-
allow_upload (number):
0
: Users can upload new asset in this field.1
: Users cannot upload new asset in this field.
-
description (string) - The descrption of this field.
-
display (string) - The display option that for the listing screen of this field .
-
label (string) - The label of this field.
-
max (number) - The maximum number that can be selected for this field.
-
min (number) - The minimum number that should be selected for this field.
-
multiple (number) -
0
: This field cannot accept multiple selection.1
: This field accept multiple selection.
-
required (number) -
0
: This field is not required.1
: This field is required.
Audio
-
allow_upload (number):
0
: Users can upload new asset in this field.1
: Users cannot upload new asset in this field.
-
description (string) - The descrption of this field.
-
display (string) - The display option that for the listing screen of this field .
-
label (string) - The label of this field.
-
max (number) - The maximum number that can be selected for this field.
-
min (number) - The minimum number that should be selected for this field.
-
multiple (number) -
0
: This field cannot accept multiple selection.1
: This field accept multiple selection.
-
required (number) -
0
: This field is not required.1
: This field is required.
Video
-
allow_upload (number):
0
: Users can upload new asset in this field.1
: Users cannot upload new asset in this field.
-
description (string) - The descrption of this field.
-
display (string) - The display option that for the listing screen of this field .
-
label (string) - The label of this field.
-
max (number) - The maximum number that can be selected for this field.
-
min (number) - The minimum number that should be selected for this field.
-
multiple (number) -
0
: This field cannot accept multiple selection.1
: This field accept multiple selection.
-
required (number) -
0
: This field is not required.1
: This field is required.
Image
-
allow_upload (number):
0
: Users can upload new asset in this field.1
: Users cannot upload new asset in this field.
-
description (string) - The descrption of this field.
-
display (string) - The display option that for the listing screen of this field .
-
label (string) - The label of this field.
-
max (number) - The maximum number that can be selected for this field.
-
min (number) - The minimum number that should be selected for this field.
-
multiple (number) -
0
: This field cannot accept multiple selection.1
: This field accept multiple selection.
-
required (number) -
0
: This field is not required.1
: This field is required.
Embedded Text
-
description (string) - The descrption of this field.
-
display (string) - The display option that for the listing screen of this field .
-
initial_value - Initial value of this field. This means the initial display value rather than the default value at save.
-
label (string) - The label of this field.
-
required (number) -
0
: This field is not required.1
: This field is required.
Tag
-
can_add (number) -
0
: Users can create a new categories in this field.1
: Users cannot create a new categories in this field.
-
description (string) - The descrption of this field.
-
display (string) - The display option that for the listing screen of this field .
-
initial_value - Initial value of this field. This means the initial display value rather than the default value at save.
-
label (string) - The label of this field.
-
max (number) - The maximum number that can be selected for this field.
-
min (number) - The minimum number that should be selected for this field.
-
multiple (number) -
0
: This field cannot accept multiple selection.1
: This field accept multiple selection.
-
required (number) -
0
: This field is not required.1
: This field is required.
List
-
description (string) - The descrption of this field.
-
display (string) - The display option that for the listing screen of this field .
-
label (string) - The label of this field.
-
required (number) -
0
: This field is not required.1
: This field is required.
Table
-
description (string) - The descrption of this field.
-
display (string) - The display option that for the listing screen of this field .
-
increase_decrease_cols (number) -
0
: Users can increase/decrease columns.1
: Users cannot increase/decrease columns.
-
increase_decrease_rows (number) -
0
: Users can increase/decrease rows.1
: Users cannot increase/decrease rows.
-
initial_cols (number) - The number of initial columns.
-
initial_rows (number) - The number of initial rows.
-
label (string) - The label of this field.
-
required (number) -
0
: This field is not required.1
: This field is required.
Content Type
-
description (string) - The descrption of this field.
-
display (string) - The display option that for the listing screen of this field .
-
label (string) - The label of this field.
-
max (number) - The maximum number that can be selected for this field.
-
min (number) - The minimum number that should be selected for this field.
-
multiple (number) -
0
: This field cannot accept multiple selection.1
: This field accept multiple selection.
-
required (number) -
0
: This field is not required.1
: This field is required.
-
source (number) - The ID of content type that linked with this field.
Category Set
-
can_add (number) -
0
: Users can create a new categories in this field.1
: Users cannot create a new categories in this field.
-
category_set (number) - The ID of category set that linked with this field.
-
description (string) - The descrption of this field.
-
display (string) - The display option that for the listing screen of this field .
-
label (string) - The label of this field.
-
max (number) - The maximum number that can be selected for this field.
-
min (number) - The minimum number that should be selected for this field.
-
multiple (number) -
0
: This field cannot accept multiple selection.1
: This field accept multiple selection.
-
required (number) -
0
: This field is not required.1
: This field is required.
Content Field Collection ¶
Content Field CollectionGET/sites/{site_id}/contentTypes/{content_type_id}/fields{?limit,offset,sortBy,sortOrder,fields,includeIds,excludeIds}
Authentication required
Retrieve a list of Content Fields of the specified Content Type. This endpoint requires following permission.
- Manage Content Types
Example URI
- site_id
number
(required) Example: 1The site ID.
- content_type_id
number
(required) Example: 1The content type ID.
- limit
number
(optional) Example: 10Maximum number of entries to retrieve.
- offset
number
(optional) Example: 00-indexed offset.
- sortBy
string
(optional) Example: idThe field name for sort. You can specify one of following values.
-
name
-
dataLabel
-
uniqueID
-
modified_on
-
- sortOrder
string
(optional) Example: descend-
descend (default): Return entries in descending order.
-
ascend: Return entries in ascending order.
-
- fields
string
(optional)The field list to retrieve as part of the Entries resource. That list should be separated by comma. If this parameter is not specified, All fields will be returned.
- includeIds
string
(optional)The comma separated ID list of entries to include to result.
- excludeIds
string
(optional)The comma separated ID list of entries to exclude from result.
200
Headers
Content-Type: application/json
Body
{
"totalResults": 1,
"items": [
{
"blog": {
"id": 1,
"displayName": "Hello, world!",
"userpicUrl": "Hello, world!"
},
"createdDate": "Hello, world!",
"description": "Hello, world!",
"id": 1,
"label": "Hello, world!",
"modifiedBy": {
"displayName": "Hello, world!",
"id": 1,
"userpicUrl": "Hello, world!"
},
"modifiedDate": "Hello, world!",
"options": {
"description": "Hello, world!",
"display": "Hello, world!",
"initial_value": "Hello, world!",
"label": "Hello, world!",
"max_length": 1,
"min_length": 1,
"required": 1,
"input_format": "Hello, world!",
"decimal_places": 1,
"max_value": 1,
"min_value": 1,
"max": 1,
"min": 1,
"multiple": 1,
"values": [
{
"checked": "checked",
"label": "Hello, world!",
"value": "Hello, world!"
}
],
"allow_upload": 1,
"can_add": 1,
"increase_decrease_cols": 1,
"increase_decrease_rows": 1,
"initial_cols": 1,
"initial_rows": 1,
"source": 1,
"category_set": 1
},
"type": "Hello, world!",
"uniqueID": "Hello, world!",
"updatable": true
}
]
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"totalResults": {
"type": "number",
"description": "Total record count of this request."
},
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"blog": {
"type": "object",
"properties": {
"displayName": {
"type": "string",
"description": "The display name of this content field creator. Not writable."
},
"id": {
"type": "number",
"description": "The ID of this content field creator. Not writable."
},
"userpicUrl": {
"type": "string",
"description": "The URL of this content field creator's userpic. The userpic will be made by UserpicThumbnailSize and UserpicAllowRect settings. If user does not set own userpic, will be returned empty string. Not writable."
}
},
"description": "The site of this content field. Not writable."
},
"createdDate": {
"type": "string",
"description": "Created date of this content field. (format is iso 8601 datetime) Not writable."
},
"description": {
"type": "string",
"description": "The description of this content field."
},
"id": {
"type": "number",
"description": "The ID of this content field. Not writable."
},
"label": {
"type": "string",
"description": "The labeel of this content field."
},
"modifiedBy": {
"type": "object",
"properties": {
"displayName": {
"type": "string",
"description": "The display name of this content field modifier. Not writable."
},
"id": {
"type": "number",
"description": "The ID of this content field modifier. Not writable."
},
"userpicUrl": {
"type": "string",
"description": "The URL of this content field modifier's userpic. The userpic will be made by UserpicThumbnailSize and UserpicAllowRect settings. If user does not set own userpic, will be returned empty string. Not writable."
}
},
"description": "Last modified user of this content field. Not writable."
},
"modifiedDate": {
"type": "string",
"description": "Last modified date of this content field. (format is iso 8601 datetime) Not writable."
},
"options": {
"type": "object",
"properties": {
"description": {
"type": "string",
"description": "The descrption of this field."
},
"display": {
"type": "string",
"description": "The display option that for the listing screen of this field ."
},
"initial_value": {
"type": "string",
"description": "Initial value of this field. This means the initial display value rather than the default value at save."
},
"label": {
"type": "string",
"description": "The label of this field."
},
"max_length": {
"type": "number",
"description": "The maximum length of this field value."
},
"min_length": {
"type": "number",
"description": "The minimum length of this field value."
},
"required": {
"type": "number",
"description": "`0`: This field is not required. / `1`: This field is required."
},
"input_format": {
"type": "string",
"description": "The name of input format of this field."
},
"decimal_places": {
"type": "number",
"description": "The length of decimal places."
},
"max_value": {
"type": "number",
"description": "The maximum value of this field."
},
"min_value": {
"type": "number",
"description": "The minimum value of this field."
},
"max": {
"type": "number",
"description": "The maximum number that can be selected for this field."
},
"min": {
"type": "number",
"description": "The minimum number that should be selected for this field."
},
"multiple": {
"type": "number",
"description": "`0`: This field cannot accept multiple selection. / `1`: This field accept multiple selection."
},
"values": {
"type": "array",
"description": "List of label-value pairs."
},
"allow_upload": {
"type": "number"
},
"can_add": {
"type": "number",
"description": "`0`: Users can create a new categories in this field. / `1`: Users cannot create a new categories in this field."
},
"increase_decrease_cols": {
"type": "number",
"description": "`0`: Users can increase/decrease columns. / `1`: Users cannot increase/decrease columns."
},
"increase_decrease_rows": {
"type": "number",
"description": "`0`: Users can increase/decrease rows. / `1`: Users cannot increase/decrease rows."
},
"initial_cols": {
"type": "number",
"description": "The number of initial columns."
},
"initial_rows": {
"type": "number",
"description": "The number of initial rows."
},
"source": {
"type": "number",
"description": "The ID of content type that linked with this field."
},
"category_set": {
"type": "number",
"description": "The ID of category set that linked with this field."
}
},
"description": "The field option object. The members of this object are different depending on the type of field."
},
"type": {
"type": "string",
"description": "The field type. This property can be set only when creating. Available values are follows. `single_line_text`: Single line text field. / `multi_line_text`: Multiple line text field. / `number` Number field. / `url`: URL field. / `date_and_time`: Date and time field. / `date_only`: Date only fiel. / `time_only`: Time only field. / `select_box`: Select box field. / `radio_button`: Radio button field. / `checkboxes`: Checkbox field. / `asset`: Asset (file) type field. / `asset_audio`: Audio asset field. / `asset_video`: Video asset field. / `asset_image`: Image asset field. / `embedded_text`: Embedded text field. / `tags`: Tag field. / `list`: List field. / `tables`: Table field. / `content_type` Content type field. / `categories`: Category set field."
},
"uniqueID": {
"type": "string",
"description": "The unique ID of this content field. Not writable."
},
"updatable": {
"type": "boolean",
"description": "`true`: Current user can update this content field. / `false`: Current user cannot update this content field. Not writable."
}
}
},
"description": "The array of result content."
}
}
}
403
Do not have permission to retrieve content fields.
Headers
Content-Type: application/json
404
Site, content type or content field not found
Headers
Content-Type: application/json
Create Content FieldPOST/sites/{site_id}/contentTypes/{content_type_id}/fields
Authentication required
Create a new Content Field. This endpoint requires following permission.
- Manage Content Types
Post form data is follows.
- content_field (required, ContentField) - Single Content Field resource
Example URI
- site_id
number
(required) Example: 1The site ID.
- content_type_id
number
(required) Example: 1The content type ID.
Headers
Content-Type: application/x-www-form-urlencoded
X-MT-Authorization: MTAuth accessToken=<Token>
Body
content_field={"type": "single_line_text","label": "New Content Field","options": {"description": "This is new single line field.","required": "1","initial_value":"","max_length":"100","min_length":"0"}}
200
Headers
Content-Type: application/json
Body
{
"blog": {
"id": 1,
"displayName": "Hello, world!",
"userpicUrl": "Hello, world!"
},
"createdDate": "Hello, world!",
"description": "Hello, world!",
"id": 1,
"label": "Hello, world!",
"modifiedBy": {
"displayName": "Hello, world!",
"id": 1,
"userpicUrl": "Hello, world!"
},
"modifiedDate": "Hello, world!",
"options": {
"description": "Hello, world!",
"display": "Hello, world!",
"initial_value": "Hello, world!",
"label": "Hello, world!",
"max_length": 1,
"min_length": 1,
"required": 1,
"input_format": "Hello, world!",
"decimal_places": 1,
"max_value": 1,
"min_value": 1,
"max": 1,
"min": 1,
"multiple": 1,
"values": [
{
"checked": "checked",
"label": "Hello, world!",
"value": "Hello, world!"
}
],
"allow_upload": 1,
"can_add": 1,
"increase_decrease_cols": 1,
"increase_decrease_rows": 1,
"initial_cols": 1,
"initial_rows": 1,
"source": 1,
"category_set": 1
},
"type": "Hello, world!",
"uniqueID": "Hello, world!",
"updatable": true
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"blog": {
"type": "object",
"properties": {
"displayName": {
"type": "string",
"description": "The display name of this content field creator. Not writable."
},
"id": {
"type": "number",
"description": "The ID of this content field creator. Not writable."
},
"userpicUrl": {
"type": "string",
"description": "The URL of this content field creator's userpic. The userpic will be made by UserpicThumbnailSize and UserpicAllowRect settings. If user does not set own userpic, will be returned empty string. Not writable."
}
},
"description": "The site of this content field. Not writable."
},
"createdDate": {
"type": "string",
"description": "Created date of this content field. (format is iso 8601 datetime) Not writable."
},
"description": {
"type": "string",
"description": "The description of this content field."
},
"id": {
"type": "number",
"description": "The ID of this content field. Not writable."
},
"label": {
"type": "string",
"description": "The labeel of this content field."
},
"modifiedBy": {
"type": "object",
"properties": {
"displayName": {
"type": "string",
"description": "The display name of this content field modifier. Not writable."
},
"id": {
"type": "number",
"description": "The ID of this content field modifier. Not writable."
},
"userpicUrl": {
"type": "string",
"description": "The URL of this content field modifier's userpic. The userpic will be made by UserpicThumbnailSize and UserpicAllowRect settings. If user does not set own userpic, will be returned empty string. Not writable."
}
},
"description": "Last modified user of this content field. Not writable."
},
"modifiedDate": {
"type": "string",
"description": "Last modified date of this content field. (format is iso 8601 datetime) Not writable."
},
"options": {
"type": "object",
"properties": {
"description": {
"type": "string",
"description": "The descrption of this field."
},
"display": {
"type": "string",
"description": "The display option that for the listing screen of this field ."
},
"initial_value": {
"type": "string",
"description": "Initial value of this field. This means the initial display value rather than the default value at save."
},
"label": {
"type": "string",
"description": "The label of this field."
},
"max_length": {
"type": "number",
"description": "The maximum length of this field value."
},
"min_length": {
"type": "number",
"description": "The minimum length of this field value."
},
"required": {
"type": "number",
"description": "`0`: This field is not required. / `1`: This field is required."
},
"input_format": {
"type": "string",
"description": "The name of input format of this field."
},
"decimal_places": {
"type": "number",
"description": "The length of decimal places."
},
"max_value": {
"type": "number",
"description": "The maximum value of this field."
},
"min_value": {
"type": "number",
"description": "The minimum value of this field."
},
"max": {
"type": "number",
"description": "The maximum number that can be selected for this field."
},
"min": {
"type": "number",
"description": "The minimum number that should be selected for this field."
},
"multiple": {
"type": "number",
"description": "`0`: This field cannot accept multiple selection. / `1`: This field accept multiple selection."
},
"values": {
"type": "array",
"description": "List of label-value pairs."
},
"allow_upload": {
"type": "number"
},
"can_add": {
"type": "number",
"description": "`0`: Users can create a new categories in this field. / `1`: Users cannot create a new categories in this field."
},
"increase_decrease_cols": {
"type": "number",
"description": "`0`: Users can increase/decrease columns. / `1`: Users cannot increase/decrease columns."
},
"increase_decrease_rows": {
"type": "number",
"description": "`0`: Users can increase/decrease rows. / `1`: Users cannot increase/decrease rows."
},
"initial_cols": {
"type": "number",
"description": "The number of initial columns."
},
"initial_rows": {
"type": "number",
"description": "The number of initial rows."
},
"source": {
"type": "number",
"description": "The ID of content type that linked with this field."
},
"category_set": {
"type": "number",
"description": "The ID of category set that linked with this field."
}
},
"description": "The field option object. The members of this object are different depending on the type of field."
},
"type": {
"type": "string",
"description": "The field type. This property can be set only when creating. Available values are follows. `single_line_text`: Single line text field. / `multi_line_text`: Multiple line text field. / `number` Number field. / `url`: URL field. / `date_and_time`: Date and time field. / `date_only`: Date only fiel. / `time_only`: Time only field. / `select_box`: Select box field. / `radio_button`: Radio button field. / `checkboxes`: Checkbox field. / `asset`: Asset (file) type field. / `asset_audio`: Audio asset field. / `asset_video`: Video asset field. / `asset_image`: Image asset field. / `embedded_text`: Embedded text field. / `tags`: Tag field. / `list`: List field. / `tables`: Table field. / `content_type` Content type field. / `categories`: Category set field."
},
"uniqueID": {
"type": "string",
"description": "The unique ID of this content field. Not writable."
},
"updatable": {
"type": "boolean",
"description": "`true`: Current user can update this content field. / `false`: Current user cannot update this content field. Not writable."
}
}
}
403
Do not have permission to create a new content field.
Headers
Content-Type: application/json
404
Site or content type not found
Headers
Content-Type: application/json
Content Field ¶
Fetch single Content FieldGET/sites/{site_id}/contentTypes/{content_type_id}/fields/{content_field_id}
Authentication required
Fetch single content field. This endpoint requires following permission.
- Manage Content Types
Example URI
- site_id
number
(required) Example: 1The site ID
- content_type_id
number
(required) Example: 1The content type ID
- content_field_id
number
(required) Example: 1The content field ID
200
Headers
Content-Type: application/json
Body
{
"blog": {
"id": 1,
"displayName": "Hello, world!",
"userpicUrl": "Hello, world!"
},
"createdDate": "Hello, world!",
"description": "Hello, world!",
"id": 1,
"label": "Hello, world!",
"modifiedBy": {
"displayName": "Hello, world!",
"id": 1,
"userpicUrl": "Hello, world!"
},
"modifiedDate": "Hello, world!",
"options": {
"description": "Hello, world!",
"display": "Hello, world!",
"initial_value": "Hello, world!",
"label": "Hello, world!",
"max_length": 1,
"min_length": 1,
"required": 1,
"input_format": "Hello, world!",
"decimal_places": 1,
"max_value": 1,
"min_value": 1,
"max": 1,
"min": 1,
"multiple": 1,
"values": [
{
"checked": "checked",
"label": "Hello, world!",
"value": "Hello, world!"
}
],
"allow_upload": 1,
"can_add": 1,
"increase_decrease_cols": 1,
"increase_decrease_rows": 1,
"initial_cols": 1,
"initial_rows": 1,
"source": 1,
"category_set": 1
},
"type": "Hello, world!",
"uniqueID": "Hello, world!",
"updatable": true
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"blog": {
"type": "object",
"properties": {
"displayName": {
"type": "string",
"description": "The display name of this content field creator. Not writable."
},
"id": {
"type": "number",
"description": "The ID of this content field creator. Not writable."
},
"userpicUrl": {
"type": "string",
"description": "The URL of this content field creator's userpic. The userpic will be made by UserpicThumbnailSize and UserpicAllowRect settings. If user does not set own userpic, will be returned empty string. Not writable."
}
},
"description": "The site of this content field. Not writable."
},
"createdDate": {
"type": "string",
"description": "Created date of this content field. (format is iso 8601 datetime) Not writable."
},
"description": {
"type": "string",
"description": "The description of this content field."
},
"id": {
"type": "number",
"description": "The ID of this content field. Not writable."
},
"label": {
"type": "string",
"description": "The labeel of this content field."
},
"modifiedBy": {
"type": "object",
"properties": {
"displayName": {
"type": "string",
"description": "The display name of this content field modifier. Not writable."
},
"id": {
"type": "number",
"description": "The ID of this content field modifier. Not writable."
},
"userpicUrl": {
"type": "string",
"description": "The URL of this content field modifier's userpic. The userpic will be made by UserpicThumbnailSize and UserpicAllowRect settings. If user does not set own userpic, will be returned empty string. Not writable."
}
},
"description": "Last modified user of this content field. Not writable."
},
"modifiedDate": {
"type": "string",
"description": "Last modified date of this content field. (format is iso 8601 datetime) Not writable."
},
"options": {
"type": "object",
"properties": {
"description": {
"type": "string",
"description": "The descrption of this field."
},
"display": {
"type": "string",
"description": "The display option that for the listing screen of this field ."
},
"initial_value": {
"type": "string",
"description": "Initial value of this field. This means the initial display value rather than the default value at save."
},
"label": {
"type": "string",
"description": "The label of this field."
},
"max_length": {
"type": "number",
"description": "The maximum length of this field value."
},
"min_length": {
"type": "number",
"description": "The minimum length of this field value."
},
"required": {
"type": "number",
"description": "`0`: This field is not required. / `1`: This field is required."
},
"input_format": {
"type": "string",
"description": "The name of input format of this field."
},
"decimal_places": {
"type": "number",
"description": "The length of decimal places."
},
"max_value": {
"type": "number",
"description": "The maximum value of this field."
},
"min_value": {
"type": "number",
"description": "The minimum value of this field."
},
"max": {
"type": "number",
"description": "The maximum number that can be selected for this field."
},
"min": {
"type": "number",
"description": "The minimum number that should be selected for this field."
},
"multiple": {
"type": "number",
"description": "`0`: This field cannot accept multiple selection. / `1`: This field accept multiple selection."
},
"values": {
"type": "array",
"description": "List of label-value pairs."
},
"allow_upload": {
"type": "number"
},
"can_add": {
"type": "number",
"description": "`0`: Users can create a new categories in this field. / `1`: Users cannot create a new categories in this field."
},
"increase_decrease_cols": {
"type": "number",
"description": "`0`: Users can increase/decrease columns. / `1`: Users cannot increase/decrease columns."
},
"increase_decrease_rows": {
"type": "number",
"description": "`0`: Users can increase/decrease rows. / `1`: Users cannot increase/decrease rows."
},
"initial_cols": {
"type": "number",
"description": "The number of initial columns."
},
"initial_rows": {
"type": "number",
"description": "The number of initial rows."
},
"source": {
"type": "number",
"description": "The ID of content type that linked with this field."
},
"category_set": {
"type": "number",
"description": "The ID of category set that linked with this field."
}
},
"description": "The field option object. The members of this object are different depending on the type of field."
},
"type": {
"type": "string",
"description": "The field type. This property can be set only when creating. Available values are follows. `single_line_text`: Single line text field. / `multi_line_text`: Multiple line text field. / `number` Number field. / `url`: URL field. / `date_and_time`: Date and time field. / `date_only`: Date only fiel. / `time_only`: Time only field. / `select_box`: Select box field. / `radio_button`: Radio button field. / `checkboxes`: Checkbox field. / `asset`: Asset (file) type field. / `asset_audio`: Audio asset field. / `asset_video`: Video asset field. / `asset_image`: Image asset field. / `embedded_text`: Embedded text field. / `tags`: Tag field. / `list`: List field. / `tables`: Table field. / `content_type` Content type field. / `categories`: Category set field."
},
"uniqueID": {
"type": "string",
"description": "The unique ID of this content field. Not writable."
},
"updatable": {
"type": "boolean",
"description": "`true`: Current user can update this content field. / `false`: Current user cannot update this content field. Not writable."
}
}
}
403
Do not have permission to retrieve a content field.
Headers
Content-Type: application/json
404
Site, content field or content field not found.
Headers
Content-Type: application/json
Update Content FieldPUT/sites/{site_id}/contentTypes/{content_type_id}/fields/{content_field_id}
Authentication required
Update content field. This endpoint requires following permission.
- Manage Content Types
If you want to update label, descrption and required, should be use options field. (e.g, {“options”:{“label”:“foo”}})
This method accepts PUT or POST with parameter ‘__method=PUT’.
Example URI
- site_id
number
(required) Example: 1The site ID
- content_type_id
number
(required) Example: 1The content type ID
- content_field_id
number
(required) Example: 1The content field ID
Headers
Content-Type: application/x-www-form-urlencoded
X-MT-Authorization: MTAuth accessToken=<Token>
Body
content_field={"description": "New description"}
200
Headers
Content-Type: application/json
Body
{
"blog": {
"id": 1
},
"contentFields": [
{
"id": 1,
"label": "Hello, world!",
"type": "Hello, world!",
"uniqueID": "Hello, world!"
}
],
"createdBy": {
"displayName": "Hello, world!",
"id": 1,
"userpicUrl": "Hello, world!"
},
"createdDate": "Hello, world!",
"dataLabel": "Hello, world!",
"description": "Hello, world!",
"id": 1,
"modifiedBy": {
"displayName": "Hello, world!",
"id": 1,
"userpicUrl": "Hello, world!"
},
"modifiedDate": "Hello, world!",
"name": "Hello, world!",
"uniqueID": "Hello, world!",
"updatable": true,
"userDisplayOption": true
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"blog": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "The site ID. Not writable."
}
},
"description": "The site of this content type. Not writable."
},
"contentFields": {
"type": "array",
"description": "The list of content fields."
},
"createdBy": {
"type": "object",
"properties": {
"displayName": {
"type": "string",
"description": "The display name of this content type creator. Not writable."
},
"id": {
"type": "number",
"description": "The ID of this content type creator. Not writable."
},
"userpicUrl": {
"type": "string",
"description": "The URL of this content type creator's userpic. The userpic will be made by UserpicThumbnailSize and UserpicAllowRect settings. If user does not set own userpic, will be returned empty string. Not writable."
}
},
"description": "Created user of this content type. Not writable."
},
"createdDate": {
"type": "string",
"description": "Created date of this content type. (format is iso 8601 datetime) Not writable."
},
"dataLabel": {
"type": "string",
"description": "The Unique ID of the content field that is data label. If not set will be NULL."
},
"description": {
"type": "string",
"description": "The description of this content type."
},
"id": {
"type": "number",
"description": "The ID of this content type. Not writable."
},
"modifiedBy": {
"type": "object",
"properties": {
"displayName": {
"type": "string",
"description": "The display name of this content type modifier. Not writable."
},
"id": {
"type": "number",
"description": "The ID of this content type modifier. Not writable."
},
"userpicUrl": {
"type": "string",
"description": "The URL of this content type modifier's userpic. The userpic will be made by UserpicThumbnailSize and UserpicAllowRect settings. If user does not set own userpic, will be returned empty string. Not writable."
}
},
"description": "Last modified user of this content type. Not writable."
},
"modifiedDate": {
"type": "string",
"description": "Last modified date of this content type. (format is iso 8601 datetime) Not writable."
},
"name": {
"type": "string",
"description": "The name of this content type."
},
"uniqueID": {
"type": "string",
"description": "The unique ID of this content type. Not writable."
},
"updatable": {
"type": "boolean",
"description": "`true`: Current user can update this content type. / `false`: Current user cannot update this content type. Not writable."
},
"userDisplayOption": {
"type": "boolean",
"description": "`true`: Signed-in user can change display options for edit content data screen of this content type in the CMS admin screen. / `false`: Signed-in user cannot change display options for edit content data screen of this content type in the CMS admin screen."
}
}
}
403
Do not have permission to update a content field.
Headers
Content-Type: application/json
404
Site, content type or content field not found
Headers
Content-Type: application/json
Delete Content FieldDELETE/sites/{site_id}/contentTypes/{content_type_id}/fields/{content_field_id}
Authentication required
Delete content field from specified content type. This endpoint requires following permission.
- Manage Content Types
This method accepts DELETE or POST with parameter ‘__method=DELETE’.
Example URI
- site_id
number
(required) Example: 1The site ID
- content_type_id
number
(required) Example: 1The content type ID
- content_field_id
number
(required) Example: 1The content field ID
200
Headers
Content-Type: application/json
Body
{
"blog": {
"id": 1,
"displayName": "Hello, world!",
"userpicUrl": "Hello, world!"
},
"createdDate": "Hello, world!",
"description": "Hello, world!",
"id": 1,
"label": "Hello, world!",
"modifiedBy": {
"displayName": "Hello, world!",
"id": 1,
"userpicUrl": "Hello, world!"
},
"modifiedDate": "Hello, world!",
"options": {
"description": "Hello, world!",
"display": "Hello, world!",
"initial_value": "Hello, world!",
"label": "Hello, world!",
"max_length": 1,
"min_length": 1,
"required": 1,
"input_format": "Hello, world!",
"decimal_places": 1,
"max_value": 1,
"min_value": 1,
"max": 1,
"min": 1,
"multiple": 1,
"values": [
{
"checked": "checked",
"label": "Hello, world!",
"value": "Hello, world!"
}
],
"allow_upload": 1,
"can_add": 1,
"increase_decrease_cols": 1,
"increase_decrease_rows": 1,
"initial_cols": 1,
"initial_rows": 1,
"source": 1,
"category_set": 1
},
"type": "Hello, world!",
"uniqueID": "Hello, world!",
"updatable": true
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"blog": {
"type": "object",
"properties": {
"displayName": {
"type": "string",
"description": "The display name of this content field creator. Not writable."
},
"id": {
"type": "number",
"description": "The ID of this content field creator. Not writable."
},
"userpicUrl": {
"type": "string",
"description": "The URL of this content field creator's userpic. The userpic will be made by UserpicThumbnailSize and UserpicAllowRect settings. If user does not set own userpic, will be returned empty string. Not writable."
}
},
"description": "The site of this content field. Not writable."
},
"createdDate": {
"type": "string",
"description": "Created date of this content field. (format is iso 8601 datetime) Not writable."
},
"description": {
"type": "string",
"description": "The description of this content field."
},
"id": {
"type": "number",
"description": "The ID of this content field. Not writable."
},
"label": {
"type": "string",
"description": "The labeel of this content field."
},
"modifiedBy": {
"type": "object",
"properties": {
"displayName": {
"type": "string",
"description": "The display name of this content field modifier. Not writable."
},
"id": {
"type": "number",
"description": "The ID of this content field modifier. Not writable."
},
"userpicUrl": {
"type": "string",
"description": "The URL of this content field modifier's userpic. The userpic will be made by UserpicThumbnailSize and UserpicAllowRect settings. If user does not set own userpic, will be returned empty string. Not writable."
}
},
"description": "Last modified user of this content field. Not writable."
},
"modifiedDate": {
"type": "string",
"description": "Last modified date of this content field. (format is iso 8601 datetime) Not writable."
},
"options": {
"type": "object",
"properties": {
"description": {
"type": "string",
"description": "The descrption of this field."
},
"display": {
"type": "string",
"description": "The display option that for the listing screen of this field ."
},
"initial_value": {
"type": "string",
"description": "Initial value of this field. This means the initial display value rather than the default value at save."
},
"label": {
"type": "string",
"description": "The label of this field."
},
"max_length": {
"type": "number",
"description": "The maximum length of this field value."
},
"min_length": {
"type": "number",
"description": "The minimum length of this field value."
},
"required": {
"type": "number",
"description": "`0`: This field is not required. / `1`: This field is required."
},
"input_format": {
"type": "string",
"description": "The name of input format of this field."
},
"decimal_places": {
"type": "number",
"description": "The length of decimal places."
},
"max_value": {
"type": "number",
"description": "The maximum value of this field."
},
"min_value": {
"type": "number",
"description": "The minimum value of this field."
},
"max": {
"type": "number",
"description": "The maximum number that can be selected for this field."
},
"min": {
"type": "number",
"description": "The minimum number that should be selected for this field."
},
"multiple": {
"type": "number",
"description": "`0`: This field cannot accept multiple selection. / `1`: This field accept multiple selection."
},
"values": {
"type": "array",
"description": "List of label-value pairs."
},
"allow_upload": {
"type": "number"
},
"can_add": {
"type": "number",
"description": "`0`: Users can create a new categories in this field. / `1`: Users cannot create a new categories in this field."
},
"increase_decrease_cols": {
"type": "number",
"description": "`0`: Users can increase/decrease columns. / `1`: Users cannot increase/decrease columns."
},
"increase_decrease_rows": {
"type": "number",
"description": "`0`: Users can increase/decrease rows. / `1`: Users cannot increase/decrease rows."
},
"initial_cols": {
"type": "number",
"description": "The number of initial columns."
},
"initial_rows": {
"type": "number",
"description": "The number of initial rows."
},
"source": {
"type": "number",
"description": "The ID of content type that linked with this field."
},
"category_set": {
"type": "number",
"description": "The ID of category set that linked with this field."
}
},
"description": "The field option object. The members of this object are different depending on the type of field."
},
"type": {
"type": "string",
"description": "The field type. This property can be set only when creating. Available values are follows. `single_line_text`: Single line text field. / `multi_line_text`: Multiple line text field. / `number` Number field. / `url`: URL field. / `date_and_time`: Date and time field. / `date_only`: Date only fiel. / `time_only`: Time only field. / `select_box`: Select box field. / `radio_button`: Radio button field. / `checkboxes`: Checkbox field. / `asset`: Asset (file) type field. / `asset_audio`: Audio asset field. / `asset_video`: Video asset field. / `asset_image`: Image asset field. / `embedded_text`: Embedded text field. / `tags`: Tag field. / `list`: List field. / `tables`: Table field. / `content_type` Content type field. / `categories`: Category set field."
},
"uniqueID": {
"type": "string",
"description": "The unique ID of this content field. Not writable."
},
"updatable": {
"type": "boolean",
"description": "`true`: Current user can update this content field. / `false`: Current user cannot update this content field. Not writable."
}
}
}
403
Do not have permission to delete a content field.
Headers
Content-Type: application/json
404
Site, content type or content field not found.
Headers
Content-Type: application/json
Save hierarchical content field order ¶
Save hierarchical content field orderPOST/sites/{site_id}/content_types{content_type_id}/fields/permutate
Authentication required.
Rearranges content field order in specified content type. This endpoint need folllowing permissions.
- Manage Content Types
This method returns rearranged ContentField collection.
Post form data is following:
- content_fields (array[ContentField]) - Array of content fields resource that were rearranged.
Example URI
- site_id
number
(required) Example: 1The site ID
- content_type_id
number
(required) Example: 1The content type ID
Headers
Content-Type: application/x-www-form-urlencoded
X-MT-Authorization: MTAuth accessToken=<Token>
Body
content_fields=[{"id":"1"}, {"id":"2"}, {"id":"4"}, {"id":"3"},]
200
Headers
Content-Type: application/json
Body
[
{
"blog": {
"id": 1,
"displayName": "Hello, world!",
"userpicUrl": "Hello, world!"
},
"createdDate": "Hello, world!",
"description": "Hello, world!",
"id": 1,
"label": "Hello, world!",
"modifiedBy": {
"displayName": "Hello, world!",
"id": 1,
"userpicUrl": "Hello, world!"
},
"modifiedDate": "Hello, world!",
"options": {
"description": "Hello, world!",
"display": "Hello, world!",
"initial_value": "Hello, world!",
"label": "Hello, world!",
"max_length": 1,
"min_length": 1,
"required": 1,
"input_format": "Hello, world!",
"decimal_places": 1,
"max_value": 1,
"min_value": 1,
"max": 1,
"min": 1,
"multiple": 1,
"values": [
{
"checked": "checked",
"label": "Hello, world!",
"value": "Hello, world!"
}
],
"allow_upload": 1,
"can_add": 1,
"increase_decrease_cols": 1,
"increase_decrease_rows": 1,
"initial_cols": 1,
"initial_rows": 1,
"source": 1,
"category_set": 1
},
"type": "Hello, world!",
"uniqueID": "Hello, world!",
"updatable": true
}
]
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "array",
"items": {
"type": "object",
"properties": {
"blog": {
"type": "object",
"properties": {
"displayName": {
"type": "string",
"description": "The display name of this content field creator. Not writable."
},
"id": {
"type": "number",
"description": "The ID of this content field creator. Not writable."
},
"userpicUrl": {
"type": "string",
"description": "The URL of this content field creator's userpic. The userpic will be made by UserpicThumbnailSize and UserpicAllowRect settings. If user does not set own userpic, will be returned empty string. Not writable."
}
},
"description": "The site of this content field. Not writable."
},
"createdDate": {
"type": "string",
"description": "Created date of this content field. (format is iso 8601 datetime) Not writable."
},
"description": {
"type": "string",
"description": "The description of this content field."
},
"id": {
"type": "number",
"description": "The ID of this content field. Not writable."
},
"label": {
"type": "string",
"description": "The labeel of this content field."
},
"modifiedBy": {
"type": "object",
"properties": {
"displayName": {
"type": "string",
"description": "The display name of this content field modifier. Not writable."
},
"id": {
"type": "number",
"description": "The ID of this content field modifier. Not writable."
},
"userpicUrl": {
"type": "string",
"description": "The URL of this content field modifier's userpic. The userpic will be made by UserpicThumbnailSize and UserpicAllowRect settings. If user does not set own userpic, will be returned empty string. Not writable."
}
},
"description": "Last modified user of this content field. Not writable."
},
"modifiedDate": {
"type": "string",
"description": "Last modified date of this content field. (format is iso 8601 datetime) Not writable."
},
"options": {
"type": "object",
"properties": {
"description": {
"type": "string",
"description": "The descrption of this field."
},
"display": {
"type": "string",
"description": "The display option that for the listing screen of this field ."
},
"initial_value": {
"type": "string",
"description": "Initial value of this field. This means the initial display value rather than the default value at save."
},
"label": {
"type": "string",
"description": "The label of this field."
},
"max_length": {
"type": "number",
"description": "The maximum length of this field value."
},
"min_length": {
"type": "number",
"description": "The minimum length of this field value."
},
"required": {
"type": "number",
"description": "`0`: This field is not required. / `1`: This field is required."
},
"input_format": {
"type": "string",
"description": "The name of input format of this field."
},
"decimal_places": {
"type": "number",
"description": "The length of decimal places."
},
"max_value": {
"type": "number",
"description": "The maximum value of this field."
},
"min_value": {
"type": "number",
"description": "The minimum value of this field."
},
"max": {
"type": "number",
"description": "The maximum number that can be selected for this field."
},
"min": {
"type": "number",
"description": "The minimum number that should be selected for this field."
},
"multiple": {
"type": "number",
"description": "`0`: This field cannot accept multiple selection. / `1`: This field accept multiple selection."
},
"values": {
"type": "array",
"description": "List of label-value pairs."
},
"allow_upload": {
"type": "number"
},
"can_add": {
"type": "number",
"description": "`0`: Users can create a new categories in this field. / `1`: Users cannot create a new categories in this field."
},
"increase_decrease_cols": {
"type": "number",
"description": "`0`: Users can increase/decrease columns. / `1`: Users cannot increase/decrease columns."
},
"increase_decrease_rows": {
"type": "number",
"description": "`0`: Users can increase/decrease rows. / `1`: Users cannot increase/decrease rows."
},
"initial_cols": {
"type": "number",
"description": "The number of initial columns."
},
"initial_rows": {
"type": "number",
"description": "The number of initial rows."
},
"source": {
"type": "number",
"description": "The ID of content type that linked with this field."
},
"category_set": {
"type": "number",
"description": "The ID of category set that linked with this field."
}
},
"description": "The field option object. The members of this object are different depending on the type of field."
},
"type": {
"type": "string",
"description": "The field type. This property can be set only when creating. Available values are follows. `single_line_text`: Single line text field. / `multi_line_text`: Multiple line text field. / `number` Number field. / `url`: URL field. / `date_and_time`: Date and time field. / `date_only`: Date only fiel. / `time_only`: Time only field. / `select_box`: Select box field. / `radio_button`: Radio button field. / `checkboxes`: Checkbox field. / `asset`: Asset (file) type field. / `asset_audio`: Audio asset field. / `asset_video`: Video asset field. / `asset_image`: Image asset field. / `embedded_text`: Embedded text field. / `tags`: Tag field. / `list`: List field. / `tables`: Table field. / `content_type` Content type field. / `categories`: Category set field."
},
"uniqueID": {
"type": "string",
"description": "The unique ID of this content field. Not writable."
},
"updatable": {
"type": "boolean",
"description": "`true`: Current user can update this content field. / `false`: Current user cannot update this content field. Not writable."
}
}
}
}
Content Data ¶
Content Data Collection ¶
Content Data CollectionGET/sites/{site_id}/contentTypes/{content_type_id}/data{?limit,offset,sortBy,sortOrder,fields,includeIds,excludeIds}
Retrieve list of content data of specified content type in the specified site.
Authentication required if you want to retrieve unpublished content data. Required pemission is follows.
-
Manage Content Data (site, sistem, each content type)
-
Publish Content Data (each content type)
-
Edit All Content Data (each content type)
Example URI
- site_id
number
(required) Example: 1The site ID.
- content_type_id
number
(required) Example: 1The content type ID.
- limit
number
(optional) Example: 10Maximum number of content data to retrieve.
- offset
number
(optional) Example: 00-indexed offset.
- sortBy
string
(optional) Example: idThe field name for sort. You can specify one of following values.
-
id
-
uniqueID
-
authored_on
-
created_on
-
modified_on
-
- sortOrder
string
(optional) Example: descend-
descend (default): Return content data in descending order.
-
ascend: Return content data in ascending order.
-
- fields
string
(optional)The field list to retrieve as part of the content data resource. That list should be separated by comma. If this parameter is not specified, All fields will be returned.
- includeIds
string
(optional)The comma separated ID list of entries to include to result.
- excludeIds
string
(optional)The comma separated ID list of entries to exclude from result.
200
Headers
Content-Type: application/json
Body
{
"totalResults": 1,
"items": [
{
"author": {
"displayName": "Hello, world!",
"id": 1,
"userpicUrl": "Hello, world!"
},
"basename": "Hello, world!",
"blog": {
"id": 1
},
"createdDate": "Hello, world!",
"data": [
{
"data": "Hello, world!",
"id": 1,
"label": "Hello, world!",
"type": "Hello, world!"
}
],
"date": "Hello, world!",
"id": 1,
"label": "Hello, world!",
"modifiedBy": {
"displayName": "Hello, world!",
"id": 1,
"userpicUrl": "Hello, world!"
},
"modifiedDate": "Hello, world!",
"status": "Hello, world!",
"unpublishedDate": "Hello, world!",
"updatable": true
}
]
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"totalResults": {
"type": "number",
"description": "Total record count of this request."
},
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"author": {
"type": "object",
"properties": {
"displayName": {
"type": "string",
"description": "The display name of this content data creator. Not writable"
},
"id": {
"type": "number",
"description": "The ID of this content data creator. Not writable"
},
"userpicUrl": {
"type": "string",
"description": "The URL of this content data creator's userpic. The userpic will be made by UserpicThumbnailSize and UserpicAllowRect settings. If user does not set own userpic, will be returned empty string. Not writable"
}
}
},
"basename": {
"type": "string",
"description": "The identifier for this content data."
},
"blog": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "The ID of the site that contains this cotent data. Not writable"
}
}
},
"createdDate": {
"type": "string",
"description": "Created date of this content data. (format is iso 8601 datetime) Not writable."
},
"data": {
"type": "array",
"description": "List of data of this content data."
},
"date": {
"type": "string",
"description": "The published time for this content data. (format is iso 8601 datetime)"
},
"id": {
"type": "number",
"description": "The ID of this content data. Not writable."
},
"label": {
"type": "string",
"description": "The label value of this data."
},
"modifiedBy": {
"type": "object",
"properties": {
"displayName": {
"type": "string",
"description": "The display name of this content data modifier. Not writable."
},
"id": {
"type": "number",
"description": "The ID of this content data modifier. Not writable."
},
"userpicUrl": {
"type": "string",
"description": "The URL of this content data modifier's userpic. The userpic will be made by UserpicThumbnailSize and UserpicAllowRect settings. If user does not set own userpic, will be returned empty string. Not writable."
}
},
"description": "Last modified user of this content data. Not writable."
},
"modifiedDate": {
"type": "string",
"description": "Last modified date of this content data. (format is iso 8601 datetime) Not writable."
},
"status": {
"type": "string",
"description": "Draft: This content data is saved as draft. cd_status is 1. Publish: This content data is published. cd_status is 2. Review: This content data is waiting for approval. cd_status is 3. Future: This content data is scheduled for future publishing. cd_status is 4. Spam: This content data is marked as Spam. cd_status is 5."
},
"unpublishedDate": {
"type": "string",
"description": "The unpublished time for this content data. (format is iso 8601 datetime)"
},
"updatable": {
"type": "boolean",
"description": "true: The user who accessed can update this contnt data. false: The user who accessed cannot update this content data."
}
}
},
"description": "The array of result content."
}
}
}
403
Do not have permission to retrieve content data.
Headers
Content-Type: application/json
404
Site or content type not found.
Headers
Content-Type: application/json
Create Content DataPOST/sites/{site_id}/contentTypes/{content_type_id}/data
Authentication Required Create a new content data. This endpoint requires following permissions.
-
Manage Content Data (site, sistem, each content type)
-
Create Content Data (each content type)
Post form data is following
- content_data (ContentData) - Single ContentData resource
Known issues (these will be solved in future release)
-
If content type contains non required Content Type field, request will failed when post data does not contains its data.
-
If content type contains non required Date and Time field, request will failed when post data does not contains its data.
-
Date and Time field must be specified by YYYYMMDDHHmmSS format.
Example URI
- site_id
number
(required) Example: 1The site ID.
- content_type_id
number
(required) Example: 1The content type ID.
Headers
Content-Type: application/x-www-form-urlencoded
X-MT-Authorization: MTAuth accessToken=<Token>
Body
content_data={"label":"From API",
Comments ¶
Comments Collection ¶
/sites/{site_id}/comments{?search,searchFields,limit,offset,sortBy,sortOrder,fields,includeIds,excludeIds,status,entryStatus,dateField,dateFrom,dateTo}
Authorization is required if you want to retrieve unpublished comments.
Example URI
number
(required)The site ID.
string
(optional)Search query.
string
(optional) Example: bodyThe comma separated field name list to search.
number
(optional) Example: 10Maximum number of comments to retrieve.
number
(optional) Example: 00-indexed offset.
string
(optional) Example: idThe field name for sort.
string
(optional) Example: descenddescend (default): Return comments in descending order.
ascend: Return comments in ascending order.
string
(optional)The field list to retrieve as part of the Comments resource. That list should be separated by comma. If this parameter is not specified, All fields will be returned.
string
(optional)The comma separated ID list of comments to include to result.
string
(optional)The comma separated ID list of comments to exclude from result.
string
(optional)Filter by status.
Approved: comment_visible is 1 and comment_junk_status is 1.
Pending: comment_visible is 0 and comment_junk_status is 1.
Spam: comment_junk_status is -1.
string
(optional)Filter by container entry’s status.
Publish: entry_status is 2.
Review: entry_status is 3.
Future: entry_status is 4.
Spam: entry_status is 5.
string
(optional) Example: created_onSpecifies the field name to be used as a date field for filtering. (new in v3)
string
(optional)The start date to filtering. Specify in “YYYY-MM-DD” format. (new in v3)
string
(optional)The end date to filtering. Specify in “YYYY-MM-DD” format. (new in v3)
200
Headers
Content-Type: application/json
Body
{ "totalResults": 1, "items": [ { "author": "Hello, world!", "blog": { "id": 1 }, "body": "Hello, world!", "createdBy": { "id": 1, "displayName": "Hello, world!", "userpicUrl": "Hello, world!" }, "createdDate": "Hello, world!", "customFields": [ { "basename": "Hello, world!", "value": "Hello, world!" } ], "date": "Hello, world!", "entry": { "id": 1 }, "id": 1, "link": "Hello, world!", "modifiedBy": { "displayName": "Hello, world!", "id": 1, "userpicUrl": "Hello, world!" }, "modifiedDate": "Hello, world!", "parent": 1, "status": "Hello, world!", "updatable": true } ] }
Schema
{ "$schema": "http://json-schema.org/draft-04/schema#", "type": "object", "properties": { "totalResults": { "type": "number", "description": "Total record count of this request." }, "items": { "type": "array", "items": { "type": "object", "properties": { "author": { "type": "string", "description": "+id (number) - The ID of this commenter. If commenter is not a registerd user, this field is empty.\n\n+ displayName (string) - The display name of this commenter.\n\n+ userpicUrl (string) - The URL of this commenter's userpic. The userpic will be made by UserpicThumbnailSize and UserpicAllowRect settings. If a commenter is not a registered user or a commenter does not set own userpic, will be returned empty string." }, "blog": { "type": "object", "properties": { "id": { "type": "number", "description": "The ID of the site that contains this comment." } } }, "body": { "type": "string", "description": "The contents of this comment." }, "createdBy": { "type": "object", "properties": { "id": { "type": "number", "description": "The ID of created user." }, "displayName": { "type": "string", "description": "The display name of created user." }, "userpicUrl": { "type": "string", "description": "The URL of created user's userpic. The userpic will be made by UserpicThumbnailSize and UserpicAllowRect settings. If user does not set own userpic, will be returned empty string." } } }, "createdDate": { "type": "string", "description": "The created time for this comment. (format is iso 8601 datetime)" }, "customFields": { "type": "array" }, "date": { "type": "string", "description": "The creation time for this comment. This property is marked as deprecated in v2.0. (format is iso 8601 datetime)" }, "entry": { "type": "object", "properties": { "id": { "type": "number", "description": "The ID of the entry that contains this comment." } } }, "id": { "type": "number", "description": "The ID of this comment." }, "link": { "type": "string", "description": "The permalink for this comment." }, "modifiedBy": { "type": "object", "properties": { "displayName": { "type": "string", "description": "The display name of last modified user." }, "id": { "type": "number", "description": "The ID of last modified user." }, "userpicUrl": { "type": "string", "description": "The URL of last modified user's userpic. The userpic will be made by UserpicThumbnailSize and UserpicAllowRect settings. If user does not set own userpic, will be returned empty string." } } }, "modifiedDate": { "type": "string", "description": "The last modified time for this comment. (format is iso 8601 datetime)" }, "parent": { "type": "number", "description": "The ID of the parent of this comment. If this comment is not a reply, will be returned as null." }, "status": { "type": "string", "description": "The publishing status of this comment. Approved: This comment has been approved. In the database, comment_visible = 1 and comment_junk_status = 1. Pending: This comment has not been approved. In the database, comment_visible = 0 and comment_junk_status = 1. Spam: This comment has been marked as Spam. In the database, comment_visible = 0 and comment_junk_status = -1." }, "updatable": { "type": "boolean", "description": "true: The user who accessed can update this comment. false: The user who accessed cannot update this comment." } } }, "description": "The array of result content." } } }
403
Do not have permission to retrieve the list of comments.
Headers
Content-Type: application/json
404
Site not found.
Headers
Content-Type: application/json
Comments Collection by entry ¶
/sites/{site_id}/entries/{entry_id}/comments
Authentication required.
Create a new commet for an entry. This endpoint need following permissions. (Perhapse, MT user almost have comment permission.)
Post form data is following
Example URI
number
(required)The site ID.
number
(required)The entry ID.
Headers
Content-Type: application/x-www-form-urlencoded
Body
comment={"body" : "This is a test comment.\nHe he he"}
200
Headers
Content-Type: application/json
Body
{ "author": "Hello, world!", "blog": { "id": 1 }, "body": "Hello, world!", "createdBy": { "id": 1, "displayName": "Hello, world!", "userpicUrl": "Hello, world!" }, "createdDate": "Hello, world!", "customFields": [ { "basename": "Hello, world!", "value": "Hello, world!" } ], "date": "Hello, world!", "entry": { "id": 1 }, "id": 1, "link": "Hello, world!", "modifiedBy": { "displayName": "Hello, world!", "id": 1, "userpicUrl": "Hello, world!" }, "modifiedDate": "Hello, world!", "parent": 1, "status": "Hello, world!", "updatable": true }
Schema
{ "$schema": "http://json-schema.org/draft-04/schema#", "type": "object", "properties": { "author": { "type": "string", "description": "+id (number) - The ID of this commenter. If commenter is not a registerd user, this field is empty.\n\n+ displayName (string) - The display name of this commenter.\n\n+ userpicUrl (string) - The URL of this commenter's userpic. The userpic will be made by UserpicThumbnailSize and UserpicAllowRect settings. If a commenter is not a registered user or a commenter does not set own userpic, will be returned empty string." }, "blog": { "type": "object", "properties": { "id": { "type": "number", "description": "The ID of the site that contains this comment." } } }, "body": { "type": "string", "description": "The contents of this comment." }, "createdBy": { "type": "object", "properties": { "id": { "type": "number", "description": "The ID of created user." }, "displayName": { "type": "string", "description": "The display name of created user." }, "userpicUrl": { "type": "string", "description": "The URL of created user's userpic. The userpic will be made by UserpicThumbnailSize and UserpicAllowRect settings. If user does not set own userpic, will be returned empty string." } } }, "createdDate": { "type": "string", "description": "The created time for this comment. (format is iso 8601 datetime)" }, "customFields": { "type": "array" }, "date": { "type": "string", "description": "The creation time for this comment. This property is marked as deprecated in v2.0. (format is iso 8601 datetime)" }, "entry": { "type": "object", "properties": { "id": { "type": "number", "description": "The ID of the entry that contains this comment." } } }, "id": { "type": "number", "description": "The ID of this comment." }, "link": { "type": "string", "description": "The permalink for this comment." }, "modifiedBy": { "type": "object", "properties": { "displayName": { "type": "string", "description": "The display name of last modified user." }, "id": { "type": "number", "description": "The ID of last modified user." }, "userpicUrl": { "type": "string", "description": "The URL of last modified user's userpic. The userpic will be made by UserpicThumbnailSize and UserpicAllowRect settings. If user does not set own userpic, will be returned empty string." } } }, "modifiedDate": { "type": "string", "description": "The last modified time for this comment. (format is iso 8601 datetime)" }, "parent": { "type": "number", "description": "The ID of the parent of this comment. If this comment is not a reply, will be returned as null." }, "status": { "type": "string", "description": "The publishing status of this comment. Approved: This comment has been approved. In the database, comment_visible = 1 and comment_junk_status = 1. Pending: This comment has not been approved. In the database, comment_visible = 0 and comment_junk_status = 1. Spam: This comment has been marked as Spam. In the database, comment_visible = 0 and comment_junk_status = -1." }, "updatable": { "type": "boolean", "description": "true: The user who accessed can update this comment. false: The user who accessed cannot update this comment." } } }
403
Do not have permission to create a new comment.
Headers
Content-Type: application/json
404
Site or entry not found.
Headers
Content-Type: application/json
/sites/{site_id}/entries/{entry_id}/comments{?search,searchFields,limit,offset,sortBy,sortOrder,fields,includeIds,excludeIds,status,dateField,dateFrom,dateTo}
Authorization is required if you want to retrieve unpublished comments.
Example URI
number
(required)The site ID.
number
(required)The entry ID.
string
(optional)Search query.
string
(optional) Example: bodyThe comma separated field name list to search.
number
(optional) Example: 10Maximum number of comments to retrieve.
number
(optional) Example: 00-indexed offset.
string
(optional) Example: idThe field name for sort.
string
(optional) Example: descenddescend (default): Return comments in descending order.
ascend: Return comments in ascending order.
string
(optional)The field list to retrieve as part of the Comments resource. That list should be separated by comma. If this parameter is not specified, All fields will be returned.
string
(optional)The comma separated ID list of comments to include to result.
string
(optional)The comma separated ID list of comments to exclude from result.
string
(optional)Filter by status.
Approved: comment_visible is 1 and comment_junk_status is 1.
Pending: comment_visible is 0 and comment_junk_status is 1.
Spam: comment_junk_status is -1.
string
(optional) Example: created_onSpecifies the field name to be used as a date field for filtering. (new in v3)
string
(optional)The start date to filtering. Specify in “YYYY-MM-DD” format. (new in v3)
string
(optional)The end date to filtering. Specify in “YYYY-MM-DD” format. (new in v3)
200
Headers
Content-Type: application/json
Body
{ "totalResults": 1, "items": [ { "author": "Hello, world!", "blog": { "id": 1 }, "body": "Hello, world!", "createdBy": { "id": 1, "displayName": "Hello, world!", "userpicUrl": "Hello, world!" }, "createdDate": "Hello, world!", "customFields": [ { "basename": "Hello, world!", "value": "Hello, world!" } ], "date": "Hello, world!", "entry": { "id": 1 }, "id": 1, "link": "Hello, world!", "modifiedBy": { "displayName": "Hello, world!", "id": 1, "userpicUrl": "Hello, world!" }, "modifiedDate": "Hello, world!", "parent": 1, "status": "Hello, world!", "updatable": true } ] }
Schema
{ "$schema": "http://json-schema.org/draft-04/schema#", "type": "object", "properties": { "totalResults": { "type": "number", "description": "Total record count of this request." }, "items": { "type": "array", "items": { "type": "object", "properties": { "author": { "type": "string", "description": "+id (number) - The ID of this commenter. If commenter is not a registerd user, this field is empty.\n\n+ displayName (string) - The display name of this commenter.\n\n+ userpicUrl (string) - The URL of this commenter's userpic. The userpic will be made by UserpicThumbnailSize and UserpicAllowRect settings. If a commenter is not a registered user or a commenter does not set own userpic, will be returned empty string." }, "blog": { "type": "object", "properties": { "id": { "type": "number", "description": "The ID of the site that contains this comment." } } }, "body": { "type": "string", "description": "The contents of this comment." }, "createdBy": { "type": "object", "properties": { "id": { "type": "number", "description": "The ID of created user." }, "displayName": { "type": "string", "description": "The display name of created user." }, "userpicUrl": { "type": "string", "description": "The URL of created user's userpic. The userpic will be made by UserpicThumbnailSize and UserpicAllowRect settings. If user does not set own userpic, will be returned empty string." } } }, "createdDate": { "type": "string", "description": "The created time for this comment. (format is iso 8601 datetime)" }, "customFields": { "type": "array" }, "date": { "type": "string", "description": "The creation time for this comment. This property is marked as deprecated in v2.0. (format is iso 8601 datetime)" }, "entry": { "type": "object", "properties": { "id": { "type": "number", "description": "The ID of the entry that contains this comment." } } }, "id": { "type": "number", "description": "The ID of this comment." }, "link": { "type": "string", "description": "The permalink for this comment." }, "modifiedBy": { "type": "object", "properties": { "displayName": { "type": "string", "description": "The display name of last modified user." }, "id": { "type": "number", "description": "The ID of last modified user." }, "userpicUrl": { "type": "string", "description": "The URL of last modified user's userpic. The userpic will be made by UserpicThumbnailSize and UserpicAllowRect settings. If user does not set own userpic, will be returned empty string." } } }, "modifiedDate": { "type": "string", "description": "The last modified time for this comment. (format is iso 8601 datetime)" }, "parent": { "type": "number", "description": "The ID of the parent of this comment. If this comment is not a reply, will be returned as null." }, "status": { "type": "string", "description": "The publishing status of this comment. Approved: This comment has been approved. In the database, comment_visible = 1 and comment_junk_status = 1. Pending: This comment has not been approved. In the database, comment_visible = 0 and comment_junk_status = 1. Spam: This comment has been marked as Spam. In the database, comment_visible = 0 and comment_junk_status = -1." }, "updatable": { "type": "boolean", "description": "true: The user who accessed can update this comment. false: The user who accessed cannot update this comment." } } }, "description": "The array of result content." } } }
403
Do not have permission to retrieve the list of comments.
Headers
Content-Type: application/json
404
Site or entry not found.
Headers
Content-Type: application/json
Comments Collection by page ¶
/sites/{site_id}/pages/{page_id}/comments
Authentication required.
Create a new commet for an page. This endpoint need following permissions. (Perhapse, MT user almost have comment permission.)
Post form data is following
Example URI
number
(required)The site ID.
number
(required)The page ID.
Headers
Content-Type: application/x-www-form-urlencoded
Body
comment={"body" : "This is a test comment.\nHe he he"}
200
Headers
Content-Type: application/json
Body
{ "author": "Hello, world!", "blog": { "id": 1 }, "body": "Hello, world!", "createdBy": { "id": 1, "displayName": "Hello, world!", "userpicUrl": "Hello, world!" }, "createdDate": "Hello, world!", "customFields": [ { "basename": "Hello, world!", "value": "Hello, world!" } ], "date": "Hello, world!", "entry": { "id": 1 }, "id": 1, "link": "Hello, world!", "modifiedBy": { "displayName": "Hello, world!", "id": 1, "userpicUrl": "Hello, world!" }, "modifiedDate": "Hello, world!", "parent": 1, "status": "Hello, world!", "updatable": true }
Schema
{ "$schema": "http://json-schema.org/draft-04/schema#", "type": "object", "properties": { "author": { "type": "string", "description": "+id (number) - The ID of this commenter. If commenter is not a registerd user, this field is empty.\n\n+ displayName (string) - The display name of this commenter.\n\n+ userpicUrl (string) - The URL of this commenter's userpic. The userpic will be made by UserpicThumbnailSize and UserpicAllowRect settings. If a commenter is not a registered user or a commenter does not set own userpic, will be returned empty string." }, "blog": { "type": "object", "properties": { "id": { "type": "number", "description": "The ID of the site that contains this comment." } } }, "body": { "type": "string", "description": "The contents of this comment." }, "createdBy": { "type": "object", "properties": { "id": { "type": "number", "description": "The ID of created user." }, "displayName": { "type": "string", "description": "The display name of created user." }, "userpicUrl": { "type": "string", "description": "The URL of created user's userpic. The userpic will be made by UserpicThumbnailSize and UserpicAllowRect settings. If user does not set own userpic, will be returned empty string." } } }, "createdDate": { "type": "string", "description": "The created time for this comment. (format is iso 8601 datetime)" }, "customFields": { "type": "array" }, "date": { "type": "string", "description": "The creation time for this comment. This property is marked as deprecated in v2.0. (format is iso 8601 datetime)" }, "entry": { "type": "object", "properties": { "id": { "type": "number", "description": "The ID of the entry that contains this comment." } } }, "id": { "type": "number", "description": "The ID of this comment." }, "link": { "type": "string", "description": "The permalink for this comment." }, "modifiedBy": { "type": "object", "properties": { "displayName": { "type": "string", "description": "The display name of last modified user." }, "id": { "type": "number", "description": "The ID of last modified user." }, "userpicUrl": { "type": "string", "description": "The URL of last modified user's userpic. The userpic will be made by UserpicThumbnailSize and UserpicAllowRect settings. If user does not set own userpic, will be returned empty string." } } }, "modifiedDate": { "type": "string", "description": "The last modified time for this comment. (format is iso 8601 datetime)" }, "parent": { "type": "number", "description": "The ID of the parent of this comment. If this comment is not a reply, will be returned as null." }, "status": { "type": "string", "description": "The publishing status of this comment. Approved: This comment has been approved. In the database, comment_visible = 1 and comment_junk_status = 1. Pending: This comment has not been approved. In the database, comment_visible = 0 and comment_junk_status = 1. Spam: This comment has been marked as Spam. In the database, comment_visible = 0 and comment_junk_status = -1." }, "updatable": { "type": "boolean", "description": "true: The user who accessed can update this comment. false: The user who accessed cannot update this comment." } } }
403
Do not have permission to create a new comment.
Headers
Content-Type: application/json
404
Site or page not found.
Headers
Content-Type: application/json
/sites/{site_id}/pages/{page_id}/comments{?search,searchFields,limit,offset,sortBy,sortOrder,fields,includeIds,excludeIds,status,dateField,dateFrom,dateTo}
Authentication is required if want to include unpublished comments.
Example URI
number
(required)The site ID.
number
(required)The page ID.
string
(optional)Search query.
string
(optional) Example: bodyThe comma separated field name list to search.
number
(optional) Example: 10Maximum number of comments to retrieve.
number
(optional) Example: 00-indexed offset.
string
(optional) Example: idThe field name for sort.
string
(optional) Example: descenddescend (default): Return comments in descending order.
ascend: Return comments in ascending order.
string
(optional)The field list to retrieve as part of the Comments resource. That list should be separated by comma. If this parameter is not specified, All fields will be returned.
string
(optional)The comma separated ID list of comments to include to result.
string
(optional)The comma separated ID list of comments to exclude from result.
string
(optional)Filter by status.
Approved: comment_visible is 1 and comment_junk_status is 1.
Pending: comment_visible is 0 and comment_junk_status is 1.
Spam: comment_junk_status is -1.
string
(optional) Example: created_onSpecifies the field name to be used as a date field for filtering. (new in v3)
string
(optional)The start date to filtering. Specify in “YYYY-MM-DD” format. (new in v3)
string
(optional)The end date to filtering. Specify in “YYYY-MM-DD” format. (new in v3)
200
Headers
Content-Type: application/json
Body
{ "totalResults": 1, "items": [ { "author": "Hello, world!", "blog": { "id": 1 }, "body": "Hello, world!", "createdBy": { "id": 1, "displayName": "Hello, world!", "userpicUrl": "Hello, world!" }, "createdDate": "Hello, world!", "customFields": [ { "basename": "Hello, world!", "value": "Hello, world!" } ], "date": "Hello, world!", "entry": { "id": 1 }, "id": 1, "link": "Hello, world!", "modifiedBy": { "displayName": "Hello, world!", "id": 1, "userpicUrl": "Hello, world!" }, "modifiedDate": "Hello, world!", "parent": 1, "status": "Hello, world!", "updatable": true } ] }
Schema
{ "$schema": "http://json-schema.org/draft-04/schema#", "type": "object", "properties": { "totalResults": { "type": "number", "description": "Total record count of this request." }, "items": { "type": "array", "items": { "type": "object", "properties": { "author": { "type": "string", "description": "+id (number) - The ID of this commenter. If commenter is not a registerd user, this field is empty.\n\n+ displayName (string) - The display name of this commenter.\n\n+ userpicUrl (string) - The URL of this commenter's userpic. The userpic will be made by UserpicThumbnailSize and UserpicAllowRect settings. If a commenter is not a registered user or a commenter does not set own userpic, will be returned empty string." }, "blog": { "type": "object", "properties": { "id": { "type": "number", "description": "The ID of the site that contains this comment." } } }, "body": { "type": "string", "description": "The contents of this comment." }, "createdBy": { "type": "object", "properties": { "id": { "type": "number", "description": "The ID of created user." }, "displayName": { "type": "string", "description": "The display name of created user." }, "userpicUrl": { "type": "string", "description": "The URL of created user's userpic. The userpic will be made by UserpicThumbnailSize and UserpicAllowRect settings. If user does not set own userpic, will be returned empty string." } } }, "createdDate": { "type": "string", "description": "The created time for this comment. (format is iso 8601 datetime)" }, "customFields": { "type": "array" }, "date": { "type": "string", "description": "The creation time for this comment. This property is marked as deprecated in v2.0. (format is iso 8601 datetime)" }, "entry": { "type": "object", "properties": { "id": { "type": "number", "description": "The ID of the entry that contains this comment." } } }, "id": { "type": "number", "description": "The ID of this comment." }, "link": { "type": "string", "description": "The permalink for this comment." }, "modifiedBy": { "type": "object", "properties": { "displayName": { "type": "string", "description": "The display name of last modified user." }, "id": { "type": "number", "description": "The ID of last modified user." }, "userpicUrl": { "type": "string", "description": "The URL of last modified user's userpic. The userpic will be made by UserpicThumbnailSize and UserpicAllowRect settings. If user does not set own userpic, will be returned empty string." } } }, "modifiedDate": { "type": "string", "description": "The last modified time for this comment. (format is iso 8601 datetime)" }, "parent": { "type": "number", "description": "The ID of the parent of this comment. If this comment is not a reply, will be returned as null." }, "status": { "type": "string", "description": "The publishing status of this comment. Approved: This comment has been approved. In the database, comment_visible = 1 and comment_junk_status = 1. Pending: This comment has not been approved. In the database, comment_visible = 0 and comment_junk_status = 1. Spam: This comment has been marked as Spam. In the database, comment_visible = 0 and comment_junk_status = -1." }, "updatable": { "type": "boolean", "description": "true: The user who accessed can update this comment. false: The user who accessed cannot update this comment." } } }, "description": "The array of result content." } } }
403
Do not have permission to retrieve the list of comments.
Headers
Content-Type: application/json
404
Site or entry not found.
Headers
Content-Type: application/json
Comment ¶
/sites/{site_id}/comments/{comment_id}{?fields}
Authorization is required if the comment status is “unpublished”.
Example URI
number
(required)The site ID.
number
(required)The comment ID.
string
(optional)The field list to retrieve as part of the Comments resource. That list should be separated by comma. If this parameter is not specified, All fields will be returned.
200
Headers
Content-Type: application/json
Body
{ "author": "Hello, world!", "blog": { "id": 1 }, "body": "Hello, world!", "createdBy": { "id": 1, "displayName": "Hello, world!", "userpicUrl": "Hello, world!" }, "createdDate": "Hello, world!", "customFields": [ { "basename": "Hello, world!", "value": "Hello, world!" } ], "date": "Hello, world!", "entry": { "id": 1 }, "id": 1, "link": "Hello, world!", "modifiedBy": { "displayName": "Hello, world!", "id": 1, "userpicUrl": "Hello, world!" }, "modifiedDate": "Hello, world!", "parent": 1, "status": "Hello, world!", "updatable": true }
Schema
{ "$schema": "http://json-schema.org/draft-04/schema#", "type": "object", "properties": { "author": { "type": "string", "description": "+id (number) - The ID of this commenter. If commenter is not a registerd user, this field is empty.\n\n+ displayName (string) - The display name of this commenter.\n\n+ userpicUrl (string) - The URL of this commenter's userpic. The userpic will be made by UserpicThumbnailSize and UserpicAllowRect settings. If a commenter is not a registered user or a commenter does not set own userpic, will be returned empty string." }, "blog": { "type": "object", "properties": { "id": { "type": "number", "description": "The ID of the site that contains this comment." } } }, "body": { "type": "string", "description": "The contents of this comment." }, "createdBy": { "type": "object", "properties": { "id": { "type": "number", "description": "The ID of created user." }, "displayName": { "type": "string", "description": "The display name of created user." }, "userpicUrl": { "type": "string", "description": "The URL of created user's userpic. The userpic will be made by UserpicThumbnailSize and UserpicAllowRect settings. If user does not set own userpic, will be returned empty string." } } }, "createdDate": { "type": "string", "description": "The created time for this comment. (format is iso 8601 datetime)" }, "customFields": { "type": "array" }, "date": { "type": "string", "description": "The creation time for this comment. This property is marked as deprecated in v2.0. (format is iso 8601 datetime)" }, "entry": { "type": "object", "properties": { "id": { "type": "number", "description": "The ID of the entry that contains this comment." } } }, "id": { "type": "number", "description": "The ID of this comment." }, "link": { "type": "string", "description": "The permalink for this comment." }, "modifiedBy": { "type": "object", "properties": { "displayName": { "type": "string", "description": "The display name of last modified user." }, "id": { "type": "number", "description": "The ID of last modified user." }, "userpicUrl": { "type": "string", "description": "The URL of last modified user's userpic. The userpic will be made by UserpicThumbnailSize and UserpicAllowRect settings. If user does not set own userpic, will be returned empty string." } } }, "modifiedDate": { "type": "string", "description": "The last modified time for this comment. (format is iso 8601 datetime)" }, "parent": { "type": "number", "description": "The ID of the parent of this comment. If this comment is not a reply, will be returned as null." }, "status": { "type": "string", "description": "The publishing status of this comment. Approved: This comment has been approved. In the database, comment_visible = 1 and comment_junk_status = 1. Pending: This comment has not been approved. In the database, comment_visible = 0 and comment_junk_status = 1. Spam: This comment has been marked as Spam. In the database, comment_visible = 0 and comment_junk_status = -1." }, "updatable": { "type": "boolean", "description": "true: The user who accessed can update this comment. false: The user who accessed cannot update this comment." } } }
403
Do not have permission to retrieve comment.
Headers
Content-Type: application/json
404
Site or comment not found.
Headers
Content-Type: application/json
/sites/{site_id}/comments/{comment_id}
Authentication required. Update comment. This endpoint need following permissions. (Perhapse, MT user almost have comment permission.)
This method accepts PUT and POST with __method=PUT.
Post form data is following
Example URI
number
(required)The site ID.
number
(required)The comment ID.
Headers
Content-Type: application/x-www-form-urlencoded
Body
comment={"body" : "This is a test comment.\nHe he he"}
200
Headers
Content-Type: application/json
Body
{ "author": "Hello, world!", "blog": { "id": 1 }, "body": "Hello, world!", "createdBy": { "id": 1, "displayName": "Hello, world!", "userpicUrl": "Hello, world!" }, "createdDate": "Hello, world!", "customFields": [ { "basename": "Hello, world!", "value": "Hello, world!" } ], "date": "Hello, world!", "entry": { "id": 1 }, "id": 1, "link": "Hello, world!", "modifiedBy": { "displayName": "Hello, world!", "id": 1, "userpicUrl": "Hello, world!" }, "modifiedDate": "Hello, world!", "parent": 1, "status": "Hello, world!", "updatable": true }
Schema
{ "$schema": "http://json-schema.org/draft-04/schema#", "type": "object", "properties": { "author": { "type": "string", "description": "+id (number) - The ID of this commenter. If commenter is not a registerd user, this field is empty.\n\n+ displayName (string) - The display name of this commenter.\n\n+ userpicUrl (string) - The URL of this commenter's userpic. The userpic will be made by UserpicThumbnailSize and UserpicAllowRect settings. If a commenter is not a registered user or a commenter does not set own userpic, will be returned empty string." }, "blog": { "type": "object", "properties": { "id": { "type": "number", "description": "The ID of the site that contains this comment." } } }, "body": { "type": "string", "description": "The contents of this comment." }, "createdBy": { "type": "object", "properties": { "id": { "type": "number", "description": "The ID of created user." }, "displayName": { "type": "string", "description": "The display name of created user." }, "userpicUrl": { "type": "string", "description": "The URL of created user's userpic. The userpic will be made by UserpicThumbnailSize and UserpicAllowRect settings. If user does not set own userpic, will be returned empty string." } } }, "createdDate": { "type": "string", "description": "The created time for this comment. (format is iso 8601 datetime)" }, "customFields": { "type": "array" }, "date": { "type": "string", "description": "The creation time for this comment. This property is marked as deprecated in v2.0. (format is iso 8601 datetime)" }, "entry": { "type": "object", "properties": { "id": { "type": "number", "description": "The ID of the entry that contains this comment." } } }, "id": { "type": "number", "description": "The ID of this comment." }, "link": { "type": "string", "description": "The permalink for this comment." }, "modifiedBy": { "type": "object", "properties": { "displayName": { "type": "string", "description": "The display name of last modified user." }, "id": { "type": "number", "description": "The ID of last modified user." }, "userpicUrl": { "type": "string", "description": "The URL of last modified user's userpic. The userpic will be made by UserpicThumbnailSize and UserpicAllowRect settings. If user does not set own userpic, will be returned empty string." } } }, "modifiedDate": { "type": "string", "description": "The last modified time for this comment. (format is iso 8601 datetime)" }, "parent": { "type": "number", "description": "The ID of the parent of this comment. If this comment is not a reply, will be returned as null." }, "status": { "type": "string", "description": "The publishing status of this comment. Approved: This comment has been approved. In the database, comment_visible = 1 and comment_junk_status = 1. Pending: This comment has not been approved. In the database, comment_visible = 0 and comment_junk_status = 1. Spam: This comment has been marked as Spam. In the database, comment_visible = 0 and comment_junk_status = -1." }, "updatable": { "type": "boolean", "description": "true: The user who accessed can update this comment. false: The user who accessed cannot update this comment." } } }
403
Do not have permission to update comment.
Headers
Content-Type: application/json
404
Site or comment not found.
Headers
Content-Type: application/json
/sites/{site_id}/comments/{comment_id}
Authentication required.
Delete comment. This endpoint need following permissions. (Perhapse, MT user almost have comment permission.)
This method accepts PUT and POST with __method=DELETE.
Example URI
number
(required)The site ID.
number
(required)The comment ID.
200
Headers
Content-Type: application/json
Body
{ "author": "Hello, world!", "blog": { "id": 1 }, "body": "Hello, world!", "createdBy": { "id": 1, "displayName": "Hello, world!", "userpicUrl": "Hello, world!" }, "createdDate": "Hello, world!", "customFields": [ { "basename": "Hello, world!", "value": "Hello, world!" } ], "date": "Hello, world!", "entry": { "id": 1 }, "id": 1, "link": "Hello, world!", "modifiedBy": { "displayName": "Hello, world!", "id": 1, "userpicUrl": "Hello, world!" }, "modifiedDate": "Hello, world!", "parent": 1, "status": "Hello, world!", "updatable": true }
Schema
{ "$schema": "http://json-schema.org/draft-04/schema#", "type": "object", "properties": { "author": { "type": "string", "description": "+id (number) - The ID of this commenter. If commenter is not a registerd user, this field is empty.\n\n+ displayName (string) - The display name of this commenter.\n\n+ userpicUrl (string) - The URL of this commenter's userpic. The userpic will be made by UserpicThumbnailSize and UserpicAllowRect settings. If a commenter is not a registered user or a commenter does not set own userpic, will be returned empty string." }, "blog": { "type": "object", "properties": { "id": { "type": "number", "description": "The ID of the site that contains this comment." } } }, "body": { "type": "string", "description": "The contents of this comment." }, "createdBy": { "type": "object", "properties": { "id": { "type": "number", "description": "The ID of created user." }, "displayName": { "type": "string", "description": "The display name of created user." }, "userpicUrl": { "type": "string", "description": "The URL of created user's userpic. The userpic will be made by UserpicThumbnailSize and UserpicAllowRect settings. If user does not set own userpic, will be returned empty string." } } }, "createdDate": { "type": "string", "description": "The created time for this comment. (format is iso 8601 datetime)" }, "customFields": { "type": "array" }, "date": { "type": "string", "description": "The creation time for this comment. This property is marked as deprecated in v2.0. (format is iso 8601 datetime)" }, "entry": { "type": "object", "properties": { "id": { "type": "number", "description": "The ID of the entry that contains this comment." } } }, "id": { "type": "number", "description": "The ID of this comment." }, "link": { "type": "string", "description": "The permalink for this comment." }, "modifiedBy": { "type": "object", "properties": { "displayName": { "type": "string", "description": "The display name of last modified user." }, "id": { "type": "number", "description": "The ID of last modified user." }, "userpicUrl": { "type": "string", "description": "The URL of last modified user's userpic. The userpic will be made by UserpicThumbnailSize and UserpicAllowRect settings. If user does not set own userpic, will be returned empty string." } } }, "modifiedDate": { "type": "string", "description": "The last modified time for this comment. (format is iso 8601 datetime)" }, "parent": { "type": "number", "description": "The ID of the parent of this comment. If this comment is not a reply, will be returned as null." }, "status": { "type": "string", "description": "The publishing status of this comment. Approved: This comment has been approved. In the database, comment_visible = 1 and comment_junk_status = 1. Pending: This comment has not been approved. In the database, comment_visible = 0 and comment_junk_status = 1. Spam: This comment has been marked as Spam. In the database, comment_visible = 0 and comment_junk_status = -1." }, "updatable": { "type": "boolean", "description": "true: The user who accessed can update this comment. false: The user who accessed cannot update this comment." } } }
403
Do not have permission to update comment.
Headers
Content-Type: application/json
404
Site or comment not found.
Headers
Content-Type: application/json
/sites/comments/replies
Authentication required/
Make a reply comment. This endpoint need following permissions. (Perhapse, MT user almost have comment permission.)
Post form data is following
Example URI
Headers
Content-Type: application/x-www-form-urlencoded
Body
comment={"body" : "This is a test comment.\nHe he he"}
200
Headers
Content-Type: application/json
Body
{ "author": "Hello, world!", "blog": { "id": 1 }, "body": "Hello, world!", "createdBy": { "id": 1, "displayName": "Hello, world!", "userpicUrl": "Hello, world!" }, "createdDate": "Hello, world!", "customFields": [ { "basename": "Hello, world!", "value": "Hello, world!" } ], "date": "Hello, world!", "entry": { "id": 1 }, "id": 1, "link": "Hello, world!", "modifiedBy": { "displayName": "Hello, world!", "id": 1, "userpicUrl": "Hello, world!" }, "modifiedDate": "Hello, world!", "parent": 1, "status": "Hello, world!", "updatable": true }
Schema
{ "$schema": "http://json-schema.org/draft-04/schema#", "type": "object", "properties": { "author": { "type": "string", "description": "+id (number) - The ID of this commenter. If commenter is not a registerd user, this field is empty.\n\n+ displayName (string) - The display name of this commenter.\n\n+ userpicUrl (string) - The URL of this commenter's userpic. The userpic will be made by UserpicThumbnailSize and UserpicAllowRect settings. If a commenter is not a registered user or a commenter does not set own userpic, will be returned empty string." }, "blog": { "type": "object", "properties": { "id": { "type": "number", "description": "The ID of the site that contains this comment." } } }, "body": { "type": "string", "description": "The contents of this comment." }, "createdBy": { "type": "object", "properties": { "id": { "type": "number", "description": "The ID of created user." }, "displayName": { "type": "string", "description": "The display name of created user." }, "userpicUrl": { "type": "string", "description": "The URL of created user's userpic. The userpic will be made by UserpicThumbnailSize and UserpicAllowRect settings. If user does not set own userpic, will be returned empty string." } } }, "createdDate": { "type": "string", "description": "The created time for this comment. (format is iso 8601 datetime)" }, "customFields": { "type": "array" }, "date": { "type": "string", "description": "The creation time for this comment. This property is marked as deprecated in v2.0. (format is iso 8601 datetime)" }, "entry": { "type": "object", "properties": { "id": { "type": "number", "description": "The ID of the entry that contains this comment." } } }, "id": { "type": "number", "description": "The ID of this comment." }, "link": { "type": "string", "description": "The permalink for this comment." }, "modifiedBy": { "type": "object", "properties": { "displayName": { "type": "string", "description": "The display name of last modified user." }, "id": { "type": "number", "description": "The ID of last modified user." }, "userpicUrl": { "type": "string", "description": "The URL of last modified user's userpic. The userpic will be made by UserpicThumbnailSize and UserpicAllowRect settings. If user does not set own userpic, will be returned empty string." } } }, "modifiedDate": { "type": "string", "description": "The last modified time for this comment. (format is iso 8601 datetime)" }, "parent": { "type": "number", "description": "The ID of the parent of this comment. If this comment is not a reply, will be returned as null." }, "status": { "type": "string", "description": "The publishing status of this comment. Approved: This comment has been approved. In the database, comment_visible = 1 and comment_junk_status = 1. Pending: This comment has not been approved. In the database, comment_visible = 0 and comment_junk_status = 1. Spam: This comment has been marked as Spam. In the database, comment_visible = 0 and comment_junk_status = -1." }, "updatable": { "type": "boolean", "description": "true: The user who accessed can update this comment. false: The user who accessed cannot update this comment." } } }
403
Do not have permission to reply comment.
Headers
Content-Type: application/json
404
Site or comment not found.
Headers
Content-Type: application/json