Back to Collection Items
import sys
import chilkat2
# This example assumes the Chilkat API to have been previously unlocked.
# See Global Unlock Sample for sample code.
http = chilkat2.Http()
# Adds the "Authorization: Bearer <access_token>" header.
http.AuthToken = "<access_token>"
# resp is a CkHttpResponse
resp = http.QuickRequest("DELETE","https://domain.com/services/data/v{{version}}/chatter/feed-elements/:FEED_ELEMENT_ID")
if (http.LastMethodSuccess == False):
print(http.LastErrorText)
sys.exit()
print(str(resp.StatusCode))
print(resp.BodyStr)
Curl Command
curl -X DELETE
-H "Authorization: Bearer <access_token>"
https://domain.com/services/data/v{{version}}/chatter/feed-elements/:FEED_ELEMENT_ID
Postman Collection Item JSON
{
"name": "Feed Element - Delete",
"event": [
{
"listen": "prerequest",
"script": {
"exec": [
""
],
"type": "text/javascript"
}
},
{
"listen": "test",
"script": {
"exec": [
""
],
"type": "text/javascript"
}
}
],
"protocolProfileBehavior": {
"disabledSystemHeaders": {
"content-type": true
}
},
"request": {
"method": "DELETE",
"header": [
],
"url": {
"raw": "{{_endpoint}}/services/data/v{{version}}/chatter/feed-elements/:FEED_ELEMENT_ID",
"host": [
"{{_endpoint}}"
],
"path": [
"services",
"data",
"v{{version}}",
"chatter",
"feed-elements",
":FEED_ELEMENT_ID"
],
"variable": [
{
"key": "FEED_ELEMENT_ID",
"value": ""
}
]
},
"description": "Access, edit, or delete a feed element. Feed items are the only type of feed element that can be edited.\n\nhttps://developer.salesforce.com/docs/atlas.en-us.chatterapi.meta/chatterapi/connect_resources_feed_element_specific.htm"
},
"response": [
{
"name": "Successful Feed Element - Delete",
"originalRequest": {
"method": "DELETE",
"header": [
],
"url": {
"raw": "{{_endpoint}}/services/data/v{{version}}/chatter/feed-elements/:FEED_ELEMENT_ID",
"host": [
"{{_endpoint}}"
],
"path": [
"services",
"data",
"v{{version}}",
"chatter",
"feed-elements",
":FEED_ELEMENT_ID"
],
"variable": [
{
"key": "FEED_ELEMENT_ID",
"value": ""
}
]
}
},
"status": "No Content",
"code": 204,
"_postman_previewlanguage": "plain",
"header": [
{
"key": "Date",
"value": "Wed, 22 Nov 2023 11:13:51 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
}
]
}