Back to Collection Items
#import <CkoHttp.h>
#import <NSString.h>
#import <CkoHttpResponse.h>
// This example assumes the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.
CkoHttp *http = [[CkoHttp alloc] init];
BOOL success;
NSString *strRequestBody = @"[\"{{rolegroup_Id}}\"]";
// Adds the "Authorization: Bearer {{token}}" header.
http.AuthToken = @"{{token}}";
CkoHttpResponse *resp = [http PText: @"DELETE" url: @"https://domain.com/accounts/api/organizations/{{organization_id}}/rolegroups?include_internal=false" textData: strRequestBody charset: @"utf-8" contentType: @"application/text" md5: NO gzip: NO];
if (http.LastMethodSuccess == NO) {
NSLog(@"%@",http.LastErrorText);
return;
}
NSLog(@"%d",[resp.StatusCode intValue]);
NSLog(@"%@",resp.BodyStr);
Curl Command
curl -X DELETE
-H "Authorization: Bearer {{token}}"
-d '["{{rolegroup_Id}}"]'
https://domain.com/accounts/api/organizations/{{organization_id}}/rolegroups?include_internal=false
Postman Collection Item JSON
{
"name": "Delete a rolegroup",
"request": {
"method": "DELETE",
"header": [
{
"key": "Authorization",
"value": "Bearer {{token}}",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "[\"{{rolegroup_Id}}\"]",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{url}}/accounts/api/organizations/{{organization_id}}/rolegroups?include_internal=false",
"host": [
"{{url}}"
],
"path": [
"accounts",
"api",
"organizations",
"{{organization_id}}",
"rolegroups"
],
"query": [
{
"key": "include_internal",
"value": "false"
}
]
}
},
"response": [
]
}