Work Area API

This feature is only available on Pro+ or Enterprise plans

Overview

This endpoint provides access to the Work Areas on Published Plans for a project.

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. 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://app.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://app.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;

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.

Last updated