listQueryResources

This request returns a list of resources matching a Resource Query Language (RQL) statement. The resource’s name and GUID are always returned. You can also optionally request full resource details, as well as an organization model version from which the resources will be obtained.

Syntax

com.tibco.wcc.base.Requests.listQueryResources(requestId,
                                               txtQuery,
                                               chkReturnDetail,
                                               modelVersion);

Parameters

  • requestId - (String) Uniquely identifies the request. For more information, see Submitting Server Requests.
  • txtQuery - (String) The RQL statement used to identify the resource. For information about RQL statements, see the TIBCO Business Studio BPM Implementation guide.
  • chkReturnDetail - (boolean) Indicates whether or not to return detail information about the resource.
  • modelVersion - (String) (optional) The version number of the organization model for the resources. Passing -1 or no value causes it to use the latest version.

Returns

The XML returned depends on whether or not detail information is requested (chkReturnDetail).

If chkReturnDetail = false, an <ap:Resource> element is returned, which contains the following elements:

  • <ap:Name> - The name of the resource.
  • <ap:Guid> - The GUID for the resource.

For example:

<ap:Requests>
  <ap:Resources Id="ApiSample.listQueryResources">
    <ap:Query>resource(name="Clint Hill")</ap:Query>
    <ap:Resource>
      <ap:Name>Clint Hill</ap:Name>
      <ap:Guid>5B423370-D161-43F6-AE72-D91023322236</ap:Guid>
    </ap:Resource>
  </ap:Resources>
</ap:Requests>

If chkReturnDetail = true, an <ap:ResourceDetail> element is returned, which contains details about the resource.

For example:

<ap:Requests>
   <ap:Resources Id="ApiSample.listQueryResources">
      <ap:Query>resource(name="Clint Hill")</ap:Query>
     </ap:ResourceDetail>
            .
            .
            .

For information about the elements contained in the <ap:ResourceDetail> element, see getResourceDetail.