Skip to content

addAsset

Supported, no replacement yet

This endpoint remains fully supported. No replacement exists in the new API yet, and no action is needed. When a replacement ships you will get 12 months' notice, and this site will be updated.

Reference


/rest/assetmgmt/survey/addAsset

POST
This API adds an Asset to a Site Survey.  This will add the SiteSurvey Asset and its Attributes.  It will also add the Asset and its attributes but will set the status to Pending so that it will not be made live until the survey itself has been approved and posted.  A LibraryAsset and its Attributes will also be added if libraryAssetID is set to -1.  Returns the ID's of the key records created.

acceptable request representations:

  • application/json


{    "siteSurveyID":"7474",      "ref":"kfjsdkl",                     "condition":"3",    "autocode": "XA-IKS834-1003", //siteSurveyAsset.autocode
    //one of location or locationAutocode is required    "location":"34",    "locationAutocode":"XA-IKS834-1000",
    //following are required when creating libraryAsset    //one of libraryAssetID or libraryAssetAutocode is required    //library asset will be created if libraryAssetID < 0 or libraryAssetAutocode is specified but not found in db    "libraryAssetID":"-1",   //-1 indicates new library asset (model)    "libraryAssetAutocode": "XA-ILS834-1001", //libraryAsset.autocode    "libraryAssetName":"dljdslj",       //used if lirbaryAssetID is -1    "assetType":"323",    "manufacturer":"32",
    //attributes to be linked to asset
    "attributes": [                    {"assetTypeAttributeId": "21", autocode: "XA-ILS834-1002"},                    {"assetTypeAttributeId": "43", autocode: "XA-ILS834-1003"},                  ]

}    



available response representations:
  • 200 - application/json

{
  "siteSurveyAssetId": "7557",
  "libraryAssetId": "213",
  "assetId": "12"
}


See the Asset Management API matrix for the full list of endpoints in this category.