VB6 / Anypoint Platform APIs / Get all assets for organization by Id
Back to Collection Items
' This example assumes the Chilkat API to have been previously unlocked.
' See Global Unlock Sample for sample code.
Dim http As New ChilkatHttp
Dim success As Long
Dim queryParams As New ChilkatJsonObject
success = queryParams.UpdateString("search","")
success = queryParams.UpdateString("types","api-group")
success = queryParams.UpdateString("types","connector")
success = queryParams.UpdateString("types","custom")
success = queryParams.UpdateString("types","example")
success = queryParams.UpdateString("types","extension")
success = queryParams.UpdateString("types","http-api")
success = queryParams.UpdateString("types","policy")
success = queryParams.UpdateString("types","raml-fragment")
success = queryParams.UpdateString("types","rest-api")
success = queryParams.UpdateString("types","soap-api")
success = queryParams.UpdateString("types","template")
success = queryParams.UpdateString("domain","")
success = queryParams.UpdateString("organizationId","{{organization_id}}")
success = queryParams.UpdateString("masterOrganizationId","")
success = queryParams.UpdateInt("offset",0)
success = queryParams.UpdateInt("limit",20)
success = queryParams.UpdateString("sharedWithMe","")
success = queryParams.UpdateString("includeSnapshots","true")
' Adds the "Authorization: Bearer {{token}}" header.
http.AuthToken = "{{token}}"
Dim resp As ChilkatHttpResponse
Set resp = http.QuickRequestParams("GET","https://domain.com/exchange/api/v2/assets",queryParams)
If (http.LastMethodSuccess = 0) Then
Debug.Print http.LastErrorText
Exit Sub
End If
Debug.Print resp.StatusCode
Debug.Print resp.BodyStr
Curl Command
curl -G -d "search="
-d "types=api-group"
-d "types=connector"
-d "types=custom"
-d "types=example"
-d "types=extension"
-d "types=http-api"
-d "types=policy"
-d "types=raml-fragment"
-d "types=rest-api"
-d "types=soap-api"
-d "types=template"
-d "domain="
-d "organizationId=%7B%7Borganization_id%7D%7D"
-d "masterOrganizationId="
-d "offset=0"
-d "limit=20"
-d "sharedWithMe="
-d "includeSnapshots=true"
-H "Authorization: Bearer {{token}}"
https://domain.com/exchange/api/v2/assets
Postman Collection Item JSON
{
"name": "Get all assets for organization by Id",
"request": {
"method": "GET",
"header": [
{
"key": "Authorization",
"value": "Bearer {{token}}",
"type": "text"
}
],
"url": {
"raw": "{{url}}/exchange/api/v2/assets?search=&types=api-group&types=connector&types=custom&types=example&types=extension&types=http-api&types=policy&types=raml-fragment&types=rest-api&types=soap-api&types=template&domain=&organizationId={{organization_id}}&masterOrganizationId=&offset=0&limit=20&sharedWithMe=&includeSnapshots=true",
"host": [
"{{url}}"
],
"path": [
"exchange",
"api",
"v2",
"assets"
],
"query": [
{
"key": "search",
"value": ""
},
{
"key": "types",
"value": "api-group"
},
{
"key": "types",
"value": "connector"
},
{
"key": "types",
"value": "custom"
},
{
"key": "types",
"value": "example"
},
{
"key": "types",
"value": "extension"
},
{
"key": "types",
"value": "http-api"
},
{
"key": "types",
"value": "policy"
},
{
"key": "types",
"value": "raml-fragment"
},
{
"key": "types",
"value": "rest-api"
},
{
"key": "types",
"value": "soap-api"
},
{
"key": "types",
"value": "template"
},
{
"key": "domain",
"value": ""
},
{
"key": "organizationId",
"value": "{{organization_id}}"
},
{
"key": "masterOrganizationId",
"value": ""
},
{
"key": "offset",
"value": "0"
},
{
"key": "limit",
"value": "20"
},
{
"key": "sharedWithMe",
"value": ""
},
{
"key": "includeSnapshots",
"value": "true"
}
]
}
},
"response": [
]
}