The Staffmap API allows you to do the following with Asset records:
Syntax:
GET {Domain}/staffmap4/{ProjectName}/api/Assete.g.
GET http://localhost/staffmap4/ProjectName/api/AssetGET https://acme.com/staffmap4/MainOffice/api/AssetSyntax:
{Domain}/staffmap4/{ProjectName}/api/Asset?apikey={APIKey}e.g.
http://localhost/staffmap4/ProjectName/api/Asset?apikey=aP2bjYAeeYrUx0hPYQ https://acme.com/staffmap4/MainOffice/api/Asset?apikey=l4MZnM2Y58lwVgubQnSyntax:
GET {Domain}/staffmap4/{ProjectName}/api/Asset/{id}e.g.
GET http://localhost/staffmap4/ProjectName/api/Asset/20191104110235817GET https://acme.com/staffmap4/MainOffice/api/Asset/20180921194845701Syntax:
{Domain}/staffmap4/{ProjectName}/api/Asset/{id}?apikey={APIKey}e.g.
http://localhost/staffmap4/ProjectName/api/Asset/6lnnh96x6hj0?apikey=aP2bjYAeeYrUx0hPYQ [ { "asset_id": "20180921201109366", "floor_id": "4", "name": "Printer 12", "category": "Printer", "top": "1392", "left": "613", "width": "-1", "height": "-1", "make": "Canon", "model": "", "serial number": "77756565", "date purchased": "2018-12-06", "phone number": "", "conferencing": "False", "voicemail": "False", "copier": "False", "employee_id": "", "picalign": "", "customclickurl": "", "key": "", "latitude": "", "longitude": "" }, { "asset_id": "2018092217102034", "floor_id": "4", "name": "Projector 01", "category": "Projector", "top": "96", "left": "2489", "width": "-1", "height": "-1", "make": "Benq", "model": "", "serial number": "67867444", "date purchased": "2018-09-24 10:16:13 AM", "phone number": "", "conferencing": "False", "voicemail": "False", "copier": "False", "employee_id": "", "picalign": "", "customclickurl": "", "key": "", "latitude": "", "longitude": "" }]When creating a new record, the unique asset ID will be automatically created and does not need to be included as parameter.
Syntax:
POST {Domain}/staffmap4/{ProjectName}/api/Asset/?{parameter1:value1}&{parameter2}:{value2}...e.g.
POST http://localhost/staffmap4/ProjectName/api/Asset/?name=Printer17&Manufacturer=CanonPOST https://acme.com/staffmap4/ProjectName/api/Asset/?name=Microwave&category=Kitchen&size=medium[ { "id": "2020020726122423" }, { "status": "Asset record successfully added" }]Syntax:
PUT {Domain}/staffmap4/{ProjectName}/api/Asset/{id}?{parameter1:value1}&{parameter2:value2}...e.g.
PUT http://localhost/staffmap4/ProjectName/api/Asset/2020020679547848?status=broken&dateupdated=2020-02-07PUT https://acme.com/staffmap4/MainOffice/api/Asset/2020020619325472?employee_id=2018928791&name=Personal Printer[ { "status": "Asset record successfully updated" }]Syntax:
DELETE {Domain}/staffmap4/{ProjectName}/api/Asset/{id}e.g.
DELETE http://localhost/staffmap4/ProjectName/api/Asset/201711300130174407DELETE https://acme.com/staffmap4/MainOffice/api/Asset/2020020630313932[ { "status": "Asset record successfully deleted" }]