Delete Records

Deletes multiple records in an app.

MethodDELETE
URLhttps://{subdomain}.kintone.com/k/v1/records.json
URL(guest space)https://{subdomain}.kintone.com/k/guest/{SpaceID}/v1/records.json
Authentication Password Authentication, API Token Authentication, Session Authentication
Content-Typeapplication/json (not needed if specifying the query with a query string)

Contents

Permissions

Permission to Delete records insides the App is needed.

Request Parameters

PARAMETER VALUE REQUIRED DESCRIPTION
app Integer or String Yes The app ID.
ids Array of Integers or Strings Yes Array of record IDs that will be deleted.
Up to 100 records can be specified.
revisions Array of Integers or Strings Optional The Expected revision number.
The first id number will correspond to the first revision number in the array, the second id to the second revision number, and so on.
If the revision number does not match, an error will occur and no records will be deleted.
If the revision number is left blank or is -1, the revision number will not be checked for the corresponding record ID.

Sample Request (Query String)

JavaScript (using Kintone REST API Request)

N/A - kintone.api() requires requests to be sent with the Content-Type:application/json header for DELETE requests.

curl Sample

1
2
curl -X DELETE 'https://{subdomain}.kintone.com/k/v1/records.json?app=287&ids[0]=1&ids[1]=2' -g \
  -H 'X-Cybozu-API-Token: L08xCvTh7A1EVm3rZimF98R8VLP3k4lMlzELqyCx'

Sample Request (JSON)

JavaScript (using Kintone REST API Request)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
var body = {
  'app': 1,
  'ids': [1, 2]
};

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

curl Sample

1
2
3
4
5
6
7
curl -X DELETE 'https://{subdomain}.kintone.com/k/v1/records.json' \
  -H 'X-Cybozu-API-Token: L08xCvTh7A1EVm3rZimF98R8VLP3k4lMlzELqyCx' \
  -H 'Content-Type: application/json' \
  -d '{
    "app": 1,
    "ids": [1, 2]
  }'

Sample Response

1
{}

Limitations

  • If the process fails, no records will be deleted.
  • 100 is the maximum number of records that can be deleted per API call.