REST API - View all attributes for an asset

Last modified on 2023/03/28 14:23

Minimum version Service Manager: Oxygen 2.1.3  - Build 2018.1.185.2

GET  /asset-characteristics/{document_id}

  • This method allows all attributes for a specified asset to be obtained (an asset includes equipment, license and contract).
           example /asset-characteristics/9478

Notes

     Open url.png  see Service Manager REST API Conventions

  • If successful, an HTTP status code 200 is returned.
    • A URL link (HREF) to the resource is provided.
    • All fields are provided, including e_field_name and available_field_x, except for certain sensitive fields reserved for EasyVista.
       

List of parameters / fields

Mandatory parameters

You must use the parameter below in the URL.
 

Parameter Type Description / Example
asset_id number Asset identifier

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 (Successful) Request successfully processed.
Status401
401 Unauthorized Incorrect authentication process for accessing the resource: Incorrect login/password, invalid session, incorrect Service Manager account.

example

{
 "error": "Invalid Login / Password"
}
Status404
404 Not found Resource not found: Incorrect URI, missing resource, incorrect communication with the server, rfc_number not found.

example

{
 "error": "Resource not found"
}

Example

Result with a status code 200 returned

{
   "HREF": "https://{your_server}/api/v1/{your_account}/asset-characteristics/9478",
   "record_count": "4",
   "total_record_count": "4",
   "records": [
        {
           "HREF": "https://{your_server}/api/v1/{your_account}/asset/9478",
           "ASSET_ID": "9478",
           "CAPACITY_VALUE": "",
           "CHARACTERISTIC_ID": "1",
           "DATA_1": "CORE I5 750",
           "LAST_INVENTORY_DATE": "",
           "MAX_TARGET": "",
           "MIN_TARGET": "",
           "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",
           "CAPACITY_VALUE": "",
           "CHARACTERISTIC_ID": "2",
           "DATA_1": "19084",
           "LAST_INVENTORY_DATE": "2002-10-01",
           "MAX_TARGET": "",
           "MIN_TARGET": "",
           "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",
           "CAPACITY_VALUE": "",
           "CHARACTERISTIC_ID": "3",
           "DATA_1": "2670",
           "LAST_INVENTORY_DATE": "2002-10-01",
           "MAX_TARGET": "",
           "MIN_TARGET": "",
           "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"
            }
        },
        {
           "HREF": "https://{your_server}/api/v1/{your_account}/asset/9478",
           "ASSET_ID": "9478",
           "CAPACITY_VALUE": "",
           "CHARACTERISTIC_ID": "4",
           "DATA_1": "3072",
           "LAST_INVENTORY_DATE": "2002-10-01",
           "MAX_TARGET": "",
           "MIN_TARGET": "",
           "CHARACTERISTIC": {
               "CHARACTERISTIC_EN": "RAM",
               "CHARACTERISTIC_FR": "Mémoire",
               "CHARACTERISTIC_ID": "4"
            },
           "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