Chilkat Online Tools

Xojo / Anypoint Platform APIs / Export api as ZIP

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 Chilkat.Http
Dim success As Boolean

Dim queryParams As New Chilkat.JsonObject
success = queryParams.UpdateString("endpoint","true")
success = queryParams.UpdateString("slaTiers","true")
success = queryParams.UpdateString("cookie","file-download-1619013965103")

// Adds the "Authorization: Bearer {{token}}" header.
http.AuthToken = "{{token}}"

Dim resp As Chilkat.HttpResponse
resp = http.QuickRequestParams("GET","https://domain.com/apimanager/api/v1/organizations/{{organization_id}}/environments/{{environment_id}}/apis/{{api_Id}}/bundle",queryParams)
If (http.LastMethodSuccess = False) Then
    System.DebugLog(http.LastErrorText)
    Return
End If

System.DebugLog(Str(resp.StatusCode))
System.DebugLog(resp.BodyStr)

Curl Command

curl -G -d "endpoint=true"
	-d "slaTiers=true"
	-d "cookie=file-download-1619013965103"
	-H "Authorization: Bearer {{token}}"
https://domain.com/apimanager/api/v1/organizations/{{organization_id}}/environments/{{environment_id}}/apis/{{api_Id}}/bundle

Postman Collection Item JSON

{
  "name": "Export api as ZIP",
  "request": {
    "method": "GET",
    "header": [
      {
        "key": "Authorization",
        "value": "Bearer {{token}}",
        "type": "text"
      }
    ],
    "url": {
      "raw": "{{url}}/apimanager/api/v1/organizations/{{organization_id}}/environments/{{environment_id}}/apis/{{api_Id}}/bundle?endpoint=true&slaTiers=true&cookie=file-download-1619013965103",
      "host": [
        "{{url}}"
      ],
      "path": [
        "apimanager",
        "api",
        "v1",
        "organizations",
        "{{organization_id}}",
        "environments",
        "{{environment_id}}",
        "apis",
        "{{api_Id}}",
        "bundle"
      ],
      "query": [
        {
          "key": "endpoint",
          "value": "true"
        },
        {
          "key": "slaTiers",
          "value": "true"
        },
        {
          "key": "cookie",
          "value": "file-download-1619013965103"
        }
      ]
    }
  },
  "response": [
  ]
}