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

Default value: ARSAdapter

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

The query statement can be a complex condition that includes the key, value variables, and operators.

Example: key1 > value1 and key1 < value2

Default value for key1: value1

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

Note

 <key2> is not used unless specifically included in 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

Note

<value2> is not used unless specifically included in the specified condition.


No

<download attachments>

Specifies whether attachments need to be downloaded with details or only the details are to be returned in the response
Valid values: true, false

  • If <download attachments> is true, the attachments are downloaded on the destination location that is configured in the adapter configuration and the attachment details are returned in the response. The attachment file name gets appended with the current system timestamp and a random number between one thousand to one million. For example, if the file name is input.txt, then the adapter appends the system timestamp and a random number, so the file name can be input_16003309694769963266.txt.
  • If <download attachments> is false, the attachment details are returned in the response without downloading the attachment to the specified directory.

No

<retrieve attachment in response>

Specifies whether the attachment is a Base 64-encoded string

Valid values: true, false (default)

  • If <retrieve attachment in response> is true, <download attachments> is ignored

    The attachment is a Base64-encoded string.
  • If <retrieve attachment in response> and <download attachments> are false,
    only the attachment details are shown in the response.

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

Sorting is performed in the order in which the <field> elements are specified within the <sort-field-list> element, which is from top to bottom.

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

Valid values:

  • 1 or ASC (default): Result is sorted in the ascending order
  • 2 or DESC: Result is sorted in the descending order

No

<max-retrieve>

Specifies the maximum number of records to be retrieved per request

If you do not specify <max-retrieve> or if its value is set to zero, all the matching records are retrieved.

Records are retrieved by using the default sorted order, which is ascending, based on the created date or entry ID. The adapter uses the default order that is used by the BMC Remedy AR System application.

No

Action name

Before running the operation, ensure that you specify the value of the Action field in the Call Adapter Activity to query.


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

<request-data>
    <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>

Note

In the preceding sample, the fields are first sorted by "FirstName", and then the "LastName", whose field-id is 536870914.

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>
Was this page helpful? Yes No Submitting... Thank you

Comments