Delete Comment

Delete a comment in a record in an app.

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

Contents

Permissions

  • The user or API Token must have permission to view the record.
  • If user authentication is used to delete a comment, only comments created by that user can be deleted.
  • If an API Token is used to delete a comment, only comments created by the user "Administrator" can be deleted.

Request Parameters

PARAMETER VALUE REQUIRED DESCRIPTION
app Integer or String Yes The App ID.
record Integer or String Yes The Record ID.
comment Integer or String Yes The Comment ID.

Sample Request (Query String)

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/record/comment.json?app=1&record=1&comment=4' \
-H 'X-Cybozu-API-Token: L08xCvTh7A1EVm3rZimF98R8VLP3k4lMlzELqyCx'

Sample Request (JSON)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14

var body = {
  'app': 1,
  'record': 1,
  'comment': 4
};

kintone.api(kintone.api.url('/k/v1/record/comment.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
8
curl -X DELETE 'https://{subdomain}.kintone.com/k/v1/record/comment.json' \
-H 'X-Cybozu-API-Token: L08xCvTh7A1EVm3rZimF98R8VLP3k4lMlzELqyCx' \
-H 'Content-Type: application/json' \
-d '{
  "app": 1,
  "record": 1,
  "comment": 4
}'

Sample Response

None. An empty JSON will be returned.

1
{}

Limitations

  • An error will return if the commenting feature of the App is turned off.
  • For other limitations,refer to the Limitations section in the following article:
    Kintone REST API Overview