Oktopost
Analytics

Exports

Access and download exported reports and dashboards from your Oktopost account.

Oktopost allows you to export reports and dashboards in multiple formats: user-friendly formats for sharing with colleagues (PDF, PPT, Excel) or raw data formats for ingestion into external BI systems (CSV). The Exports endpoint provides access to files that have been generated from your Social BI reports and dashboards. Use these endpoints to retrieve export details, download files, and manage your exported reports.

To create new exports, use the Oktopost user interface. This endpoint is for retrieving and accessing previously generated export files.

List Exports

Will return the exports list.

Parameters

ParamDefaultDescription
_page0Current page
_orderstatus,1Options: type, status, dest, last and freq. 0 means descending and 1 means ascending
status-Options: active, inactive

Example Request

curl -i https://api.oktopost.com/v2/bi-export

Example Response

{
	"Result": true,
	"Exports": [
		{
			"Id": "032XXXXXXXXXXXX",
			"DestinationType": "email",
			"Destination": {
				"Email": "john.doe@acme.com",
				"FirstName": "John",
				"LastName": "Doe"
			},
			"Type": "Posts",
			"Frequency": "Every day at 10:00 AM",
			"TimeRange": "Last 30 Days",
			"Status": "active"
		}
	],
    "Total": 30
}

Example Destinations

// azure
{
    "AccountName": "Acme",
    "Container": "AcmeContainer"
},
// email
{
    "Email": "john.doe@acme.com",
    "FirstName": "John",
    "LastName": "Doe"
},
// FTP
{
    "Host": "acme.com",
    "Port" :21,
    "Timeout" :10,
    "Directory": "path/to/destination",
    "Username": "",
    "Password": ""
},
// SFTP
{
    "Host": "acme.com",
    "Port" :21,
    "Timeout" :10,
    "Directory": "path/to/destination",
    "Username": "",
    "Password": ""
},
// S3_bucket
{
    "BucketName": "AcmeBucket",
    "Path": "path/to/destination"
}

Get Export

Will return the metadata for a single export and a temp link to download the last file.

Example Request

curl -i https://api.oktopost.com/v2/bi-export/032XXXXXXXXXXXX

Example Response

{
	"Result": true,
	"Export": {
		"Id": "032XXXXXXXXXXXX",
		"DestinationType": "Email",
		"Destination": {
			"Email": "john.doe@acme.com",
			"FirstName": "John",
			"LastName": "Doe"
		},
		"Type": "Posts",
		"Frequency": "Every day at 10 AM",
		"TimeRange": "Last 30 Days",
		"Status": "inactive",
		"LastRunDate": "2020-07-27 08:31:45",
		"LastRunFile": "https://com-oktopost-bi-export.s3.amazonaws.com/001XXXXXXXXXXXX/..."
	}
}