Export Tracking Plan

Export tracking plan using Avo API

2 minute read

The Avo Public API is currently in beta and is not yet in general availability. Reach out to us for access.

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

Endpoint

Url
Copy
1
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

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

Response:

json
Copy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
{
"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": {}
}