Skip to content
English
  • There are no suggestions because the search field is empty.

Frontline EHS API Guide

What is an API?

An API (Application Programming Interface) is a secure way for two systems to “talk” to each other.

For example, a GPS app on your phone shows live traffic because it connects to a traffic data system through an API. The app requests information, and the system responds with data your phone can display.

About Frontline EHS API's:

Frontline Data Solutions provides a RESTful API that allows clients to:

  • Retrieve site data programmatically

  • Integrate with external systems (e.g., BI tools, reporting systems)

  • Build custom dashboards and data visualizations

  • Automate reporting processes

All API responses are returned in JSON format, which is a standard format used by most reporting and analytics tools.

Getting Started:

Step 1: Request an API Key

To access the API, you must first obtain an API Key.

Email: support@fldata.com

Frontline Support will generate your API Key and provide any necessary guidance.

Step 2: Locate Your API Key (Admins Only)

Site Administrators can access API key information within the application:

LMS > Settings > EHS API

If you do not see this option, contact Frontline Support.

Step 3: Base URL & Documentation

Base API URL: https://ehsapi.fldata.com/api/v1

Interactive API Documentation (Swagger): https://ehsapi.fldata.com/swagger/index.html

    • View available endpoints

    • See required parameters

    • Test API calls directly in your browser

Authorizing Your API Requests

All API requests require authentication. You can authenticate in one of two ways:

Option 1 – Query Parameter (Common for Browser Testing)

Add your API key directly to the URL:

https://ehsapi.fldata.com/api/v1/Divisions/?ApiKey=YOUR_API_KEY

This method is commonly used for testing or quick data pulls.

Option 2 – Authorization Header (Recommended for Integrations)

Include the following header in your API request:

Authorization: Bearer YOUR_API_KEY

This method is preferred for system-to-system integrations.

 

Making API Calls & Using Filters

The Frontline API allows you to filter results directly in the URL. This makes it possible to test requests in a standard web browser or configure filters in reporting tools and integrations.

This filtering structure is a work in progress and may be updated over time.

How Filtering Works

All filters are passed through the URL query string using the filter= parameter.

Filter Structure

Each filter contains three parts, separated by pipes (|): FieldName | Operator | Value

Format: 

https://<base_api_url>/<endpoint>?apikey=<apikey>&filter-<field>|<operator>|<value>

Example: 

https://ehsapi.fldata.com/api/v1/users?apikey=12345&filter=lastname|eq|Smith

This request returns all users with the last name Smith.

Multiple Filters

Multiple filters are separated by semi-colons (;).

When more than one filter is used, they are automatically combined using AND logic.

Format:

filter=<field1>|<operator>|<value1>;<field2>|<operator>|<value2>

Example:

https://ehsapi.fldata.com/api/v1/users?apikey=12345&filter=lastname|eq|Smith;birthday|lt|2001-01-01

If today’s date were 2022-01-01, this request would return:

Users with the last name Smith AND who are 21 years or older

Available Operators

The following operators are supported:

Operator Meaning
eq Equal
ne Not equal
gt Greater than
gtw Greater than or equal to
lt Less than
lte Less than or equal to
in Matches any value in a comma-separated list
notin Excludes values in a comma-separated list
contains Searches for text within a field
startswith Matches beginning characters
endswith Matches ending characters
Additional Examples
  • Find users with a first name of John or Jane
    • filter=firstname|in|John,Jane
  • Find users whose first name is NOT John or Jane
    • filter=firstname|notin|John,Jane
  • Find MOCs completed in Q1 of 2022
    • filter=completedOn|gte|2022-01-01;completedOn|lte|2022-03-31;status|eq|closed
Key Points to Remember
  • Filters are always passed in the URL query string.

  • Multiple filters are separated by semicolons.

  • Multiple filters are always combined using AND logic.

  • Values for in and notin must be comma-separated.

  • Date formats should follow standard ISO format: YYYY-MM-DD.

API Standards & Requirements

The Frontline API follows these standards:

  • The API is versioned (currently v1).

  • The API is fully documented via Swagger.

  • All requests are RESTful.

  • The API does not require a web server session.

  • Clients must authenticate to access data.

  • Frontline can revoke or regenerate API keys at any time if needed.

  • All responses are returned in JSON format.

Dataset Paging (Large Data Sets)

For endpoints that return large datasets, paging is required.

Paging allows you to retrieve data in smaller, manageable sets instead of pulling everything at once.

Endpoints that support paging:

  • Allow you to set the number of items per page.

  • Allow you to choose which page to retrieve.

  • Enforce a maximum number of records per page.

If you request more records than the maximum allowed, the API will automatically return only the maximum permitted amount.

This protects system performance and ensures consistent response times.

Error Handling

The API uses standard HTTP response codes.

Examples:

  • 200 – Success

  • 400 – Bad Request (invalid parameters)

  • 401 – Unauthorized (invalid or missing API key)

  • 404 – Not Found

  • 5XX – Server Error

Error responses include helpful messages to guide you in correcting the issue.

For internal monitoring and security:

All unhandled exceptions (5XX errors) are logged centrally and include:

  • The raw API request

  • The authenticated user

  • The error message

  • The stack trace

Security & Authentication

Clients must authenticate to use the API.

If API keys are used:

  • Keys can be revoked at any time.

  • Keys can be regenerated if compromised.

  • Access should be restricted to authorized personnel only.

If your organization requires a specific authentication method, please contact Frontline Support to discuss implementation options.