Back to Collection Items
import com.chilkatsoft.*;
public class ChilkatExample {
static {
try {
System.loadLibrary("chilkat");
} catch (UnsatisfiedLinkError e) {
System.err.println("Native code library failed to load.\n" + e);
System.exit(1);
}
}
public static void main(String argv[])
{
// This example assumes the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.
CkHttp http = new CkHttp();
boolean 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}}/ui-api/records/:RECORD_ID");
if (http.get_LastMethodSuccess() == false) {
System.out.println(http.lastErrorText());
return;
}
System.out.println(resp.get_StatusCode());
System.out.println(resp.bodyStr());
}
}
Curl Command
curl -X DELETE
-H "Authorization: Bearer <access_token>"
https://domain.com/services/data/v{{version}}/ui-api/records/:RECORD_ID
Postman Collection Item JSON
{
"name": "Delete a Record",
"event": [
{
"listen": "prerequest",
"script": {
"exec": [
""
],
"type": "text/javascript"
}
}
],
"request": {
"method": "DELETE",
"header": [
],
"body": {
"mode": "raw",
"raw": ""
},
"url": {
"raw": "{{_endpoint}}/services/data/v{{version}}/ui-api/records/:RECORD_ID",
"host": [
"{{_endpoint}}"
],
"path": [
"services",
"data",
"v{{version}}",
"ui-api",
"records",
":RECORD_ID"
],
"variable": [
{
"key": "RECORD_ID",
"value": "",
"description": "Record ID"
}
]
},
"description": "Update a record's data.\nUser Interface API enforces Salesforce validation rules. If a validation rule fails, the response is an Error with Output.\n\nWhen you make a PATCH request to update a record, make sure that the record hasn’t changed since the user started editing it. To find out whether it’s safe to save a record, pass the If-Modified-Since HTTP header in the request.\n\nAs of API version 43.0, if you pass read-only fields in a request body, the response is an Error with Output."
},
"response": [
{
"name": "Delete a Record",
"originalRequest": {
"method": "DELETE",
"header": [
],
"body": {
"mode": "raw",
"raw": ""
},
"url": {
"raw": "{{_endpoint}}/services/data/v{{version}}/ui-api/records/:RECORD_ID",
"host": [
"{{_endpoint}}"
],
"path": [
"services",
"data",
"v{{version}}",
"ui-api",
"records",
":RECORD_ID"
],
"variable": [
{
"key": "RECORD_ID",
"value": "0011Q00002Z2P5jQAF",
"description": "Record ID"
}
]
}
},
"status": "No Content",
"code": 204,
"_postman_previewlanguage": "plain",
"header": [
{
"key": "Date",
"value": "Wed, 27 Sep 2023 16:05:14 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
}
]
}