💡 This feature is in limited beta. It is currently accessible only to a limited set of users and teams. It will be moving to a wider limited beta phase within Q4 2022. To join the waitlist, please drop us a line at hello@aphex.co

Teams generating plans utilising Map Space Locations generate a unique related dataset of real-world work areas and schedule tasks. Teams can use this location data in any of their external GIS or analytics tools with the Work Area API.

The Work Area API has three components.

Authentication

You can access the Work Area API by querying the endpoint URL for your desired project and providing a valid Token.

Finding your API URL

As a Project Administrator, head to your project in the Aphex Planner app (jump here for navigation guides). From the Integrations page, the API can be enabled.

This will uncover the API URL specific to that project. The URL structure will be;

https://data.aphex.co/work-areas/v1/<your_api_account_id>

Generating Tokens

From the same location you sourced the API URL, a new Token can be created.

Secret Token

You cannot retrieve the token later, so be sure to save it in a secret manager. If you lose the token, you can generate a new one.

Querying the API

To successfully authenticate your request to the API, set the Token in the Query String of the URL.

The example below can be used by replacing the API account ID and Token using those retrieved in the earlier step

https://data.aphex.co/work-areas/v1/<your_api_account_id>/t/<your_token>

Data Model

Valid requests to the API will return a JSON response consistent with the API data model.

The Work Area API Data Model contains the following objects;

Object

Example

Work Area ID

HEntifOafSu297hg3oj8.2IPGEecKYBdwrpxcwXCX

Location Name

Main Site

Location Type

Map Space

Task ID

2IPGEecKYBdwrpxcwXCX

Task Name

Build Wall

Start

2022-06-13 00:00:00+00:00

End

2022-06-14 00:00:00+00:00

Duration

2

Shift

day

Owner Display Name

Elon Musk

Owner Email

e.musk@twitter.com

Subcontractor

SpaceX

WBS Path

12.2.3

WBS Name

Factories

External ID

Aiw9123

Package Code

W-203

Package Name

Internals

Task ID

2IPGEecKYBdwrpxcwXCX

Key Task

False

Limits and Restrictions

The Work Area API has a small number of restrictions and limits to ensure the availability of the system and the security of customer data.

  • Token Management Restrictions: As covered in the Authentication section, requests to the API will only succeed if they follow the correct request structure and include both a valid URL and Token. Tokens are generated individually for a Project, by a user with Project Admin rights.

  • Token Validity Limits: Generated tokens have a maximum lifespan of 3 months to ensure that over time, project data is secure by default. On expiry, or at any time, new tokens can be generated for the project.

  • Publication Limit: To maintain system availability, a Publication Limit exists for the Work Area API. Successful API requests will return up to a maximum of five (5) of the most recent Publications of data.

  • Fair Use Policy: The API endpoint is designed to support periodic (usually weekly) requests from projects. Use of the service outside that threatens the availability of the service for other projects could result in a suspension of the service for the offending project.

Did this answer your question?