# Retrieve status of query

Retrieve the status of a query.

Endpoint: GET /audiences/{audienceId}/segments/queries/{queryId}
Version: 1.0.0
Security: TdApikeyAuth

## Path parameters:

  - `audienceId` (integer, required)
    Audience ID of the segment

  - `queryId` (integer, required)
    ID of query

## Response 200 fields (application/json):

  - `id` (string)
    Query identifier (may be UUID or platform-specific ID like job ID or statement handle)

  - `queryId` (string)
    Same value as id.

  - `status` (string)
    Enum: "success", "killed", "error", "running"

  - `count` (integer,null)
    Number of profiles produced by the given segment rules

  - `maxPage` (integer,null)

  - `error` (string,null)

  - `jobid` (string)

  - `countJobid` (string,null)

  - `customerGroupCount` (integer,null)
    Number of customer groups related by the given segment rules

## Response 400 fields (application/json):

  - `code` (string, required)

  - `message` (string, required)

## Response 5XX fields (application/json):

  - `status` (integer, required)
    Error status

  - `error` (string, required)
    Error message

  - `details` (string)
    Detailed error message


