Entity Information

Data type: Alert, fields list

1. Get single alert by Id

URL: /api/alerts/{alertId}

Where alertId - numeric alert identifier.

Query parameterRequiredTypeDefaultDescription
includechilddivisionsNoTrue/FalseFalseSearch alert from assets in subdivisions

2. Get multiple alerts

URL: /api/alerts

Sort order: reverse chronological (using CreatedOn property)

Query parameterRequiredTypeDefaultDescription
assetIdNoNumeric-

If specified, returns alerts only for this asset

assetIdsNoComma-delimited list of numbers-

Similar to assetId, allows to filter by multiple asset Ids. Can't be used together with assetId query parameter

driverIdNoNumeric-

If specified, returns alerts only for this driver

includechilddivisionsNoTrue/FalseFalseInclude alerts from subdivisions
includedisabledassetsNoTrue/FalseFalseInclude alerts from disabled assets
startdatetimeNoDate/Time-If set, returns only alerts occurred at specified Date/Time or after it. Both UTC and local dates are accepted. Check Dates Handling for details. If value is not set, the Trakopolis API server returns alerts for last 30 days.
enddatetimeNoDate/Time-If set, returns only alerts occurred at specified Date/Time or before it. Both UTC and local dates are accepted. Check Dates Handling for details.
visibleforuseridNoNumeric-If specified, returns only alerts on which user has permissions to view.  Important: this parameter is not applicable for external web applications and mobile applications. See "Alerts filtration by visibility rules" section.
visiblefordriveridNoNumeric-If specified, returns only alerts on which driver has permissions to view.

If both startdatetime and enddatetime are set, return alerts ocurred between startdatetime and enddatetime.

Alerts filtration by visibility rules

/api/alerts request behavior depends on application type.

RequestExternal / Mobile appsPrivateM2M / Web plugins
/api/alertsAlerts visible for current userAll alerts (visibility rules are ignored)
/api/alerts?visibleForDriverId=XAlerts visible for current user OR for specified driver Alerts visible for specified driver
/api/alerts?visibleForUserId=Y400: Bad requestAlerts visible for specified user
/api/alerts?visibleForDriverId=X&visibleForUserId=Y400: Bad requestAlerts visible for specified user OR for specified driver