Key
A Key is typically a piece of hardware which serves to identify a person operating a unit, and, if necessary, restricts this person from using specific units.
A Key is identified by a unique ID, a name, and various contact details.
URL Structure is:
https://api.trackunit.com/public/Key
GetKey
Will list parameters on a specified access key.
Parameters
Name | Data type | Unit of measurement | Note |
---|---|---|---|
id * | String | N/A | Unique identifier. |
Columns
Name | Data type | Unit of measurement | Nullability | Note |
---|---|---|---|---|
id | String | N/A | FALSE | Unique identifier. |
name | String | N/A | FALSE | Name of key |
serialNumber | String | Hex Key ID | FALSE | |
keyValid | String | time string | FALSE | |
keyExpire | String | time string | FALSE | |
isAdmin | Bool | N/A | FALSE | |
companyName | String | N/a | TRUE | |
email | String | N/A | TRUE | |
mobile | String | N/A | TRUE | |
phone | String | N/A | TRUE | |
note | String | N/A | TRUE | |
expirationDate | DateTime | UTC | TRUE | |
employeeNumber | String | N/A | TRUE | |
units | String[] | N/A | TRUE | |
groups | String[] | N/A | TRUE |
Request (example)
{
"id": "11456"
}
Response
{
"list": [
{
"id": "11456",
"name": "Tom Persson",
"serialNumber": "6200011587691E09",
"keyValid": "60sec",
"keyExpire": "10min",
"isAdmin": false,
"companyName": "Chemnitz Bau- & Materiel",
"note": "",
"expirationDate": "2014-06-30T22:00:00.0000000",
"employeeNumber": "8",
"units": [],
"groups": [
"8820"
]
}
]
}
CreateKey
Will create a new key.
Parameters
Name | Data type | Unit of measurement | Note |
---|---|---|---|
name * | String | N/A | Name of key |
serialNumber * | String | Hex Key ID | |
keyValid | String | Time string | Select between the following string values: 30sec 60sec 90sec |
keyExpire | String | Time string | Select between the following string values: 0sec 15sec 30sec 60sec 2min 5min 10min 15min 30min 1hour 2hours 4hours 8hours 16hours |
isAdmin | Bool | N/A | |
companyName | String | N/A | |
email | String | N/A | |
mobile | String | N/A | |
phone | String | N/A | |
note | String | N/A | |
expirationDate | DateTime | UTC | |
employeeNumber | String | N/A | |
units | String[] | N/A | |
groups | String[] | N/A |
Request (example)
{
"name": "Anton Malmlund",
"serialNumber": "6800801587691F09",
"keyValid": "60sec",
"keyExpire": "10min",
"companyName": "Chemnitz Bau- & Materiel",
"employeeNumber": "21",
"groups": [
"8818"
]
}
Response
{
"id": "11504"
}
UpdateKey
Will update parameters on an existing key.
Parameters
Name | Data type | Unit of measurement | Note |
---|---|---|---|
id * | String | N/A | Unique identifier |
name | String | N/A | Name of key. |
serialNumber | String | Hex Key ID | |
keyValid | String | Time string | Select between the following string values: 30sec 60sec 90sec |
keyExpire | String | Time string | Select between the following string values: 0sec 15sec 30sec 60sec 2min 5min 10min 15min 30min 1hour 2hours 4hours 8hours 16hours |
isAdmin | Bool | N/A | |
companyName | String | N/A | |
email | String | N/A | |
mobile | String | N/A | |
phone | String | N/A | |
note | String | N/A | |
expirationDate | DateTime | UTC | |
employeeNumber | String | N/A | |
addUnits | String[] | N/A | |
removeUnits | String[] | N/A | |
addGroups | String[] | N/A | |
removeGroups | String[] | N/A |
Request (example)
{
"id": "11455",
"name": "John Ericsson",
"serialNumber": "6100001587691E09",
"addGroups": [
"8818"
]
}
Response
{}
DeleteKey
Will delete an existing key.
Parameters
Name | Data type | Unit of measurement | Note |
---|---|---|---|
id * | String | N/A | Unique identifier. |
Request (example)
{
"id": "11455"
}
Response
{}
Updated less than a minute ago