Asset Manager API example

  • KM03311099
  • 04-Jan-2019
  • 04-Jan-2019

This document has not been formally reviewed for accuracy and is provided "as is" for your convenience.

Summary

REST APi example

Question

I have never used RESTful API's but I want to use it to create some basic quesries. I read the documentation "Asset Manager 9.50 RESTful API". However, there is not a lot of detail on how to authenticate. I would like to put everything in one script so that no manual intervention is needed.

Answer

Customer had some questions about how to use REST API. We provided her an example on how can she accomplish their request.
If you are creating a computer, it is likely that there are mandatory fields on the amAsset and amComputer table that you also need to fill. And you can set those through the Link.Field notation. So, for example, if you need to populate the SerialNo field on amAsset, you could do this:
{
"dAssignment": 1446422400000,
"lLocaId": "643958",
"AssetStatusPortfolio": "In Use and Deployed"
"Asset.SerialNo":"123456"
}
And so forth.
You just need to be certain that you are getting all of the mandatory fields filled.