Add definitions
Description
Creates new alarms with the supplied definitions.
Parameter
The json object with the definitions must be obtained with the method GET template. Example:
{
"definitions" [ 0 ],
"vehicles" [ 0 ],
"vehicleFilters" [ 0 ],
"description": "string",
"type": 0 ,
"normal": {},
"differentFields": [ "string" ],
"licenseClasses": [ "string" ],
"severityLevelId": 0
}
Field | Description |
definitions |
Array of IDs of the definitions.
|
vehicles |
Array of IDs of the vehicles.
|
description |
Description of the definition edit
|
normal |
The json object with the definitions that must be obtained with the method GET template. Check the endpoint Get template for a given alarm type for more details. |
differentFields |
Array of different fields of definition edit (No references).
|
licenseClasses |
IDs of the different license classes.
|
licenseClasses |
IDs of the different license classes.
|
severityLevelId |
The ID of the severity level.
|
Definition Option Parameters
As described the normal field consists in the json object defining the desired alarm. This definitions should be constructed based with the given template. This section presents some configuration options parameters and it's possible values.
Options.ItemsType = Times
Defines a set of possible recurrence intervals. Each value corresponds to a specific time interval.
Value | Description |
---|---|
0 | only-once |
1 | every-day |
2 | every-week |
3 | every-two-weeks |
4 | every-month |
5 | every-two-months |
6 | every-three-months |
7 | every-four-months |
8 | every-six-months |
9 | every-eight-months |
10 | every-year |
11 | every-two-years |
12 | every-three-years |
13 | every-four-years |
14 | every-five-years |
Options.ItemsType = WarningTimes
Defines a set of possible previous warning intervals. Each value corresponds to a specific time interval.
Value | Description |
---|---|
0 | same-day |
1 | one-day |
2 | two-days |
3 | three-days |
4 | one-week |
5 | two-weeks |
6 | one-month |
7 | two-months |
8 | three-months |
Response
The return of this endpoint is an integer value, which identifies the definition that was created.
Response HTTP Codes
200 - OK
- Ok
204 - NoContent
- No content
400 - BadRequest
- Definitions object is null
- Alarm doesn't have license classes
- Authenticated user has expired drivers license
401 - Unauthorized
- Invalid credentials
403 - Forbidden
- User doesn't have Manage Alarms permission