Back to Collection Items
Use ChilkatAx-win32.pkg
Procedure Test
Handle hoHttp
Boolean iSuccess
Variant vQueryParams
Handle hoQueryParams
Variant vResp
Handle hoResp
String sTemp1
Integer iTemp1
Boolean bTemp1
// This example assumes the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.
Get Create (RefClass(cComChilkatHttp)) To hoHttp
If (Not(IsComObjectCreated(hoHttp))) Begin
Send CreateComObject of hoHttp
End
Get Create (RefClass(cComChilkatJsonObject)) To hoQueryParams
If (Not(IsComObjectCreated(hoQueryParams))) Begin
Send CreateComObject of hoQueryParams
End
Get ComUpdateString Of hoQueryParams "ascending" "true" To iSuccess
Get ComUpdateString Of hoQueryParams "filter" "all" To iSuccess
Get ComUpdateInt Of hoQueryParams "limit" 10 To iSuccess
Get ComUpdateString Of hoQueryParams "literalMatch" "true" To iSuccess
Get ComUpdateInt Of hoQueryParams "offset" 0 To iSuccess
Get ComUpdateString Of hoQueryParams "sort" "name" To iSuccess
Get ComUpdateString Of hoQueryParams "targetAdminSite" "true" To iSuccess
// Adds the "Authorization: Bearer {{token}}" header.
Set ComAuthToken Of hoHttp To "{{token}}"
Get pvComObject of hoQueryParams to vQueryParams
Get ComQuickRequestParams Of hoHttp "GET" "https://domain.com/apiplatform/repository/v2/organizations/{{organization_id}}/applications" vQueryParams To vResp
If (IsComObject(vResp)) Begin
Get Create (RefClass(cComChilkatHttpResponse)) To hoResp
Set pvComObject Of hoResp To vResp
End
Get ComLastMethodSuccess Of hoHttp To bTemp1
If (bTemp1 = False) Begin
Get ComLastErrorText Of hoHttp To sTemp1
Showln sTemp1
Procedure_Return
End
Get ComStatusCode Of hoResp To iTemp1
Showln iTemp1
Get ComBodyStr Of hoResp To sTemp1
Showln sTemp1
Send Destroy of hoResp
End_Procedure
Curl Command
curl -G -d "ascending=true"
-d "filter=all"
-d "limit=10"
-d "literalMatch=true"
-d "offset=0"
-d "sort=name"
-d "targetAdminSite=true"
-H "Authorization: Bearer {{token}}"
https://domain.com/apiplatform/repository/v2/organizations/{{organization_id}}/applications
Postman Collection Item JSON
{
"name": "Get all applications",
"request": {
"method": "GET",
"header": [
{
"key": "Authorization",
"value": "Bearer {{token}}",
"type": "text"
}
],
"url": {
"raw": "{{url}}/apiplatform/repository/v2/organizations/{{organization_id}}/applications?ascending=true&filter=all&limit=10&literalMatch=true&offset=0&sort=name&targetAdminSite=true",
"host": [
"{{url}}"
],
"path": [
"apiplatform",
"repository",
"v2",
"organizations",
"{{organization_id}}",
"applications"
],
"query": [
{
"key": "ascending",
"value": "true"
},
{
"key": "filter",
"value": "all"
},
{
"key": "limit",
"value": "10"
},
{
"key": "literalMatch",
"value": "true"
},
{
"key": "offset",
"value": "0"
},
{
"key": "sort",
"value": "name"
},
{
"key": "targetAdminSite",
"value": "true"
}
]
}
},
"response": [
]
}