Updates the Assignees of a Record status, that was set with Process Management.
For more information, refer to the following article:
Setting Process Management
Permissions
The user or API Token must meet all of the following conditions:
- Permission to manage the App.
- Permission to view records of the App.
- Permission to view the specified record.
Request Parameters
PARAMETER |
VALUE |
REQUIRED |
DESCRIPTION |
app |
Integer or String |
Yes |
The App ID. |
id |
Integer or String |
Yes |
The Record ID. |
assignees |
Array |
Yes |
The user code(s) (log in names) of the Assignee(s). If empty, no users will be assigned. The maximum number of Assignees is 100. |
revision |
Integer or String |
Optional |
The revision number of the record before updating the Assignees. 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
1
2
3
4
5
6
7
8
9
10
11
12
13
|
var body = {
'app': 1,
'id': 4,
'assignees': ['Krispy']
};
kintone.api(kintone.api.url('/k/v1/record/assignees.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
|
curl -X PUT 'https://{subdomain}.kintone.com/k/v1/record/assignees.json' \
-H 'X-Cybozu-API-Token: L08xCvTh7A1EVm3rZimF98R8VLP3k4lMlzELqyCx' \
-H 'Content-Type: application/json' \
-d '{
"app": 1,
"id": 4,
"assignees": ["Krispy"]
}'
|
Response Parameters
PARAMETER |
VALUE |
DESCRIPTION |
revision |
String |
The revision number of the record after updating the Assignees. |
Sample Response
1
2
3
|
{
"revision": "4"
}
|
Limitations
- This API can only be used with Apps that have the Process Management feature enabled.
- The error will return if more than 2 Assignees are assigned to a record that only allows one Assignee.
Related Article