Skip to main content

CreateItemWithItemID

Create a new item by specifying item_id

Description

  • Create a new item by specifying item_id.
  • This API is used when Attachment upload is required before item registration.
  • In order to create a new item with an attached file, it is necessary to register the attached file in advance.
  • Since the item_id is required to register an attachment, after obtaining the item_id, register the attachment, specify the converted file_id, and create a new item with this API.
  • item_id can be obtained in advance using the CreateNewItemID API.

Method

POST

Request URL Format

/api/v0/items/:item-id/new-actions/:action-id

URL Params

item-id      : Item ID
action-id : Create new action ID(If `use_display_id` in Payload is true, use display ID (ID specified in settings). If false, use the system internal ID (a_id).

Payload

Content-Type : application/json

{
"item": {
"項目ID1": "作成アイテム項目の値1",
"項目ID2": "作成アイテム項目の値2"
},
"project_id": "プロジェクトID",
"datastore_id": "データベースID",
"use_display_id": true or false //If true, the display ID is used for the item ID in the item; if false, the system's internal FieldID (f_id) is used. If not specified, the default is false.
}

Request Sample1

POST https://api.xxx.com/api/v0/items/5a2671ef0e24794cb08e6200/new-actions/アクションID
{
"item": {
"Locaton": "北極",
"weather": "雪"
},
"project_id": "アプリケーションID",
"datastore_id": "データベースD",
"use_display_id": true
}

Response Sample

null

Request Sample2

POST https://api.xxx.com/api/v0/items/5a2671ef0e24794cb08e6200/new-actions/5e99e6a8aeae8e9af01ec366
{
"item": {
"5e99e2e3aeae8e9af01ec35b": "北極",
"5e99e690aeae8e9af01ec363": "雪"
},
"project_id": "5e99e696aeae8e9af01ec364",
"datastore_id": "5e99e69caeae8e9af01ec365",
"use_display_id": false
}

Response Sample2

null