Chilkat Online Tools

Go / Anypoint Platform APIs / Get asset version groups Instances (v1 example)

Back to Collection Items

    // This example assumes the Chilkat API to have been previously unlocked.
    // See Global_Ref.html">Global Unlock Sample for sample code.

    http := chilkat.NewHttp()
    var success bool

    // Adds the "Authorization: Bearer {{token}}" header.
    http.SetAuthToken("{{token}}")

    sbResponseBody := chilkat.NewStringBuilder()
    success = http.QuickGetSb("https://domain.com/exchange/api/v2/assets/{{organization_id}}/{{app_Id}}/versionGroups/v1/instances",sbResponseBody)
    if success == false {
        fmt.Println(http.LastErrorText())
        http.DisposeHttp()
        sbResponseBody.DisposeStringBuilder()
        return
    }

    fmt.Println("Response status code = ", http.LastStatus())
    fmt.Println(*sbResponseBody.GetAsString())

    http.DisposeHttp()
    sbResponseBody.DisposeStringBuilder()

Curl Command

curl -X GET
	-H "Authorization: Bearer {{token}}"
https://domain.com/exchange/api/v2/assets/{{organization_id}}/{{app_Id}}/versionGroups/v1/instances

Postman Collection Item JSON

{
  "name": "Get asset version groups Instances (v1 example)",
  "request": {
    "method": "GET",
    "header": [
      {
        "key": "Authorization",
        "value": "Bearer {{token}}",
        "type": "text"
      }
    ],
    "url": {
      "raw": "{{url}}/exchange/api/v2/assets/{{organization_id}}/{{app_Id}}/versionGroups/v1/instances",
      "host": [
        "{{url}}"
      ],
      "path": [
        "exchange",
        "api",
        "v2",
        "assets",
        "{{organization_id}}",
        "{{app_Id}}",
        "versionGroups",
        "v1",
        "instances"
      ]
    }
  },
  "response": [
  ]
}