Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Current »

You can retrieve the CI relationships using the following API. 

To authenticate the below API, see API Authentication and Authorization.

Service NameHTTP Method
CMDB_GetCIRelationship

POST

Below is the sample request to retrieve the CI relationships.

Sample Request
{
  "ServiceName": "CMDB_GetCIRelationship",
  "objCommonParameters": {
    "_ProxyDetails": {
      "ProxyID": 0,
      "ReturnType": "JSON",
      "APIKey": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
      "AuthType": "APIKEY"
    },
    "_CMDBDetails": {
      "InstanceName": "CMT",
      "Configuration_Id": "354",
      "Device_Host_Name": "",
      "Serial_No": "",
      "IPAddress": "",
      "CurrentPageIndex": 0,
      "PageSize": 0
    }
  }
}

Request Parameters

Parameter NameMandatoryDescriptionTypeNotes

InstanceName 

TRUE

Name of the Instance.

For Example: Info

STRING


Configuration_Id

FALSE

Unique Identification number of the Configuration Item (CI).

INTEGER


You are required to specify any one of these parameter as mandatory (*).

Device_Host_Name 

FALSE

Name of the device Host.

STRING

Serial_No 

FALSE

Serial number of the CI.

STRING

IPAddress

FALSE

IP Address of the CI.

STRING

CurrentPageIndex 

FALSE

Current Index of the page that you are looking into.

INTEGER

Example:

If each page contains 10 records and there are 10 pages. Items from 1 to 10 are displayed when you specify the  CurrentPageIndex value as 0.

PageSize 

FALSE

Number of records that should be displayed per each page.

INTEGER

If you do not specify any value, by default, the page displays 20 records with the CurrentPageIndex value as 0.

Example:

Consider you specified the PageSize value as 100. Based on the CurrentPageIndex, the API Response displays 100 records.

Sample Response
{
  "Errors": "",
  "Message": "5 CI Relationship Record(s) found.",
  "Output": "",
  "TokenID": "1D82B465C5D100A4B5DD92354AA1A4A288F5F57D1C44B61E00B7B1BD1BFDCF5D958500B60CA963F3940CAB8EEA
3AB427923DA6C3AB3E2CDA9C5D5800D50317DEB2CA9CED2C8A5DEBF825D04DBE8FE3399C4A84BD48B40CF338987D77C1A9D4953A8
D6358824BF24F5EFB0B8170AA756347997080503B47200B43818EAADB758FDD047C4FD0FD2098195BFEC85E72FC3A656359A1CF96
C74A5EDC77370FF4EA47",
  "OrgID": 0,
  "OutputObject": {
    "TotalRecords ": 5,
    "CIRelations": [
      {
        "ID": 4,
        "RelationshipType": "SERVICE",
        "Classification": "SERVICE",
        "ServiceName": "Service243",
        "Criticality": "",
        "Device_HostName": "",
        "Serial_No": "",
        "IPAddress": "",
        "MAC_Address": "",
        "Location": ""
      },
      {
        "ID": 41,
        "RelationshipType": "PARENT",
        "Classification": "Desktop",
        "ServiceName": "",
        "Criticality": "",
        "Device_HostName": "TestNew56",
        "Serial_No": "New343",
        "IPAddress": null,
        "MAC_Address": null,
        "Location": null
      }
    ]
  },
  "OutputID": 0,
  "Input": null
}

Status and Error Codes

For more information, see Status and Error Messages

  • No labels