REST API - View a CI

Last modified on 2023/02/21 14:11

GET  /configuration-items/{ci_id}

  • This method allows information for a specified configuration item (CI) to be obtained.
          example   /configuration-items/49493

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
ci_id string or integer CI identifier

Optional parameters

You can use the parameters detailed below in the HTTP request string.

Minimum version Parameter Type Description / Example
fields string Select fields to display.
  • example /configuration-items/49493?fields=asset_guid,asset_id
Oxygen 1.7 - Build 2018.1.131.0 formatDate string Format display of Date fields in the HTTP request result.   Open url.png See Description of the options.
  • example
    • /configuration-items/49493?fields=last_update&formatDate=l/M/Y ==> "last_update_format": "Friday/Nov/2018"
    • /configuration-items/49493?fields=last_update&formatDate=l jS \of F Y h:i:s A ==> "last_update_format": "Friday 16th of November 2018 12:00:00 AM"

Fields that could be used in optional parameters

  • You can use all the fields from the AM_ASSET table.

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}/configuration-items/18782",
   "ACQUISITION_TYPE_ID": "33",
   "ASSET_GUID": "{4F24AA49-08A5-4860-A66E-E6A948BB8C01}",
   "ASSET_ID": "18782",
   "ASSET_LABEL": "",
   "ASSET_TAG": "ZS_002",
   "AUTOMATIC_RENEWAL": "",
   "AVAILABILITY_SLA_ID": "1",
   "AVAILABLE_FIELD_1": "",
   "AVAILABLE_FIELD_2": "",
   "AVAILABLE_FIELD_3": "",
   "AVAILABLE_FIELD_4": "",
   "AVAILABLE_FIELD_5": "",
   "AVAILABLE_FIELD_6": "",
   "BEFORE_LOAN_DEPARTMENT_PATH": "",
   "BEFORE_LOAN_DEPARTMENT_ID": "",
   "BEFORE_LOAN_EMPLOYEE_ID": "",
   "BEFORE_LOAN_LOCATION_PATH": "",
   "BEFORE_LOAN_LOCATION_ID": "",
   "BILLING_PERIODICITY_IN_MONTH": "",
   "BUDGET_ID": "",
   "BUY_BACK_VALUE": "",
   "BUY_BACK_VALUE_CUR_ID": "",
   "CATALOG_ID": "4570",
   "CHARGE_BACK": "",
   "CHARGE_BACK_CUR_ID": "",
   "CI_BACKUP_BY_DEFAULT": "",
   "CI_STATUS_ID": "1",
   "CI_VERSION": "10.3.1",
   "CM_DEFAULT_CHANGE_PATH": "Changement/Changement normal*",
   "CM_DEFAULT_CHANGE_ID": "4924",
   "COMMENT_ASSET": {
       "HREF": "https://{our_server}/api/v1/{your_account}/configuration_items/18782/comment_asset"
    },
   "CONFIGURATION_ID": "",
   "CONTRACT_TYPE_ID": "",
   "CRITICAL_LEVEL_ID": "1",
   "D_HARDWARE_GUID": "",
   "DELIVERY_DATE": "2007-04-03",
   "DELIVERY_NUMBER": "",
   "DEPARTMENT_PATH": "DSI/Etudes & Projets",
   "DEPARTMENT_ID": "48",
   "DEPRECIATION_RULE_ID": "4",
   "EMPLOYEE_ID": "15175",
   "END_OF_WARANTY": "2008-06-15",
   "ENTRY_DATE": "",
   "ESTIMATED_PERCENTAGE_USE": "75",
   "EXPECTED_END_LEND_DATE": "",
   "EXPECTED_RETURN_DATE": "",
   "FALLEN_TERM": "",
   "FIXED_ASSET_NUMBER": " -",
   "INITIAL_START": "",
   "INSTALLATION_DATE": "2008-06-15",
   "INTERNAL_DELIVERY_DATE": "",
   "INTERNAL_DISPO": "",
   "INVENTORY_ID": "",
   "INVOICE_NUMBER": "F8737",
   "IS_CI": "1",
   "IS_DML": "",
   "IS_LOCKED": "0",
   "IS_SERVICE": "0",
   "LAST_AUTOMATIC_DISCOVERY": "2012-05-10",
   "LAST_INTEGRATION": "",
   "LAST_PAYMENT": "",
   "LAST_PAYMENT_CUR_ID": "",
   "LAST_PHYSICAL_INVENTORY": "2012-05-20",
   "LAST_UPDATE": "2013-04-18",
   "LICENSE_VERSION": "",
   "LOCATION_PATH": "Europe/France/Paris/Rivoli/Local réseau",
   "LOCATION_ID": "1564",
   "LOCATION_TO_CHECK_REQUEST_ID": "",
   "MAIN_USAGE_ID": "",
   "MAINTENANCE_COST": "",
   "MAINTENANCE_COST_CUR_ID": "",
   "MAX_INSTALLS": "",
   "MONTH_DURATION": "",
   "MONTHLY_FIXED_COST": "",
   "MONTHLY_FIXED_COST_CUR_ID": "",
   "MONTHLY_NET_RENTAL": "",
   "MONTHLY_NET_RENTAL_CUR_ID": "",
   "NETWORK_IDENTIFIER": "BDD-SQL-FR*",
   "NEXT_CI_VERSION": "",
   "NEXT_DEPARTMENT_PATH": "",
   "NEXT_DEPARTMENT_ID": "",
   "NEXT_MAINTENANCE_DATE": "",
   "NEXT_STATUS_ID": "",
   "NEXT_USER_APPLICATION_DATE": "",
   "NEXT_USER_ID": "",
   "NOTICE": "",
   "ORDER_DETAILS_ID": "8818",
   "ORDER_NUMBER": "",
   "OWNERSHIP_TO_CHECK_REQUEST_ID": "",
   "PACKAGE_PATH": "",
   "PIPELINE_STATUS_ID": "",
   "POWER_CONSUMPTION_WH": "400",
   "PROCESSOR_COUNT": "",
   "PROCESSOR_SOCKET_COUNT": "",
   "PROJECT_ID": "",
   "PROVIDER_PATH": "",
   "PROVIDER_ID": "",
   "PURCHASE_DATE": "2005-06-16",
   "PURCHASE_PRICE": "7 889,00",
   "PURCHASE_PRICE_CUR_ID": "",
   "PURCHASE_RATE_ID": "",
   "RECYCLED_DATE": "",
   "RECYCLING_PROVIDER_PATH": "TopInfo",
   "RECYCLING_PROVIDER_ID": "9",
   "REFORM_NUMBER": "",
   "REMOVED_DATE": "",
   "RENEWAL_DECISION_ID": "",
   "RENEWAL_VALUE": "3 000,00",
   "RENEWAL_VALUE_CUR_ID": "",
   "REPAIRED_BY_PATH": "",
   "REPAIRED_BY_ID": "",
   "REQUEST_ID": "",
   "RESALES_VALUE": "",
   "SCHEDULED_END": "2010-06-15",
   "SD_CATALOG_PATH": "",
   "SD_CATALOG_ID": "1",
   "SD_DEFAULT_INCIDENT_PATH": "Incidents/Infrastructure/Bases de données/SQL Server",
   "SD_DEFAULT_INCIDENT_ID": "4768",
   "SD_DEFAULT_REQUEST_PATH": "",
   "SD_DEFAULT_REQUEST_ID": "",
   "SERIAL_NUMBER": "MLKVBT",
   "SERVER_TYPE_ID": "",
   "SLA_ID": "3",
   "STATUS_ID": "8",
   "SUPPLIER_PATH": "Dell Computer",
   "SUPPLIER_ID": "8",
   "TERM": "",
   "UPDATE_COVERAGE_TERM": "",
   "UPDATED_BY_DISCOVERY": "",
   "WARANTY_TYPE_ID": "",
   "XPOS": "",
   "YPOS": "",
   "ZPOS": ""
}
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