UPDATE Service

The requirements for an HTTP UPDATE request for a service resource URI are in the table. An example is also included.

Note: To update a service, following headers must be added in the Header tab of the OSLC application.
  1. key=properties, value=*
  2. key=x-method-override, value=PATCH
  3. key=patchtype, value=MERGE
  4. key=Content-Type, value=application/json
Table 1. UPDATE - Service
HTTP Method: POST
Request Headers:
Authorization
Required. See the Configuring Maximo IT section of this document.
Host
Required
Accept:
application/json
Request Body: As shown in example.
Example URIs: https://masdev.manage.inst1.apps.openshiftqa1.com/maximo/api/os/cduiserviceview/_RklOQUxQQVlMT0FE

To update a particular service, user needs to acquire the code for the service that needs updating. Follow the steps below to get the code for the service.
  1. Select Request Type as GET.

    url-https://masdev.manage.inst1.apps.openshiftqa3.icdlab.com/maximo/api/os/cduiserviceview?oslc.select=*
  2. Find rdf:about in response body of the GET request given above.
    Example:
    "rdf:about": "http://localhost/maximo/api/os/cduiserviceview/_Njg-"
  3. Send POST request again with the below URL:
    http://localhost/maximo/api/os/cduiserviceview/_Njg-"
  4. In the Body tab, add the updated payload as given in the Body example and select raw type radio button.
  5. Click Send.

Example:

Body:
{
    "spi:description": "Service created using API desc",
    "spi:owned_by": "REVIS",
    "spi:owner_type": "owner",
    "spi:owned_by": "MILLS",
    "spi:owner_type": "ownergroup", // If it is owner then owner_type should be owner
    "spi:service_provision": "Both",
    "spi:supported_by": "STANLEY",
    "spi:supported_type": "support",
    "spi:supported_by": "ENG",
    "spi:supported_type": "supportgroup", // If it is supportgroup then supported_type should be supportgroup
    "spi:status": "ACTIVE",
    "spi:service_support_information": "TEST Support",
    "spi:impacted_orgazination": "EAGLENA",
    "spi:service_entity_relationship": [
        {
            "spi:service_view_id": 1003,
            "spi:related_entity_id": "ICD_AUTO_CI_847",
            "spi:related_entity_type": "CI",
            "spi:configuration_desc": "Value",
            "spi:status": 1
        },
        {
            "spi:service_view_id": 1003,
            "spi:related_entity_id": "7300",
            "spi:related_entity_type": "ASSET",
            "spi:configuration_desc": "Value",
            "spi:status": 1
        },
        {
            "spi:service_view_id": 1003,
            "spi:related_entity_id": "1004",
            "spi:related_entity_type": "SERVICE",
            "spi:configuration_desc": "Value",
            "spi:status": 1
        },
        {
            "spi:service_view_id": 1003,
            "spi:related_entity_id": "UIG",
            "spi:related_entity_type": "CUSTOMER",
            "spi:status": 1
        },
        {
            "spi:service_view_id": 1003,
            "spi:related_entity_id": "MCLEAN",
            "spi:related_entity_type": "SITE",
            "spi:status": 1
        },
        {
            "spi:service_view_id": 1003,
            "spi:related_entity_id": "MAINT",
            "spi:related_entity_type": "PERSON",
            "spi:status": 1
        }
    ]
}
Response:
Status Code: 200 OK
Note: Service records are read only.