Back to Collection Items
#include <CkHttp.h>
#include <CkHttpResponse.h>
void ChilkatSample(void)
{
// This example assumes the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.
CkHttp http;
bool success;
// Adds the "Authorization: Bearer <access_token>" header.
http.put_AuthToken("<access_token>");
CkHttpResponse *resp = http.QuickRequest("DELETE","https://domain.com/services/data/v{{version}}/connect/files/:FILE_ID");
if (http.get_LastMethodSuccess() == false) {
std::cout << http.lastErrorText() << "\r\n";
return;
}
std::cout << resp->get_StatusCode() << "\r\n";
std::cout << resp->bodyStr() << "\r\n";
delete resp;
}
Curl Command
curl -X DELETE
-H "Authorization: Bearer <access_token>"
https://domain.com/services/data/v{{version}}/connect/files/:FILE_ID
Postman Collection Item JSON
{
"name": "File Information - Delete",
"event": [
{
"listen": "prerequest",
"script": {
"exec": [
""
],
"type": "text/javascript"
}
},
{
"listen": "test",
"script": {
"exec": [
""
],
"type": "text/javascript"
}
}
],
"protocolProfileBehavior": {
"disabledSystemHeaders": {}
},
"request": {
"method": "DELETE",
"header": [
],
"url": {
"raw": "{{_endpoint}}/services/data/v{{version}}/connect/files/:FILE_ID",
"host": [
"{{_endpoint}}"
],
"path": [
"services",
"data",
"v{{version}}",
"connect",
"files",
":FILE_ID"
],
"variable": [
{
"key": "FILE_ID",
"value": ""
}
]
},
"description": "Get information about a specified file, including references to external files. Upload a new version of an existing file, including references to external files. Rename a file, move a file to a different folder, and delete a file.\nTo upload a new version of an existing file, make a POST request. Upload the new version as a binary part in a multipart/form-data request. See Uploading Binary Files. To upload a new file to the Files home, use /connect/files/users/me.Get information about a specified file, including references to external files.\nhttps://developer.salesforce.com/docs/atlas.en-us.chatterapi.meta/chatterapi/connect_resources_files_information.htm"
},
"response": [
{
"name": "Successful File Information - Delete",
"originalRequest": {
"method": "DELETE",
"header": [
],
"url": {
"raw": "{{_endpoint}}/services/data/v{{version}}/connect/files/:FILE_ID",
"host": [
"{{_endpoint}}"
],
"path": [
"services",
"data",
"v{{version}}",
"connect",
"files",
":FILE_ID"
],
"variable": [
{
"key": "FILE_ID",
"value": "0692o00000woaRkAAI"
}
]
}
},
"status": "No Content",
"code": 204,
"_postman_previewlanguage": "plain",
"header": [
{
"key": "Date",
"value": "Mon, 20 Nov 2023 16:39:05 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
}
]
}