Robin's Analytics API

Requirements

  • Advanced Analytics

Should I use the generic or Analytics API?

 The Analytics API is best used to report and monitor changes in office utilization. If you want to understand office utilization in the past, our Analytics API provides the historical records of this data. However, if you want to integrate with other office-related apps or simply gather data on the inventory of desks and spaces that you currently have, you can leverage our generic Robin API. 

The Analytics API is denormalized, which means you can request all data necessary in one request (e.g., get my reservation, user, desk, location, building, etc.), while the generic API is normalized, requiring you to make separate requests for each type of data (e.g., get my reservations, get the associated desks, then get the associated users, etc.).

Robin’s Analytics API gives developers or users with basic programming skills the power to retrieve desk and space analytics data and build custom reporting in their third-party business intelligence tools. Robin's Analytics API enables you to:

  • Build custom dashboards with your preferred analytics tool (like PowerBI, Looker, or Tableau).

  • Schedule and automate reports.  

  • Easily share insights with the leadership team as they decide on hybrid work strategies.

Bringing Robin's data into your preferred analytics tool is a multi-step process: 

Step 1: Use the Analytics API to generate and download data as a CSV.

Step 2: Import the downloaded CSV data into your preferred data warehouse or BI tool. Here are some examples:

Step 3: Connect your data warehouse to your preferred BI tool (this step can happen before or after steps 1 or 2).

Step 4: Explore data in your BI tool

Optional: Use API endpoint to build and define your scheduling/automation process to your warehouse. If you wish to do this on a regular basis, you could run the code you used in step 1 using a task scheduler, such as Cron.

Guidelines

Requesting data on an ongoing basis:

  • Make single-day export creation requests (POST) each day to capture the previous day’s data.

  • GET requests to retrieve the generated export after the creation request should poll at 10-second or greater intervals. See the GET endpoint below for more information.

Error handling:

  • 400 - if there are problems relating to the input parameters

  • 429 - if the request rate exceeds the prescribed limit.

    • 30 POSTs per minute

We reserve the right to make additive changes to the data returned. Existing columns will not be removed, but new ones may be added. Your code should be flexible enough to not fail if additional data is returned.

 

Authentication

Please see our API documentation over at https://docs.robinpowered.com/docs to get an understanding of how our REST API works with Authentication etc., and generate a token for your organization.

Usage

Below, you will find POST and GET methods. You will end up calling both. The POST tells Robin that you would like data prepared for download. This is an asynchronous request and returns an export ID.

Next, call the single shared GET endpoint with the export ID from the POST request. You'll receive 404 responses until the data is ready. Once the data is ready, you'll receive a 20x status and the CSV data in the response. These GET calls should be made at 10-second intervals. 

Export API

Requests

Each export has a slightly different endpoint as described below. Exports are returned as CSV files. Columns are generally not removed from the exports but may be added or moved.

Request organization events export:

POST https://api.robinpowered.com/v1.0/insights/exports/organizations/[:id]/spaces

This retrieves all events scheduled in Robin spaces within the specified time range. 

Parameters:

Property

Type

Description

from

ISO8601 timestamp

Starting date of the export in UTC.

e.g. 2022-12-05T00:00:00-04:00

to

ISO8601 timestamp

Ending date of the export in UTC.
e.g. 2022-12-06T00:00:00-04:00

location_ids (optional)

Array of ints

List of location IDs that you want the export to cover. Location IDs can be discovered by using this API call.

Defaults to all locations.

Headers:

Content-type: application/json

Example Body:

{
"from": "2022-12-05T00:00:00-04:00",
"to": "2022-12-06T00:00:00-04:00"
}

 Example Response:

{
"meta": {
"status_code": 202,
"status": "ACCEPTED",
"message": "",
"more_info": {},
"errors": []
},
"data": {
"export_id": "6239b88d-9cf6-47a9-9dd3-95f3b0fbdba2",
"report_id": "6239b88d-9cf6-47a9-9dd3-95f3b0fbdba2"
}
}

 

Request organization desks export:

POST https://api.robinpowered.com/v1.0/insights/exports/organizations/[:id]/desks

This requests all desk assignments and reservations within the specified time range.

Parameters:

Property

Type

Description

from

ISO8601 timestamp

Starting date of the export in UTC.
e.g. 2022-12-05T00:00:00-04:00

to

ISO8601 timestamp

Ending date of the export in UTC.
e.g. 2022-12-06T00:00:00-04:00

location_ids (optional)

Array of ints

List of location IDs that you want the export to cover. Location IDs can be discovered by using this API call.

Defaults to all locations.

Headers:

Content-type: application/json

Example Body:

{
"from": "2022-12-05T00:00:00-04:00",
"to": "2022-12-06T00:00:00-04:00"
}

Example Response:

{
"meta": {
"status_code": 202,
"status": "ACCEPTED",
"message": "",
"more_info": {},
"errors": []
},
"data": {
"export_id": "6239b88d-9cf6-47a9-9dd3-95f3b0fbdba2",
"report_id": "6239b88d-9cf6-47a9-9dd3-95f3b0fbdba2"
}
}

Request and download an export:

GET https://api.robinpowered.com/v1.0/insights/exports/[:id]

Use the `export_id` returned in the previous responses as the identifier. You'll have to poll this endpoint until it no longer throws a 4XX error. 

** Polling should be done at 10 second or greater intervals.**

Event Export Fields:

Organization
Building
Floor
Space
Space ID
Event ID
Event Status
Created At (UTC)
Updated At (UTC)
All Day Event
Title
Is Recurring
Capacity
Invited People
Attendees
Location
Started At (UTC)
Ended At (UTC)
Minute Duration
Checked In At (UTC)
Minutes Delayed
Automatically Unbooked At (UTC)
Creator Robin ID
Creator Robin Name
Creator Department
Creator Groups
Creator Robin Email
Created By Email
Host Robin ID
Host Robin Name
Host Department
Host Groups
Host Robin Email
Hosting Calendar Email
Local Creator ID
Local Creator Email
Cancellation Type

Desk Export Fields:

Organization
Building
Floor
Desk Group
Desk ID
Desk Name
Reservation ID
Series ID
Type
Start (UTC)
End (UTC)
Hour Duration
Checked In At (UTC)
Canceled At (UTC)
Cancellation Type
Creator Name
Creator Department
Creator Groups
Creator Email
Assignee Name
Assignee Department
Assignee Groups
Assignee Email
Desk Type
Bookable On Unassigned Days

 

 

Note!

In case of custom integrations, keep in mind that export categories are subject to change and will be added to in the future.

Did this article help?