Creating Analytics Space Session

Intro #

When your user wants to access their data in order to run reports or view dashboards, you will have to create an Analytics Space Session.

These sessions are short lived and scoped sessions. Simply create an Analytics Space session and forward the user to the URL in the response.

Create Session #

Request Details
METHOD
GET
URL
https://api.trackzero.io/analyticsSpaces/session

Header Parameters: #

Key Value Description Data Type Required?
X-API-KEY
Your account API Key, for details on how to create an API Key, please check this document.
string
yes

X-API-VERSION

Target API Version. Do not include or use 1.0
string
no

QueryString Parameters: #

Key Value Description Data Type Required?
analyticsSpaceId

The Analytics Space Id to scope to. The session will have limited access to the data in this specific Analytics Space.

string
yes
ttl
The maximum session duration in seconds. The minimum allowed ttl is 300 seconds and the maximum is 14400 seconds.
integer
yes

Response: #

				
					{
	"sessionKey": "eyJJZCI6IjEzMTY5.....Om51bGx9",
	"url": "https://spaces.trackzero.io/session?sessionkey=eyJJZCI6IjEzMTY5.....Om51bGx9",
	"embeddedDashboardUrl": "https://betaspaces.trackzero.io/session?sessionkey=eyJJZCI6IjEzMTY5.....Om51bGx9&headless=true&page=dashboards",
	"embeddedReportsUrl": "https://betaspaces.trackzero.io/session?sessionkey=eyJJZCI6IjEzMTY5.....Om51bGx9&headless=true&page=reports"
}
				
			
Key Value Description
sessionKey

The session key that is used for authorizing the user. This value has no use except to be embedded in the redirect URL or Embed URL.

url

A URL where you can redirect your customer access their own Analytics Space. This URL will remain active for the period specified in the "ttl" of the request.
embeddedDashboardsUrl
This URL can be used in an Tag to embed The Dashboards Page into your own website page. When loaded, TrackZero will not load TrackZero's page navigation bar and will remove all margins and padding around the main content. This provides you with the most flexibility on how to position and display the content of TrackZero.
embeddedReportsUrl
This URL can be used in an Tag to embed The Reports Page into your own website page. When loaded, TrackZero will not load TrackZero's page navigation bar and will remove all margins and padding around the main content. This provides you with the most flexibility on how to position and display the content of TrackZero.

Delete a Session #

Sessions automatically expire and get removed. No action is necessary from your side.