REST API - View all the attributes of a list of assets

Last modified on 2022/11/08 13:22

Minimum version Service Manager: Oxygen 2.1.3  - Build 2018.1.185.2

GET  /asset-characteristics

  • This method allows all the attributes of a list of assets to be obtained (an asset includes equipment, license and contract).
  • To obtain all the attributes about a specified asset: GET /asset_characteristics/{asset_id}. Open url.png See the method.

Notes

      Open url.png  see Service Manager REST API Conventions

  • If successful, an HTTP status code 200 is returned.
    • By default, if the optional parameter fields is not used, only an extract of the most useful fields selected by EasyVista is displayed for each record provided.
    • A URL link (HREF) to each resource is provided so that the complete list of fields for a record can be obtained.

List of parameters / fields

Mandatory parameters

None

Optional parameters

None

Optional fields

None

HTTP status codes for the method

StatusHeader

Note: A Timeout error code will be returned if the server does not respond to the REST Web service request within a given time (by default 60 seconds).

Code Error Description
Status200
200 OK (Success) Request processed successfully.
Status401
401 Unauthorized Authentication process for accessing the resource is incorrect: Login/Password incorrect, Invalid session, Incorrect Service Manager account.

example

{
 "error": "Invalid Login / Password"
}

Example

Result for 3 assets (status code 200)

{
   "HREF": "https://{your_server}/api/v1/{your_account}/asset-characteristics?max_rows=3",
   "record_count": "3",
   "total_record_count": "61377",
   "records": [
        {
           "HREF": "https://{your_server}/api/v1/{your_account}/asset/9478",
           "ASSET_ID": "9478",
           "CHARACTERISTIC_ID": "1",
           "DATA_1": "CORE I5 750",
           "LAST_INVENTORY_DATE": "",
           "CHARACTERISTIC": {
               "CHARACTERISTIC_EN": "Processor",
               "CHARACTERISTIC_FR": "Processeur",
               "CHARACTERISTIC_ID": "1"
            },
           "ASSET": {
               "ASSET_ID": "9478",
               "ASSET_LABEL": "",
               "ASSET_TAG": "PHOEBE_TEST",
               "END_OF_WARANTY": "2020-11-02",
               "ENTRY_DATE": "",
               "INSTALLATION_DATE": "2017-12-02",
               "PURCHASE_DATE": "2017-10-02",
               "SERIAL_NUMBER": "7 QSS- 15727- 7 UR"
            }
        },
        {
           "HREF": "https://{your_server}/api/v1/{your_account}/asset/9478",
           "ASSET_ID": "9478",
           "CHARACTERISTIC_ID": "2",
           "DATA_1": "19084",
           "LAST_INVENTORY_DATE": "2002-10-01",
           "CHARACTERISTIC": {
               "CHARACTERISTIC_EN": "Total Disk size",
               "CHARACTERISTIC_FR": "Taille disque totale",
               "CHARACTERISTIC_ID": "2"
            },
           "ASSET": {
               "ASSET_ID": "9478",
               "ASSET_LABEL": "",
               "ASSET_TAG": "PHOEBE_TEST",
               "END_OF_WARANTY": "2020-11-02",
               "ENTRY_DATE": "",
               "INSTALLATION_DATE": "2017-12-02",
               "PURCHASE_DATE": "2017-10-02",
               "SERIAL_NUMBER": "7 QSS- 15727- 7 UR"
            }
        },
        {
           "HREF": "https://{your_server}/api/v1/{your_account}/asset/9478",
           "ASSET_ID": "9478",
           "CHARACTERISTIC_ID": "3",
           "DATA_1": "2670",
           "LAST_INVENTORY_DATE": "2002-10-01",
           "CHARACTERISTIC": {
               "CHARACTERISTIC_EN": "Frequency",
               "CHARACTERISTIC_FR": "Fréquence",
               "CHARACTERISTIC_ID": "3"
            },
           "ASSET": {
               "ASSET_ID": "9478",
               "ASSET_LABEL": "",
               "ASSET_TAG": "PHOEBE_TEST",
               "END_OF_WARANTY": "2020-11-02",
               "ENTRY_DATE": "",
               "INSTALLATION_DATE": "2017-12-02",
               "PURCHASE_DATE": "2017-10-02",
               "SERIAL_NUMBER": "7 QSS- 15727- 7 UR"
            }
        }
    ]
}
ConventionsAPI

REST API Conventions

Convention Meaning
Orange Parameters used in an HTTP request string which do not correspond to Service Manager database fields.

example   Method View a list of assets

https://{your_server}/api/v1/{your_account}/assets?max_rows=3&fields=asset_tag
Black and Bold Parameters used in the URL of an HTTP request which correspond to Service Manager database fields.

example   Method View an asset

https://{your_server}/api/v1/{your_account}/assets/{asset_id}
Green Parameters used in the body of an HTTP request which represent JSON object names corresponding to Service Manager database fields; they allow the value of a database field to be assigned or modified.

example   Method Close an incident/request

{  "closed": {  "end_date": "11/20/2016 12:12:12",  }  }
Parameters used in the body of an HTTP request which represent JSON object names not corresponding to Service Manager database fields.

example   Method Reopen an incident/request

{  "restarted": {  "comment": "string (required)"  }  }
Tags:
Powered by XWiki © EasyVista 2022