The Scheduled Log Exports API lets you set up a recurring export of select device-level data that runs on a daily or hourly basis.
GET/scheduled-exports/logs/subscription/{subscription_id}/job/{job_id}
This endpoint provides a way to get details on the particular job, as long as you know the subscription_id and the job_id. Scheduled exports run at a regular cadence. Each individual run is considered a "job" and has a "job ID".
The relevant job ID.
A persistent ID for the specific subscription.
Export job success response. Returns 400 and 404 on failure — see the response panel for the error shape.
GET/scheduled-exports/logs/subscription/{subscription_id}
This endpoint lets you retrieve the subscription status via the subscription_url provided. Make sure the subscription_status is set to ACTIVE.
Status of aggregate export. Returns 400 and 404 on failure — see the response panel for the error shape.
GET/scheduled-exports/logs/subscriptions
Returns all export subscriptions for an app or organization. See what data is being exported (for example, topic, columns, and filters) and where data is exported to (for example, email addresses, your data center, or a Branch-hosted S3 bucket). Note: You need to provide either app_id or organization_id along with accessToken to execute this operation.
No parameters.
Array of available subscriptions. Returns 400 and 404 on failure — see the response panel for the error shape.
GET/scheduled-exports/logs/subscription/externalId
Branch provides a unique "external ID" for your Branch account. This should be used when setting up data to be exported to your cloud data service (that is, S3). Note: You need to provide either app_id or organization_id along with accessToken to execute this operation.
No parameters.
The ID to be used in the trust relationship of the role that you create to allow Branch to access your S3 bucket. Returns 400 and 404 on failure — see the response panel for the error shape.
POST/scheduled-exports/logs/subscribe
Set up a new scheduled log export subscription. Supported at both the app and organization levels. The result is a subscription that specifies what data will be exported (for example, topic, columns, and filters) and where data will be exported to.
Information about where a finished report is stored and how it can be accessed.
Information about the report that should be generated.
Status of aggregate export. Returns 401, 404, and 500 on failure — see the response panel for the error shape.
POST/scheduled-exports/logs/subscription/{subscription_id}/jobs
Once your subscription is active, you can query for the exported data and download the data via the array export_url. For data accessible via API, the files are stored in Branch's S3 bucket, and you're provided a pre-signed S3 URL for exporting data. Typically, data is accessible via API for 7 days, so be sure to download your data shortly after it's generated.
Unique identifier for the Branch app of the requested data.
The latest date of export job runs to be included. Time zone is UTC. Format: yyyy-MM-dd'T'HH:mm:ssZ.
The earliest date of export job runs to be included. Time zone is UTC. Format: yyyy-MM-dd'T'HH:mm:ssZ.
ID for your subscription. Obtained from the /subscribe path.
OK—returns an array of export jobs. Returns 400 on failure — see the response panel for the error shape.
DELETE/scheduled-exports/logs/subscription/{subscription_id}
Deactivates a single export subscription for a given subscription ID.
Status of aggregate export. Returns 400 and 404 on failure — see the response panel for the error shape.