Previous Next JavaScript must be enabled to correctly display this content

## Execute a saved SQL query by query name

get

/PASService/rest/services/v1/queries/{queryname}

Executes a specific query and returns the response

### Request

Path Parameters

- queryname(required): string

Query Parameters

- applicationName(required): string
  The name of the application
- limit: integer(int32)
  This parameter restricts the number of resources returned inside the resource collection. If the limit exceeds the resource count then the framework will only return the available resources.
- offset: integer(int32)
  Used to define the starting position of the resource collection. If offset exceeds the resource count then no resources are returned. Default value is 0.
- q: string
- versionName(required): string
  The version name of the application

There's no request body for this operation.

Back to Top

### Response

Supported Media Types

- application/json

#### 200 Response

successful operation
Back to Top

### Examples

This example describes how to execute a specific query and returns the response.

Example cURL Command

Use the following cURL command to submit a request on the REST resource:

    curl \
        -X GET \
        -H "Content-Type: application/json" \
        -u 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
        -L "http://server:port/PASService/rest/services/v1/queries/systemDate?applicationName=OIPA&versionNumber=1&companyGuid=7204C2FE-13B1-4A48-8CDA-DE8386C60EF9"

Example Response Body

The following shows an example of the response body in JSON format:

    {
      "count": 1,
      "offset": 1,
      "limit": 100,
      "results": [
        {
          "1": 1
        }
      ]
    }

Back to Top