Objective-C / Anypoint Platform APIs / Get all identities of organization
Back to Collection Items
#import <CkoHttp.h>
#import <CkoJsonObject.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;
CkoJsonObject *queryParams = [[CkoJsonObject alloc] init];
[queryParams UpdateInt: @"offset" value: [NSNumber numberWithInt: 0]];
[queryParams UpdateInt: @"limit" value: [NSNumber numberWithInt: 100]];
[queryParams UpdateString: @"search" value: @"a"];
// Adds the "Authorization: Bearer {{token}}" header.
http.AuthToken = @"{{token}}";
CkoHttpResponse *resp = [http QuickRequestParams: @"GET" url: @"https://domain.com/exchange/api/v2/organizations/{{organization_id}}/identities" json: queryParams];
if (http.LastMethodSuccess == NO) {
NSLog(@"%@",http.LastErrorText);
return;
}
NSLog(@"%d",[resp.StatusCode intValue]);
NSLog(@"%@",resp.BodyStr);
Curl Command
curl -G -d "offset=0"
-d "limit=100"
-d "search=a"
-H "Authorization: Bearer {{token}}"
https://domain.com/exchange/api/v2/organizations/{{organization_id}}/identities
Postman Collection Item JSON
{
"name": "Get all identities of organization",
"request": {
"method": "GET",
"header": [
{
"key": "Authorization",
"value": "Bearer {{token}}",
"type": "text"
}
],
"url": {
"raw": "{{url}}/exchange/api/v2/organizations/{{organization_id}}/identities?offset=0&limit=100&search=a",
"host": [
"{{url}}"
],
"path": [
"exchange",
"api",
"v2",
"organizations",
"{{organization_id}}",
"identities"
],
"query": [
{
"key": "offset",
"value": "0"
},
{
"key": "limit",
"value": "100"
},
{
"key": "search",
"value": "a"
}
]
}
},
"response": [
]
}