Swift3 / Anypoint Platform APIs / Get all identities of organization
Back to Collection Items
func chilkatTest() {
// This example assumes the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.
let http = CkoHttp()!
var success: Bool
let queryParams = CkoJsonObject()!
queryParams.updateInt("offset", value: 0)
queryParams.updateInt("limit", value: 100)
queryParams.update("search", value: "a")
// Adds the "Authorization: Bearer {{token}}" header.
http.authToken = "{{token}}"
var resp: CkoHttpResponse? = http.quickRequestParams("GET", url: "https://domain.com/exchange/api/v2/organizations/{{organization_id}}/identities", json: queryParams)
if http.lastMethodSuccess == false {
print("\(http.lastErrorText!)")
return
}
print("\(resp!.statusCode.intValue)")
print("\(resp!.bodyStr!)")
resp = nil
}
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": [
]
}