REST API - View links impacted by a CI

Last modified on 2023/11/07 16:26

Service Manager: 2016 - Build 2016.1.321.0+

GET  /configuration-items/{ci_id}/item-links/impacted

  • This method allows links impacted by of a specified configuration item (CI) to be obtained (CIs whose unavailability is due to the unavailability of the current CI).
         example   /configuration-items/123/item-links/impacted
  • To obtain:
    • Links impacting a specified CI (CIs whose unavailability will lead to the unavailability of the current CI): GET  /configuration-items/{ci_id}/item-links/impacting. Open url.png See the method.
    • All the links of a specified CI (impacting / impacted) : GET  /configuration-items/{ci_id}/item-links. 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.

2023.4 - Build 2023.4.108.0.04+

  • The fields below have been added to the JSON schema of the method.
    • Network Identifier: Network identifier
    • Asset Tag: Asset tag
    • Serial Number: Serial number
    • User Name: Name of the user (parent and child)

List of parameters / fields

Mandatory parameters

You must use the JSON object below in the body of the HTTP request.
 

Parameter Type Description / Example
ci_id integer CI identifier

Optional parameters

Minimum version Parameter Type Description / Example
linked_ci integer CI identifier

example /configuration_items/123/items_links/impacted?linked_ci=456

fields string Select fields to display.
  • example /questions-result/25980?fields=question_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
    • /questions-result/25980?fields=result_date&formatDate=l/M/Y ==> "result_date_format": "Friday/Nov/2018"
    • /questions-result/25980?fields=result_date&formatDate=l jS \of F Y h:i:s A ==> "result_date_format": "Friday 16th of November 2018 12:00:00 AM"

HTTP status codes for the method

StatusHeader

   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"
}

Examples

Result with a status code 200 returned

2023.4 - Build 2023.4.108.0.04+

The fields below have been added to the JSON schema of the method.

  • Network Identifier: Network identifier
  • Asset Tag: Asset tag
  • Serial Number: Serial number
  • User Name: Name of the user (parent and child)
     
{
   "record_count": "4",
   "total_record_count": "4",
   "records": [
        {
           "HREF": "https://{your_server}/api/v1/{your_account}/configuration-items/48716",
           "BLOCKING": "1",
           "CHILD_CI_ID": "48716",
           "PARENT_CI_ID": "18782",
           "PARENT_HREF": "https://{your_server}/api/v1/{your_account}/configuration-items/18782",
           "RELATION_TYPE_ID": "129",
           "RELATION_TYPE": {
               "REFERENCE_FR": "Base de données",
               "REFERENCE_ID": "129"
            },
           "PARENT_CI": {
               "ASSET_ID": "18782",
               "ASSET_LABEL": "",
               "ASSET_TAG": "ZS_002",
               "END_OF_WARANTY": "2020-06-26",
               "ENTRY_DATE": "",
               "INSTALLATION_DATE": "2017-07-26",
               "NETWORK_IDENTIFIER": "BDD-SQL-FR*",
               "PURCHASE_DATE": "2017-05-26",
               "SERIAL_NUMBER": "MLKVBT"
            },
           "CHILD_CI": {
               "ASSET_ID": "48716",
               "ASSET_LABEL": "",
               "ASSET_TAG": " -",
               "END_OF_WARANTY": "",
               "ENTRY_DATE": "",
               "INSTALLATION_DATE": "",
               "NETWORK_IDENTIFIER": "Factures",
               "PURCHASE_DATE": "",
               "SERIAL_NUMBER": " -"
            },
           "USER_CHILD_CI": {
               "BEGIN_OF_CONTRACT": "1990-05-20",
               "CELLULAR_NUMBER": "782-256-362",
               "DEPARTMENT_PATH": "DSI/Poste de travail",
               "E_MAIL": "pachelbel@evtry.com",
               "EMPLOYEE_ID": "14915",
               "LAST_NAME": "Pachelbel Fabien",
               "LOCATION_PATH": "Europe/France/Paris/Champs Elysées/111",
               "PHONE_NUMBER": "+33155859642"
            },
           "USER_PARENT_CI": {
               "BEGIN_OF_CONTRACT": "2001-01-29",
               "CELLULAR_NUMBER": "785-520-045",
               "DEPARTMENT_PATH": "DSI/Réseau",
               "E_MAIL": "gounod@evtry.com",
               "EMPLOYEE_ID": "15175",
               "LAST_NAME": "Gounod Franck",
               "LOCATION_PATH": "Europe/France/Paris/Champs Elysées/101",
               "PHONE_NUMBER": "+33155859620"
            }
        },
        {
           "BLOCKING": "1",
           "CHILD_CI_ID": "48718",
           "HREF": "https://{your_server}/api/v1/{your_account}/configuration-items/48718",
           "PARENT_CI_ID": "18782",
           "PARENT_HREF": "https://{your_server}/api/v1/{your_account}/configuration-items/18782",
           "RELATION_TYPE_ID": "129",
           "RELATION_TYPE": {
               "REFERENCE_FR": "Base de données",
               "REFERENCE_ID": "129"
            },
           "PARENT_CI": {
               "ASSET_ID": "18782",
               "ASSET_LABEL": "",
               "ASSET_TAG": "ZS_002",
               "END_OF_WARANTY": "2020-06-26",
               "ENTRY_DATE": "",
               "INSTALLATION_DATE": "2017-07-26",
               "NETWORK_IDENTIFIER": "BDD-SQL-FR*",
               "PURCHASE_DATE": "2017-05-26",
               "SERIAL_NUMBER": "MLKVBT"
            },
           "CHILD_CI": {
               "ASSET_ID": "48718",
               "ASSET_LABEL": "",
               "ASSET_TAG": " -",
               "END_OF_WARANTY": "",
               "ENTRY_DATE": "",
               "INSTALLATION_DATE": "",
               "NETWORK_IDENTIFIER": "Logistique",
               "PURCHASE_DATE": "",
               "SERIAL_NUMBER": " -"
            },
           "USER_CHILD_CI": {
               "BEGIN_OF_CONTRACT": "1990-05-20",
               "CELLULAR_NUMBER": "782-256-362",
               "DEPARTMENT_PATH": "DSI/Poste de travail",
               "E_MAIL": "pachelbel@evtry.com",
               "EMPLOYEE_ID": "14915",
               "LAST_NAME": "Pachelbel Fabien",
               "LOCATION_PATH": "Europe/France/Paris/Champs Elysées/111",
               "PHONE_NUMBER": "+33155859642"
            },
           "USER_PARENT_CI": {
               "BEGIN_OF_CONTRACT": "2001-01-29",
               "CELLULAR_NUMBER": "785-520-045",
               "DEPARTMENT_PATH": "DSI/Réseau",
               "E_MAIL": "gounod@evtry.com",
               "EMPLOYEE_ID": "15175",
               "LAST_NAME": "Gounod Franck",
               "LOCATION_PATH": "Europe/France/Paris/Champs Elysées/101",
               "PHONE_NUMBER": "+33155859620"
            }
        },
        {
           "BLOCKING": "1",
           "CHILD_CI_ID": "48723",
           "HREF": "https:// {your_server}/api/v1/{your_account}/configuration-items/48723",
           "PARENT_CI_ID": "18782",
           "PARENT_HREF": "https://{your_server}/api/v1/{your_account}/configuration-items/18782",
           "RELATION_TYPE_ID": "129",
           "RELATION_TYPE": {
               "REFERENCE_FR": "Base de données",
               "REFERENCE_ID": "129"
            }
        },
        {
           "BLOCKING": "1",
           "CHILD_CI_ID": "49182",
           "HREF": "https:// {your_server}/api/v1/{your_account}/configuration-items/49182",
           "PARENT_CI_ID": "18782",
           "PARENT_HREF": "https://{your_server}/api/v1/{your_account}/configuration-items/18782",
           "RELATION_TYPE_ID": "129",
           "RELATION_TYPE": {
               "REFERENCE_FR": "Base de données",
               "REFERENCE_ID": "129"
        },
           "PARENT_CI": {
               "ASSET_ID": "18782",
               "ASSET_LABEL": "",
               "ASSET_TAG": "ZS_002",
               "END_OF_WARANTY": "2020-06-26",
               "ENTRY_DATE": "",
               "INSTALLATION_DATE": "2017-07-26",
               "NETWORK_IDENTIFIER": "BDD-SQL-FR*",
               "PURCHASE_DATE": "2017-05-26",
               "SERIAL_NUMBER": "MLKVBT"
            },
           "CHILD_CI": {
               "ASSET_ID": "48723",
               "ASSET_LABEL": "",
               "ASSET_TAG": " -",
               "END_OF_WARANTY": "",
               "ENTRY_DATE": "",
               "INSTALLATION_DATE": "",
               "NETWORK_IDENTIFIER": "NDF*",
               "PURCHASE_DATE": "",
               "SERIAL_NUMBER": " -"
            },
           "USER_CHILD_CI": {
               "BEGIN_OF_CONTRACT": "1990-05-20",
               "CELLULAR_NUMBER": "782-256-362",
               "DEPARTMENT_PATH": "DSI/Poste de travail",
               "E_MAIL": "pachelbel@evtry.com",
               "EMPLOYEE_ID": "14915",
               "LAST_NAME": "Pachelbel Fabien",
               "LOCATION_PATH": "Europe/France/Paris/Champs Elysées/111",
               "PHONE_NUMBER": "+33155859642"
            },
           "USER_PARENT_CI": {
               "BEGIN_OF_CONTRACT": "2001-01-29",
               "CELLULAR_NUMBER": "785-520-045",
               "DEPARTMENT_PATH": "DSI/Réseau",
               "E_MAIL": "gounod@evtry.com",
               "EMPLOYEE_ID": "15175",
               "LAST_NAME": "Gounod Franck",
               "LOCATION_PATH": "Europe/France/Paris/Champs Elysées/101",
               "PHONE_NUMBER": "+33155859620"
            }
        }
    ],
   "HREF": "https://{your_server}/api/v1/{your_account}/configuration-items/18782/item-links/impacted"
}
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