Chilkat Online Tools

TCL / WAC API / Get Utilizations for a Specific Bucket

Back to Collection Items

load ./chilkat.dll

# This example assumes the Chilkat API to have been previously unlocked.
# See Global Unlock Sample for sample code.

set http [new_CkHttp]

CkHttp_SetRequestHeader $http "Authorization" "{{WACApiKey}}"

set sbResponseBody [new_CkStringBuilder]

set success [CkHttp_QuickGetSb $http "https://domain.com/v1/accounts/:AcctNum/utilizations/buckets/:bucket" $sbResponseBody]
if {$success == 0} then {
    puts [CkHttp_lastErrorText $http]
    delete_CkHttp $http
    delete_CkStringBuilder $sbResponseBody
    exit
}

puts "Response status code = [CkHttp_get_LastStatus $http]"
puts [CkStringBuilder_getAsString $sbResponseBody]

delete_CkHttp $http
delete_CkStringBuilder $sbResponseBody

Curl Command

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

Postman Collection Item JSON

{
  "name": "Get Utilizations for a Specific Bucket",
  "request": {
    "method": "GET",
    "header": [
      {
        "key": "Authorization",
        "value": "{{WACApiKey}}",
        "type": "text"
      }
    ],
    "url": {
      "raw": "{{baseURL}}/v1/accounts/:AcctNum/utilizations/buckets/:bucket",
      "host": [
        "{{baseURL}}"
      ],
      "path": [
        "v1",
        "accounts",
        ":AcctNum",
        "utilizations",
        "buckets",
        ":bucket"
      ],
      "variable": [
        {
          "key": "AcctNum",
          "value": null
        },
        {
          "key": "bucket",
          "value": null
        }
      ]
    }
  },
  "response": [
  ]
}