Reference
Avo Public API
Export Tracking Plan

Export Tracking Plan

Export tracking plan using Avo API

The Export API gives you the possibility to export your Avo tracking plan as JSON Schema from any branch.

Endpoint

https://api.avo.app/workspaces/:workspaceId/branches/:branchId/export/v1

:workspaceId is the ID of your workspace. You'll find it in the URL of your avo tab after /schemas/. :branchId is the ID of the branch you want to export. If you open a branch in Avo you can find it in the URL after /branches/. For the main branch simply use main. Note that the branch id is not the same as the branch name.

Returns a Json payload representation of your tracking plan.

Authentication

This endpoint requires an authorization header containing a Base64 encoded service account name and secret.

Rate Limit

We currently soft-enforce 1/req/s rate limit per service account for this endpoint. Please reach out to us if you have a use case in mind that requires a higher rate limit.

Parameters

- workspaceId

Locate your workspaceId in the URL avo.app/schemas/:workspaceId

- BranchId

Locate your branchId by switching onto the branch and checking the URL

  • avo.app/schemas/:workspaceId/branches/:branchId
  • For the main branch, use main as the ID

- Base64 encoding secret header

The base64 encoded token expects name:secret

See more on authorization

Example Usage

Request

$ curl -H "authorization: Basic <Base64 encoded token>" -X GET https://api.avo.app/workspaces/:workspaceId/branches/main/export/v1

Response:

{
  "name": "Avo's Tracking Plan:main",
  "events": [
    {
      "id": "-PHsAi6jC6",
      "name": "my_event",
      "description": "Event description",
      "triggers": [],
      "tags": ["Tag1"],
      "categories": [],
      "sources": [
        {
          "id": "5GHrzRFAb",
          "name": "web_source",
          "implementWithCodegen": true,
          "destinations": [{ "id": "hvCvaCl5H" }]
        }
      ],
      "rules": {
        "$schema": "http://json-schema.org/draft-06/schema#",
        "type": "object",
        "required": ["properties", "nameMapping"],
        "nameMapping": [],
        "properties": {
          "properties": {
            "type": "object",
            "properties": {
              "my_property": {
                "id": "cem9e4kyn",
                "index": 0,
                "description": "Property description",
                "nameMapping": [],
                "type": "string"
              }
            },
            "additionalProperties": false,
            "required": ["my_property"]
          }
        }
      }
    }
  ],
  "metrics": {},
  "sources": {
    "5GHrzRFAb": {
      "id": "5GHrzRFAb",
      "name": "web_source",
      "programmingLanguage": null,
      "developmentPlatform": "Web",
      "destinations": ["hvCvaCl5H"]
    }
  },
  "destinations": {
    "hvCvaCl5H": {
      "id": "hvCvaCl5H",
      "name": "webhook_destination",
      "type": "Custom"
    }
  },
  "categories": {}
}