Deletes Departments from a Kintone environment.
Method | DELETE |
URL | https://{subdomain}.kintone.com/v1/organizations.json |
Authentication |
Password Authentication |
Content-Type | application/json |
Permissions
Only
Administrators
can use this API.
Request Parameters
Parameter |
Value |
Required |
Description |
codes |
Array of Strings |
Yes |
An array of department codes of departments that will be deleted. Up to 100 codes can be specified. |
Sample Request
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
var body = {
codes: [
'Bureau of Internet Maintenance',
'Division of On-Line Code Control'
]
};
kintone.api(kintone.api.url('/v1/organizations', true), 'DELETE', body, function(resp) {
// success
console.log(resp);
}, function(error) {
// error
console.log(error);
});
|
curl Sample
1
2
3
4
5
|
$ curl -X DELETE \
https://{subdomain}.kintone.com/v1/organizations.json \
-H 'Content-Type: application/json' \
-H 'X-Cybozu-Authorization: a2ludG9uZTpkZXZlbG9wZXI=' \
-d '{"codes": ["Bureau of Internet Maintenance", "Division of On-Line Code Control"]}'
|
Sample Response