Get Entries operation
The Get Entries operation retrieves one or more entries satisfying a specified condition from the BMC Remedy Action Request (AR) System schema.
The following table describes the input elements for the Get Entries operation:
Input elements for the Get Entries operation
Element | Description | Required |
---|---|---|
<adapter name> | Specifies the name of the adapter in the adapter configuration that is used to execute the operation | No |
<schema name> | Specifies the BMC Remedy AR System schema from which the entries are retrieved | Yes |
<requested fields> | Specifies the fields to be returned by the query | Yes |
<match condition> | Specifies the query statement used to determine the records to be selected | No |
<key1> | Identifies a BMC Remedy AR System field that must be evaluated to match the specified condition | No |
<value1> | Identifies the value specified in <key1> | No |
<key2> | Identifies an additional BMC Remedy AR System field that must be evaluated to match the specified condition | No |
<value2> | Identifies the value that must be present in the key2 field for an entry to be selected, based on the match condition specified | No |
<download attachments> | Specifies whether attachments need to be downloaded with details or only the details are to be returned in the response
| No |
<retrieve attachment in response> | Specifies whether the attachment is a Base 64-encoded string
| No |
<sort-field-list> | Contains the elements required to specify the sort criteria | No |
<field> | Contains the <name-or-id> and <order> child elements, which represent fields in the BMC Remedy AR System application | Conditional; required if <sort-field-list> is specified |
<name-or-id> | Specifies the BMC Remedy AR System schema field name or ID on which sorting is to be performed | Conditional; required if <field> is specified |
<order> | Specifies the sorting order for the <name-or-id> element
| No |
<max-retrieve> | Specifies the maximum number of records to be retrieved per request | No |
The following figure shows an XML sample of the input elements for the Get Entries operation:
XML sample of the input elements for the Get Entries operation
<request-data>
<remedy-action>
<schema>Sample:Cities</schema>
<query>'Airport Code'="JIA"</query>
<fields>
<field>City</field>
<field>Airport Code</field>
</fields>
</remedy-action>
</request-data>
XML sample of the input elements for the Get Entries operation using a sort list
<remedy-action>
<schema>Test Sort</schema>
<fields>
<field>FirstName</field>
<field>LastName</field>
<field>Request ID</field>
<field>Short Description</field>
</fields>
<sort-field-list>
<field>
<name-or-id>FirstName</name-or-id>
<order>1</order>
</field>
<field>
<name-or-id>536870914</name-or-id> <!-- LastName field ID=536870914 -->
<order>2</order>
</field>
</sort-field-list>
<max-retrieve>10</max-retrieve>
</remedy-action>
</request-data>
The following table describes the output elements for the Get Entries operation:
Output elements for the Get Entries operation
Output | Description |
---|---|
<entries> | Contains the entry fields |
<metadata> | Contains the metadata from the request |
<entry-count> | Contains the number of entries returned |
<entry> | Contains the entry IDs of the fields queried |
<field> | Contains the field name and the corresponding value for the fields queried |
The following figure illustrates an XML sample of the output elements for the Get Entries operation:
XML sample of the output elements for the Get Entries operation
<get-action-result>
<entries>
<metadata>
<entry-count>6</entry-count>
</metadata>
<entry id="000000000000152">
<field name="User">Justin</field>
<field name="Priority">2</field>
<field name="Request ID">000000000000152</field>
</entry>
<entry id="000000000000153">
<field name="User">Sharon</field
<field name="Priority">9</field>
<field name="Request ID">000000000000153</field>
</entry>
<entry id="000000000000155">
<field name="User">Ted</field>
<field name="Priority">1</field>
<field name="Request ID">000000000000155</field>
</entry>
<entry id="000000000000156">
<field name="User">Sharon</field>
<field name="Priority">3</field>
<field name="Request ID">000000000000156</field>
</entry>
<entry id="000000000000158">
<field name="User">Ted</field>
<field name="Priority">8</field>
<field name="Request ID">000000000000158</field>
</entry>
<entry id="000000000000161">
<field name="User">Sharon</field>
<field name="Priority">2</field>
<field name="Request ID">000000000000161</field>
</entry>
</entries>
</get-action-result>