Update Statuses

Updates the Statuses of Multiple records of an App,that were set with the Process Management feature (External link) .

MethodPUT
URLhttps://{subdomain}.kintone.com/k/v1/records/status.json
URL(guest space)https://{subdomain}.kintone.com/k/guest/{SpaceID}/v1/records/status.json
Authentication Password Authentication, API Token Authentication, Session Authentication
Content-Typeapplication/json

Contents

Permissions

For Password Authentication, the user must have permission to view the record. Also, one of the following conditions must be met:

  1. The user is the Assignee of the record
  2. There are no Assignees set for the record

For API Token Authentication, the API Token must have permission to view the record. Also, one of the following conditions must be met:

  1. The user "Administrator" is the Assignee of the record
  2. There are no Assignees set for the record

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.
Specifying more than 100 records will result in an error.
records[].action String Yes The Action name of the action to run.
If the localization feature has been used to apply multiple translations of the Action name, specify the name of the Action in the language settings of the user that will run the API. API Tokens follow the language settings set in the Localization page (External link) of the User & System Administration settings.
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

JavaScript (using Kintone REST API Request)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
var body = {
  'app': 1,
  'records': [
    {
      'id': 4,
      'action': 'Start',
      'assignee': 'Krispy',
    },
    {
      'id': 3,
      'action': 'Complete'
    }
  ]
};

kintone.api(kintone.api.url('/k/v1/records/status.json', true), 'PUT', body, function(resp) {
  // success
  console.log(resp);
}, function(error) {
  // error
  console.log(error);
});

curl Sample

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
curl -X PUT 'https://{subdomain}.kintone.com/k/v1/records/status.json' \
-H 'X-Cybozu-API-Token: L08xCvTh7A1EVm3rZimF98R8VLP3k4lMlzELqyCx' \
-H 'Content-Type: application/json' \
-d '{
  "app": 1,
  "records": [
    {
      "id": 4,
      "action": "Start",
      "assignee": "Krispy"
    },
    {
      "id": 3,
      "action": "Complete"
    }
  ]
}'

Response Parameters

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
{
  "records": [
    {
      "id": "4",
      "revision": "3"
    },
    {
      "id": "3",
      "revision": "4"
    }
  ]
}

Limitations

  • This API can only be used with Apps that have the Process Management feature enabled.