Valuekeep DevelopmentTransversal
DevelopmentTransversal
Transversal
Back | List of Articles

How to get the tools an employee has access to?

Last changed in 27/12/2024

It is possible to use a method to return the list of tools and their access level to which the employee has permission.

Method

The method returns the tool list and the access level the employee can access.
The method to be used to get the tool list and the access level the employee can access is: GET  /api/mytenant/myorganization/settings/assetsByUsers/getToolsByUser?username=[email protected]m&modifiedOn=2020-11-20T09:55:33.396836+00:00&maxRecords=100
The method parameters are optional. If the parameter maxRecords is not specified, it returns a maximum of 100 records. The logic is the following:
  • username: returns all tools this employees has access to, this parameter should be the employee email.
  • modifiedOn: returns all tools changed with a date after the introduced date.
  • maxRecords: this parameter is used to place a limit to the data to be obtained. This parameter must be an integer, equal or inferior to 100.
The server returns a HttpStatusCode.OK response, with the tool list and its access levels.
The method data structure is the following:
"accessLevels":
[

{


"accessLevelId": "c1474504-aa6c-4a5c-b9c8-fa302195e3c7",


"accessLevel": "G", 


"acessLevelModifiedOn":"2020-11-20T09:55:33.396836+00:00"

}

],

"equipmentKey":
"MCH01",

"description":
"Machine #1",

"id":
"4133d120-7339-44b5-bafc-aad754f35f49",

"isActive":
true,

"modifiedOn":
"2020-11-20T09:55:33.396836+00:00",

"isUpTime":
true,

"criticality":
000002,

"barcode":
null,

"locationDesc":
"Production Line #1",

"location":
"PROD01",

"serial":
"IU786TGFDE58",

"responsible":
0001,

"brandDesc":
"ASPECTTO",

"brand":
"ASPECTTO",

"brandModelDesc":
"TU4528",

"brandModel":
"TU4528",

"familyDesc":
Machine,

"family":
0001,

"parentEquipment":
null,

"parentEquipmentDesc":
null,

2.     "externalReferencID":
null,

"picture":
"null",

"pictureThumbnail":
null,

"remarks":
null,

"keyword":
"Hand Drill",

"exchangeRateDate":
"0001-01-01T00:00:00",

"exchangeRate":
0.0,

"baseCurrency":
null,

"company":
"Demonstration Company",

"isDisposed":
false,

"currency":
"British pound",

"reportingCurrency":
null

}
On the modifiedOn parameter you must consider the html encoding, the "+" is replaced by "%2b".
Note: If the inserted date on the "modifiedOn" search parameter is superior or equal to the "acessLevelModifiedOn" date, it will present the value "0001-01-01T00:00:00+00:00".
Bookmark or share this article
Esta página foi útil?
Obrigado pelo seu voto.
Related Articles
How to create or delete a maintenance plan? How to get the list of maintenance plans? How to create or delete a miscellaneous cost type? How to get the list of miscellaneous cost types? How to create or delete a miscellaneous cost?