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

NameData typeUnit of measurementNote
id *StringN/AUnique identifier.

Columns

NameData typeUnit of measurementNullabilityNote
idStringN/AFALSEUnique identifier.
nameStringN/AFALSEName of key
serialNumberStringHex Key IDFALSE
keyValidStringtime stringFALSE
keyExpireStringtime stringFALSE
isAdminBoolN/AFALSE
companyNameStringN/aTRUE
emailStringN/ATRUE
mobileStringN/ATRUE
phoneStringN/ATRUE
noteStringN/ATRUE
expirationDateDateTimeUTCTRUE
employeeNumberStringN/ATRUE
unitsString[]N/ATRUE
groupsString[]N/ATRUE

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

NameData typeUnit of measurementNote
name *StringN/AName of key
serialNumber *StringHex Key ID
keyValidStringTime stringSelect between the following string values: 30sec 60sec 90sec
keyExpireStringTime stringSelect between the following string values: 0sec 15sec 30sec 60sec 2min 5min 10min 15min 30min 1hour 2hours 4hours 8hours 16hours
isAdminBoolN/A
companyNameStringN/A
emailStringN/A
mobileStringN/A
phoneStringN/A
noteStringN/A
expirationDateDateTimeUTC
employeeNumberStringN/A
unitsString[]N/A
groupsString[]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

NameData typeUnit of measurementNote
id *StringN/AUnique identifier
nameStringN/AName of key.
serialNumberStringHex Key ID
keyValidStringTime stringSelect between the following string values: 30sec 60sec 90sec
keyExpireStringTime stringSelect between the following string values: 0sec 15sec 30sec 60sec 2min 5min 10min 15min 30min 1hour 2hours 4hours 8hours 16hours
isAdminBoolN/A
companyNameStringN/A
emailStringN/A
mobileStringN/A
phoneStringN/A
noteStringN/A
expirationDateDateTimeUTC
employeeNumberStringN/A
addUnitsString[]N/A
removeUnitsString[]N/A
addGroupsString[]N/A
removeGroupsString[]N/A

Request (example)

{
  "id": "11455",
  "name": "John Ericsson",
  "serialNumber": "6100001587691E09",
  "addGroups": [
    "8818"
  ]
}

Response

{}
 

DeleteKey

Will delete an existing key.

Parameters

NameData typeUnit of measurementNote
id *StringN/AUnique identifier.

Request (example)

{
    "id": "11455"
}

Response

{}