Chilkat Online Tools

unicodeCpp / WAC API / Get Utilization in Per-Bucket Components

Back to Collection Items

#include <CkHttpW.h>
#include <CkStringBuilderW.h>

void ChilkatSample(void)
    {
    // This example assumes the Chilkat API to have been previously unlocked.
    // See Global Unlock Sample for sample code.

    CkHttpW http;
    bool success;

    http.SetRequestHeader(L"Authorization",L"{{WACApiKey}}");

    CkStringBuilderW sbResponseBody;
    success = http.QuickGetSb(L"https://domain.com/v1/accounts/:AcctNum//utilizations/buckets",sbResponseBody);
    if (success == false) {
        wprintf(L"%s\n",http.lastErrorText());
        return;
    }

    wprintf(L"Response status code = %d\n",http.get_LastStatus());
    wprintf(L"%s\n",sbResponseBody.getAsString());
    }

Curl Command

curl -X GET
	-H "Authorization: {{WACApiKey}}"
https://domain.com/v1/accounts/:AcctNum//utilizations/buckets

Postman Collection Item JSON

{
  "name": "Get Utilization in Per-Bucket Components",
  "request": {
    "auth": {
      "type": "noauth"
    },
    "method": "GET",
    "header": [
      {
        "key": "Authorization",
        "value": "{{WACApiKey}}",
        "type": "text"
      }
    ],
    "url": {
      "raw": "{{baseURL}}/v1/accounts/:AcctNum//utilizations/buckets",
      "host": [
        "{{baseURL}}"
      ],
      "path": [
        "v1",
        "accounts",
        ":AcctNum",
        "",
        "utilizations",
        "buckets"
      ],
      "query": [
        {
          "key": "from",
          "value": null,
          "disabled": true
        },
        {
          "key": "to",
          "value": null,
          "disabled": true
        }
      ],
      "variable": [
        {
          "key": "AcctNum",
          "value": ""
        }
      ]
    }
  },
  "response": [
  ]
}