Skip to main content

GET - Incident creation configuration

Returns one consistent snapshot of the effective Incident creation form: field visibility, requirements, defaults, fixed priorities, active Types, and their Categories.

Call this endpoint before building a creation form or validating an offline Incident. Field requirements are configuration-dependent and cannot be inferred from the base request schema alone.

Request

  • Method: GET
  • Endpoint: /incidents/creation-configuration
  • Operation ID: get-incident-creation-configuration
ParameterRequiredDescription
locationIdnoLocation used to select the most specific creation profile

Organization External API keys are evaluated with the OWNER role. locationId still affects location-specific profile selection.

GET https://api.targpatrol.com/api/v1/incidents/creation-configuration?locationId=20553a15-51df-4266-88c2-1067c2d1f0e8
x-api-key: {your_external_api_key}

Response

200 OK

{
"configVersion": 7,
"profileId": "7f5ef7d5-23dd-4f38-b1ec-7d9be7e2c2ad",
"profileName": "Default incident form",
"priorities": ["MINOR", "NORMAL", "MAJOR", "CRITICAL"],
"fieldRules": [
{
"id": "8ab4c4d1-b3e2-4daa-94f0-c65bbdc0274e",
"field": "NAME",
"fieldMode": "EDITABLE",
"required": true,
"defaultValue": null,
"defaultValues": null,
"externalId": null
},
{
"id": "1588430b-ce84-4f85-b94c-985b7d94022a",
"field": "TAGS",
"fieldMode": "EDITABLE",
"required": false,
"defaultValue": null,
"defaultValues": ["safety"],
"externalId": null
},
{
"id": "c51376f7-b75e-4f2d-8844-3b38f3bf4ec2",
"field": "GPS_COORDINATES",
"fieldMode": "EDITABLE",
"required": false,
"defaultValue": null,
"defaultValues": null,
"externalId": null
}
],
"types": [
{
"id": "b419c511-a4ac-4904-b836-632b3fd6d9a4",
"name": "Facility",
"description": "Facility-related Incidents",
"categories": [
{
"id": "ca284c13-10bc-4318-9ca2-e77705512425",
"name": "Damage",
"description": "Damage to the facility"
}
]
}
]
}

field can be NAME, DESCRIPTION, TYPE, CATEGORY, PRIORITY, LOCATION, POINT, ASSIGNEE, OCCURRED_AT, TAGS, or GPS_COORDINATES. fieldMode is EDITABLE, READ_ONLY, or HIDDEN.

defaultValue stores scalar defaults as strings. Reference defaults are UUIDs, priority uses an Incident priority value, and OCCURRED_AT uses an ISO 8601 date-time. defaultValues is used for TAGS.

GPS_COORDINATES is a composite field backed by latitude and longitude. It has no default value. When it is required, both coordinate values must be present.

Other responses: 401 Unauthorized, 404 Not Found, 500 Internal Server Error.