オブジェクトを新規作成します。認証付きリクエストでログイン中のユーザーがそのスコープへのオブジェクトに対する作成権限が必要です。
ワークフローとリビジョンについては以下を参照ください。
/api/v1/スコープID/モデル名/insert
/api/v1/1/entry/insert
POST
{
"title": "Welcome!",
"text": "<h2>Our Story<\/h2>\n<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.<\/p>\n<blockquote>\n<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.<\/p>\n<\/blockquote>",
"text_format": "richtext",
"assets": [
{
"id": 26
}
],
"excerpt": "Our StoryLorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",
"categories": [
{
"id": 1
}
],
"tags": [
{
"id": 6
}
],
"basename": "powercmsx",
"status": 4,
"has_deadline": 0,
"published_on": "2021-09-01 12:47:46",
"allow_comment": 0
}
オブジェクトの idとリクエストボディの JSONで指定したキーの値を返します。
{
"id": 1,
"title": "Welcome!",
"text": "<h2>Our Story<\/h2>\n<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.<\/p>\n<blockquote>\n<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.<\/p>\n<\/blockquote>",
"text_format": "richtext",
"assets": [
{
"id": 26,
"label": "powercmsx",
"file": {
"Url": "https:\/\/localhost\/01\/assets\/powercmsx.png",
"Label": null,
"Metadata": {
"file_size": 76618,
"image_width": 600,
"image_height": 600,
"class": "image",
"extension": "png",
"mime_type": "image\/png",
"uploaded": "2021-09-02 15:11:58",
"user_id": 1
}
},
"extra_path": "assets\/",
"file_name": "powercmsx.png",
"file_ext": "png",
"mime_type": "image\/png",
"tags": [],
"size": 76618,
"image_width": 600,
"image_height": 600,
"class": "image",
"status": 4,
"created_by": 1,
"modified_by": 1,
"created_on": "2021-09-02 15:11:58",
"modified_on": "2021-09-02 15:11:58",
"workspace_id": 1,
"published_on": "2021-09-02 15:11:58",
"rev_type": 0,
"user_id": 1,
"uuid": "a415ce51-5e70-4b1b-9413-8342f3e864ab",
"Permalink": "https:\/\/localhost\/01\/assets\/powercmsx.png",
"Thumbnail": "https:\/\/localhost\/powercmsx\/assets_c\/thumb-asset-128xauto-square-26-file.png"
}
],
"text_more": "",
"excerpt": "Our StoryLorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",
"keywords": "",
"categories": [
{
"id": 1,
"label": "Press Release",
"order": 1,
"basename": "press_release",
"workspace_id": 1,
"created_on": "2021-08-27 15:13:45",
"modified_on": "2021-08-27 15:13:45",
"created_by": 1,
"modified_by": 1,
"Permalink": "https:\/\/localhost\/01\/press_release\/index.html",
"Path": "press_release"
}
],
"tags": [
{
"id": 6,
"name": "PowerCMS X",
"normalize": "powercmsx",
"class": "entry",
"order": 2,
"workspace_id": 1,
"created_on": "2021-09-02 15:09:57",
"modified_on": "2021-09-02 15:09:57",
"created_by": 1,
"modified_by": 1
}
],
"extra_path": "",
"basename": "powercmsx",
"status": 4,
"has_deadline": 0,
"published_on": "2021-09-01 12:47:46",
"rev_note": "",
"rev_diff": "",
"rev_type": 0,
"user_id": {
"id": 1,
"nickname": "Junnama Noda",
"photo": "",
"text_format": "",
"space_order": "",
"fix_spacebar": 1,
"language": "ja",
"control_border": "",
"status": 2
},
"previous_owner": 0,
"rev_changed": "",
"allow_comment": 0,
"created_on": "2021-08-27 15:13:45",
"modified_on": "2021-09-02 15:12:06",
"created_by": 1,
"modified_by": 1,
"workspace_id": 1,
"rev_object_id": 0,
"uuid": "d574478a-6762-434f-b002-723c835444ee",
"Permalink": "https:\/\/localhost\/01\/press_release\/powercmsx.html"
}
共通レスポンスエラーについてはこちら 新しいウィンドウでリンクを開くを参照ください。
{
"status": 400,
"message": "Method リクエストメソッド not allowed."
}
{
"status": 400,
"message": "Invalid request."
}
{
"status": 403,
"message": "Permission denied."
}
{
"status": 403,
"message": "Invalid workspace_id specified."
}
各々をキーとしてカラム名とエラーメッセージの配列を errorsにセットして返します。
{
"status": 406,
"message": "The input data is missing or contains incorrect values.",
"errors": {
"Required": {
"カラム名": "エラーメッセージ"
},
"Invalid": {
"カラム名": "エラーメッセージ"
},
"Duplicate": {
"カラム名": "エラーメッセージ"
}
}
}
{
"status": 406,
"message": "Insert canceled by callback(エラー内容)."
}
{
"status": 500,
"message": "An error occurred while save object."
}
{
"status": 500,
"message": "Master not found."
}