Back to Collection Items
// This example assumes the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.
loHttp = createobject("CkHttp")
loHttp.SetRequestHeader("X-ANYPNT-ENV-ID","{{environment_id}}")
// Adds the "Authorization: Bearer {{token}}" header.
loHttp.AuthToken = "{{token}}"
loHttp.SetRequestHeader("X-ANYPNT-ORG-ID","{{organization_id}}")
loSbResponseBody = createobject("CkStringBuilder")
llSuccess = loHttp.QuickGetSb("https://domain.com/cloudhub/api/mule-versions",loSbResponseBody)
if (llSuccess = .F.) then
? loHttp.LastErrorText
release loHttp
release loSbResponseBody
return
endif
? "Response status code = " + str(loHttp.LastStatus)
? loSbResponseBody.GetAsString()
release loHttp
release loSbResponseBody
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/cloudhub/api/mule-versions
Postman Collection Item JSON
{
"name": "Get mule-version",
"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}}/cloudhub/api/mule-versions",
"host": [
"{{url}}"
],
"path": [
"cloudhub",
"api",
"mule-versions"
]
}
},
"response": [
]
}