On this page

This guide outlines how to connect to and use the legacy version of the Incident Tracker API. It includes instructions for authenticating, viewing data, querying by parameters, and searching using Postman.


Before You Begin#

Legacy API access is available to customers with an API key. If you don't have a legacy API key, contact your Incident Tracker representative.


Authentication#

Endpoint#

POST https://itapi.incident-tracker.com/api/v1/token

Instructions#

  1. In Postman, click New Request.
  2. Set the method to POST.
  3. Paste the URL above into the request field.
  4. Select the Body tab.
  5. Choose raw, then JSON from the dropdown.
  6. Enter your API key as follows:
{
  "apikey": "abc123-xxxx-xxxx-xxxx-abcd1234xxxx"
}
  1. Click Send.

Expected Response#

You will receive a long token string under the token property.


Using the Token#

To use the token:

  1. Copy the token value from the response (excluding quotes).
  2. Create a new GET request in Postman.
  3. Go to the Authorization tab.
  4. Change the Type to Bearer Token.
  5. Paste the token in the Token field.

Routes Overview#

Method Path Description
GET /api/v1/incident Return a paginated list of incidents
GET /api/v1/incident/{id} Return a single incident by ID
GET /api/v1/incident/total Return the total number of incidents
POST /api/v1/incident/search Search for incidents based on field values

Query string is supported on GET endpoints.


Query Parameters#

Add these as query strings in your GET request:

  • pagesize β€” default 20, max 100
  • pageset β€” default 1
  • sort β€” recent or oldest (default: oldest)

Example Request:#

GET https://itapi.incident-tracker.com/api/v1/incident/?pagesize=50&pageset=1&sort=recent

View a Single Incident#

To retrieve a specific incident:

GET https://itapi.incident-tracker.com/api/v1/incident/{incident_id}

Replace {incident_id} with the ID you want to retrieve.

Example JSON Response:#

{
  "incident_id": 14,
  "reported_by_name": "John Doe",
  "date_of_report": "2015-01-21T00:00:00",
  "date_of_incident": "2015-01-21T00:00:00",
  "location_name": "Building 1",
  "sublocation_name": "First Floor",
  "room_name": "Room 105",
  "description": "Lorem Ipsum is simply dummy text...",
  "status_name": "Closed",
  "assigned_to_name": "un-assigned",
  "categories": [
    {
      "category": "Accident",
      "subcategories": ["First-aid"]
    }
  ],
  "notes": [
    {
      "note_author_name": "Jane Doe",
      "note": "Test notes go here"
    }
  ]
}

Searching for Incidents#

Send a POST request to:

POST https://itapi.incident-tracker.com/api/v1/incident/search

Sample Search Body:#

{
  "culture": "en-us",
  "date_of_report_start": "01/01/2023",
  "date_of_report_end": "12/31/2023",
  "location_name": "Building 1",
  "status_name": "Open"
}

Operator Fields (used for duration and attachments):#

Use these values in the duration_operator and attached_file_count_operator fields of the search body.

Operator Name Value
equal 0
less_than 1
greater_than 2
less_than_or_equal 3
greater_than_or_equal 4