Import Set
This topic illustrates the adapter request and response for the Import Set operation.
Create Import Set Record operation
The Create Import Set Record operation creates an import set record.
The following table describes the elements for this request. If the valid value for an element is not provided, the valid value is assumed as a string.
Adapter request elements for the Create Import Set Record operation
Here, the <category>, <comments> and <uuid> elements are derived from the import set that you have defined in the ServiceNow application. The "Find Import Set Fields" wrapper in the "Utilities" folder can be used to list the fields of an import set table.
The following figure displays a sample adapter request for this operation.
Sample adapter request for the Create Import Set Record operation
<service-now-request>
<operation-name>create-import-set-record</operation-name>
<proxy-settings>
<host>172.11.11.111</host>
<port>808</port>
<user-name>username</user-name>
<password encryption-type = "Base64">cGFzc3dvcmQ=</password>
</proxy-settings>
<arguments>
<connection-parameters>
<user-name>username</user-name>
<password encryption-type = "Base64">cGFzc3dvcmQ=</password>
</connection-parameters>
<importset-table>imp_notification</importset-table>
<category>Cat</category>
<comments>myComments</comments>
<uuid>3210321</uuid>
</arguments>
</service-now-request>
</request-data>
The following figure shows the adapter response for the sample request:
Sample adapter response for the Create Import Set Record operation
<metadata>
<response-count>1</response-count>
<status>success</status>
</metadata>
<responses>
<response>
<metadata>
<count>1</count>
</metadata>
<item>
<metadata>
<status>success</status>
</metadata>
<parameters>
<sys-id>ed1f1de94a3623050128303a9af901c4</sys-id>
<table>incident</table>
<display-name>number</display-name>
<display-value>INC0011019</display-value>
<status>inserted</status>
</parameters>
</item>
</response>
</responses>
</service-now-response>
Find Import Set Record
The Find Import Set Record operation finds records from the import set table. This operation can also find records from any table.
The following table describes the elements for this request.
Adapter request elements for the Find Import Set Record operation
Element | Definition | Required |
---|---|---|
<operation-name> | Specifies the name of the operation you want to perform: create-import-set-record | Yes |
<proxy-settings> | Specifies the parent element that contains the proxy server information | No |
<host> | Specifies the IP or host name of the proxy server | Conditional; required only if <proxy-settings> is provided |
<port> | Specifies the port on which the proxy server listens for requests | Conditional; required only if <proxy-settings> is provided |
<user-name> | Specifies the user name to be used for authenticating the proxy server | No |
<password> | Specifies the password that corresponds to <user-name> | No |
<arguments> | Specifies a list of arguments required for this operation | Yes |
<connection-parameters> | Specifies the parent element for <user-name> and <password> | No |
<user-name> | Specifies the user name to be used for remote host authentication | Conditional; required if you specify the<connection-parameters> element |
<password> | Specifies the password that corresponds to the <user-name> | Conditional; required if you specify the<connection-parameters> element |
<importset-table> | Specifies the import set table name from where you want to retrieve the records | Yes |
The following figure describes the sample <items> XML for the Find Import Set Record operation.
Sample <items> XML for the Find Import Set Record operation
<item>
<importset-table>sys_template</importset-table>
<name>change_template</name>
</item>
</items>
The following figure describes the sample adapter request for the Find Import Set Record operation.
Sample adapter request for the the Find Import Set Record operation.
<operation-name>find-import-set-record</operation-name>
<arguments>
<importset-table>task_ci</importset-table>
<applied>fbd624b93d303140217b005c3446a344</applied>
</arguments>
</service-now-request>
The following figure describes the adapter response for the Find Import Set Record operation.
Adapter response for the Find Import Set Record operation
<metadata>
<response-count>1</response-count>
<status>success</status>
</metadata>
<responses>
<response>
<metadata>
<count>6</count>
</metadata>
<item>
<metadata>
<status>success</status>
</metadata>
<parameters>
<applied>0</applied>
<ci-item>Java Application Server FLX</ci-item>
<sys-created-by>felix.bait</sys-created-by>
<sys-created-on>2015-02-02 11:30:12</sys-created-on>
<sys-id>0f685fa437501000bff8e0f617733494</sys-id>
<sys-mod-count>0</sys-mod-count>
<sys-updated-by>felix.bait</sys-updated-by>
<sys-updated-on>2015-02-02 11:30:12</sys-updated-on>
<task>CHG0000015</task>
</parameters>
</item>
</response>
</responses>
</service-now-response>