Update Status

 

Introduction

This API updates the Status of one or multiple records.
This "Status" refers to the Status of the Process Management feature of the App, and the feature must be enabled for the API to take effect.

Update StatusPUT /record/status.json

Updates the Status of a record of an app.

URI

https://{subdomain}.kintone.com/k/v1/record/status.json

URI for Guest Space Apps

https://{subdomain}.kintone.com/k/guest/{spaceID}/v1/record/status.json

Request Parameters

PARAMETER VALUE REQUIRED DESCRIPTION
action String Yes The Action name of the action you want to run. If the localization feature has been used to apply multiple translations of the action, specify the name of the action in the language settings of the user that will run the API.
app Integer Yes The App ID.
assignee String Conditionally required The next Assignee. Specify the Assignee's log in name.

Required, if the "Assignee List" of the current status is set to "User chooses one assignee from the list to take action", and a selectable assignee exists.
id Integer Yes The record ID.
revision Integer Optional The revision number of the record before updating the status.
If the specified revision is not the latest revision, the request will result in an error.
The revision will not be checked if this parameter is ignored, or -1 is specified.

Sample Request

Request Header

PUT /k/v1/record/status.json HTTP/1.1
Host: example.kintone.com:443
X-Cybozu-Authorization: a2ludG9uZTpkZXZlbG9wZXI=
Content-Type: application/json

Body

{ 
	"app": 4, 
	"id": 1, 
	"action": "Submit", 
	"assignee": "user2", 
	"revision": 1 
}

Response

PARAMETER VALUE DESCRIPTION
revision String The revision number of the record after updating the status.
The revision number will increase by 2, as two operations are preformed - running the action, and updating the status.

Sample Response

{
  "revision": "3"
}

Update Multiple StatusesPUT /records/status.json

Updates the Status of multiple records of an app.

URI

https://{subdomain}.kintone.com/k/v1/records/status.json

URI for Guest Space Apps

https://{subdomain}.kintone.com/k/guest/{spaceID}/v1/records/status.json

Request Parameters

PARAMETER VALUE REQUIRED DESCRIPTION
app String Yes The App ID
records Array Yes An array including information of the record to be updated. Up to 100 records can be specified.
records[].action String Yes The Action name of the action you want to run.
If the localization feature has been used to apply multiple translations of the action, specify the name of the action in the language settings of the user that will run the API.
records[].assignee String Optional The next Assignee. Specify the Assignee's log in name.
records[].id Integer Yes The record ID.
records[].revision Integer Optional The revision number of the record before updating the status.
If the specified revision is not the latest revision, the request will result in an error.
The revision will not be checked if this parameter is ignored, or -1 is specified.

Sample Request

Request Header

PUT /k/v1/records/status.json HTTP/1.1
Host: example.kintone.com:443
X-Cybozu-Authorization: a2ludG9uZTpkZXZlbG9wZXI=
Content-Type: application/json

Body

{ 
	"app": 4, 
	"records": [ 
		{
			"id": 1, 
			"action": "Submit", 
			"assignee": "user2", 
			"revision": 1 
		}, 
		{
			"id": 2, 
			"action": "Confirm" 
		}, 
		{
			"id": 3, 
			"action": "Decline", 
			"revision": 5 
		} 
	] 
}

Response

PARAMETER VALUE DESCRIPTION
records Array An array including information of the updated records.
records[].id String The record ID
records[].revision String The revision number of the record after updating the status.
The revision number will increase by 2, as two operations are preformed - running the action, and updating the status.

Sample Response

{
  "records": [
    {
      "id": "1",
      "revision": "3"
    },
    {
      "id": "2",
      "revision": "9"
    },
    {
      "id": "3",
      "revision": "7"
    }
  ]
}

Limitations

  • The maximum number of records that can be updated is 100.
  • If the API is run using Password Authentication, the below conditions must be matched to run the API.
    • The user running the API has permission to view the record.
    • There is no Assignee specified for that record, or the Assignee is the user running the API.
  • If the API is run using API Token Authentication, the below conditions must be matched to run the API.
    • The "View records" permission must be checked for that API token.
    • There is no Assignee specified for that record.
Was this article helpful?
0 out of 0 found this helpful
Comments
Please sign in to leave a comment.