Chilkat Online Tools

TCL / Anypoint Platform APIs / Get all conditional assignments

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]

set queryParams [new_CkJsonObject]

CkJsonObject_UpdateString $queryParams "intent" "role_assignment"

# Adds the "Authorization: Bearer {{token}}" header.
CkHttp_put_AuthToken $http "{{token}}"

# resp is a CkHttpResponse
set resp [CkHttp_QuickRequestParams $http "GET" "https://domain.com/accounts/api/cs/conditionalAssignments" $queryParams]
if {[CkHttp_get_LastMethodSuccess $http] == 0} then {
    puts [CkHttp_lastErrorText $http]
    delete_CkHttp $http
    delete_CkJsonObject $queryParams
    exit
}

puts [CkHttpResponse_get_StatusCode $resp]
puts [CkHttpResponse_bodyStr $resp]
delete_CkHttpResponse $resp


delete_CkHttp $http
delete_CkJsonObject $queryParams

Curl Command

curl -G -d "intent=role_assignment"
	-H "Authorization: Bearer {{token}}"
https://domain.com/accounts/api/cs/conditionalAssignments

Postman Collection Item JSON

{
  "name": "Get all conditional assignments",
  "request": {
    "method": "GET",
    "header": [
      {
        "key": "Authorization",
        "value": "Bearer {{token}}",
        "type": "text"
      }
    ],
    "url": {
      "raw": "{{url}}/accounts/api/cs/conditionalAssignments?intent=role_assignment",
      "host": [
        "{{url}}"
      ],
      "path": [
        "accounts",
        "api",
        "cs",
        "conditionalAssignments"
      ],
      "query": [
        {
          "key": "intent",
          "value": "role_assignment"
        }
      ]
    }
  },
  "response": [
  ]
}