Back to Collection Items
#include <C_CkHttpW.h>
#include <C_CkStringBuilderW.h>
void ChilkatSample(void)
{
HCkHttpW http;
BOOL success;
HCkStringBuilderW sbResponseBody;
// This example assumes the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.
http = CkHttpW_Create();
CkHttpW_SetRequestHeader(http,L"X-ANYPNT-ENV-ID",L"{{environment_id}}");
// Adds the "Authorization: Bearer {{token}}" header.
CkHttpW_putAuthToken(http,L"{{token}}");
CkHttpW_SetRequestHeader(http,L"X-ANYPNT-ORG-ID",L"{{organization_id}}");
sbResponseBody = CkStringBuilderW_Create();
success = CkHttpW_QuickGetSb(http,L"https://domain.com/visualizer/api/v4/organizations/{{organization_id}}/applications-info",sbResponseBody);
if (success == FALSE) {
wprintf(L"%s\n",CkHttpW_lastErrorText(http));
CkHttpW_Dispose(http);
CkStringBuilderW_Dispose(sbResponseBody);
return;
}
wprintf(L"Response status code = %d\n",CkHttpW_getLastStatus(http));
wprintf(L"%s\n",CkStringBuilderW_getAsString(sbResponseBody));
CkHttpW_Dispose(http);
CkStringBuilderW_Dispose(sbResponseBody);
}
Curl Command
curl -X GET
-H "Authorization: Bearer {{token}}"
-H "X-ANYPNT-ORG-ID: {{organization_id}}"
-H "X-ANYPNT-ENV-ID: {{environment_id}}"
https://domain.com/visualizer/api/v4/organizations/{{organization_id}}/applications-info
Postman Collection Item JSON
{
"name": "Get application-info",
"request": {
"method": "GET",
"header": [
{
"key": "Authorization",
"value": "Bearer {{token}}",
"type": "text"
},
{
"key": "X-ANYPNT-ORG-ID",
"value": "{{organization_id}}",
"type": "text"
},
{
"key": "X-ANYPNT-ENV-ID",
"value": "{{environment_id}}",
"type": "text"
}
],
"url": {
"raw": "{{url}}/visualizer/api/v4/organizations/{{organization_id}}/applications-info",
"host": [
"{{url}}"
],
"path": [
"visualizer",
"api",
"v4",
"organizations",
"{{organization_id}}",
"applications-info"
]
}
},
"response": [
]
}