Back to Collection Items
// This example assumes the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.
loHttp = createobject("CkHttp")
// Adds the "Authorization: Bearer <access_token>" header.
loHttp.AuthToken = "<access_token>"
loResp = loHttp.QuickRequest("DELETE","https://domain.com/services/data/v{{version}}/chatter/comments/:COMMENT_ID")
if (loHttp.LastMethodSuccess = .F.) then
? loHttp.LastErrorText
release loHttp
return
endif
? str(loResp.StatusCode)
? loResp.BodyStr
release loResp
release loHttp
Curl Command
curl -X DELETE
-H "Authorization: Bearer <access_token>"
https://domain.com/services/data/v{{version}}/chatter/comments/:COMMENT_ID
Postman Collection Item JSON
{
"name": "Comment - Delete",
"event": [
{
"listen": "prerequest",
"script": {
"exec": [
""
],
"type": "text/javascript"
}
},
{
"listen": "test",
"script": {
"exec": [
""
],
"type": "text/javascript"
}
}
],
"request": {
"method": "DELETE",
"header": [
],
"url": {
"raw": "{{_endpoint}}/services/data/v{{version}}/chatter/comments/:COMMENT_ID",
"host": [
"{{_endpoint}}"
],
"path": [
"services",
"data",
"v{{version}}",
"chatter",
"comments",
":COMMENT_ID"
],
"variable": [
{
"key": "COMMENT_ID",
"value": ""
}
]
},
"description": "Get information about, edit, or delete a comment.\n\nhttps://developer.salesforce.com/docs/atlas.en-us.chatterapi.meta/chatterapi/connect_resources_comments_specific.htm#connect_resources_comments_specific"
},
"response": [
{
"name": "Successful Comment - Delete",
"originalRequest": {
"method": "DELETE",
"header": [
],
"url": {
"raw": "{{_endpoint}}/services/data/v{{version}}/chatter/comments/:COMMENT_ID",
"host": [
"{{_endpoint}}"
],
"path": [
"services",
"data",
"v{{version}}",
"chatter",
"comments",
":COMMENT_ID"
],
"variable": [
{
"key": "COMMENT_ID",
"value": "0D7..."
}
]
}
},
"status": "No Content",
"code": 204,
"_postman_previewlanguage": "plain",
"header": [
{
"key": "Date",
"value": "Wed, 22 Nov 2023 11:24:36 GMT"
},
{
"key": "Strict-Transport-Security",
"value": "max-age=63072000; includeSubDomains"
},
{
"key": "X-Content-Type-Options",
"value": "nosniff"
},
{
"key": "X-XSS-Protection",
"value": "1; mode=block"
},
{
"key": "Content-Security-Policy",
"value": "upgrade-insecure-requests"
},
{
"key": "X-Robots-Tag",
"value": "none"
},
{
"key": "Cache-Control",
"value": "no-cache,must-revalidate,max-age=0,no-store,private"
}
],
"cookie": [
],
"body": null
}
]
}