Valuekeep DevelopmentTransversal
DevelopmentTransversal
Transversal
Back | List of Articles

How to obtain the equipment to which an employee has access?

Last changed in 27/12/2024

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

Method

The method returns the equipment list and the access level the employee has access to.

The method to be used to get the equipment list and the access level the employee has access to is: GET  /api/mytenant/myorganization/settings/assetsByUsers/getEquipmentByUser?username=[email protected]&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:

  1. username: returns all the equipment this employee has access to, this parameter should be the employee email.
  2. modifiedOn: returns all the equipment changed with a date after the introduced date.
  3. 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 equipment 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": "Multi Split Ar114986",

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

"exchangeRate": 0.0,

"baseCurrency": null,

"company": "Demonstration Company",

"isDisposed": false,

"reportingCurrency": null,

"currency": "British pound"

}

Notes:

  • On the modifiedOn parameter it will be necessary to have the html encoding into account, the "+" is replaced by "%2b".
  • f 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?