Update Department operation
The Update Department operation updates the details of a department.
The following table describes the elements of the <items>
XML element and the adapter request. If not specified, the valid value for an element should be assumed to be a string.
The default value for all elements is ignored.
Note
A combination of the <department-name>
and <company>
elements must be used as the key. Therefore, the combined resultant value of the <department-name>
and <company>
pair must be unique.
Elements for the <items> XML element and adapter request for the Update Department operation
Element |
Definition |
Required |
---|---|---|
|
Specifies the name of the operation: |
Yes |
|
Contains the other elements in the request |
Yes |
|
Contains elements that uniquely identify a record |
Yes |
|
Specifies a unique record |
Yes |
|
Specifies the department to be updated |
Yes |
|
Specifies the name of the department |
No |
|
Specifies the name of the company
|
No |
|
Specifies the ID of the department to be updated |
No |
|
Specifies the ID for the Service Level Agreement (SLA) for the department |
No |
|
Specifies the parent department |
No |
|
Specifies the cost manager of the department |
No |
The following figure displays the sample adapter request for the Update Department operation.
Sample adapter request for the Update Department operation
<hp-service-manager-request>
<entity>configurationitem</entity>
<entity-type>department</entity-type>
<request>
<operation-name>update-department</operation-name>
<parameters>
<update-department-request>
<model>
<keys>
<department>
<value>C-0001/DeptName22</value>
<type>String</type>
</department>
<company>
<value>C-0001</value>
<type>String</type>
</company>
</keys>
<instance>
<department-name>
<value>DeptNameNew</value>
<type>String</type>
</department-name>
<company>
<value>CompanyNameNew</value>
<type>String</type>
</company>
<department-i-d>
<value>department i d new</value>
<type>String</type>
</department-i-d>
</instance>
</model>
</update-department-request>
</parameters>
</request>
</hp-service-manager-request>
The following figure displays an adapter response for the Update Department operation.
Sample adapter response for the Update Department operation
<hp-service-manager-response>
<metadata>
<count>1</count>
</metadata>
<responses>
<response>
<metadata>
<count>1</count>
</metadata>
<item>
<metadata>
<status>success</status>
</metadata>
<parameters>
<model>
<keys>
<department>
<value>CompanyNameNew/DeptNameNew</value>
<type>String</type>
</department>
<company>
<value>CompanyNameNew</value>
<type>String</type>
</company>
</keys>
<instance>
<department>
<value>CompanyNameNew/DeptNameNew</value>
<type>String</type>
</department>
<department-i-d>
<value>department i d new</value>
<type>String</type>
</department-i-d>
<department-s-l-a>
<value>169</value>
<type>Decimal</type>
</department-s-l-a>
<company>
<value>CompanyNameNew</value>
<type>String</type>
</company>
<parent-department>
<value>parent department</value>
<type>String</type>
</parent-department>
<department-structure>
<value>DeptNameNew</value>
<type>String</type>
</department-structure>
<department-full-name>
<value>CompanyNameNew/DeptNameNew</value>
<type>String</type>
</department-full-name>
<department-name>
<value>DeptNameNew</value>
<type>String</type>
</department-name>
<cost-center>
<value>cost center</value>
<type>String</type>
</cost-center>
<uniquequery>dept="CompanyNameNew/DeptNameNew" and company="CompanyNameNew"</uniquequery>
<recordid>CompanyNameNew/DeptNameNew - CompanyNameNew</recordid>
</instance>
</model>
<messages>
<element>
<value>Department record updated.</value>
</element>
</messages>
<status>SUCCESS</status>
<message>Success</message>
<schema-revision-date>2010.01.20 00:00:00</schema-revision-date>
<schema-revision-level>5</schema-revision-level>
<return-code>0</return-code>
</parameters>
</item>
</response>
</responses>
</hp-service-manager-response>
Comments
Log in or register to comment.