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.
Elements for the <items> XML element and adapter request for the Update Department operation
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>
Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*