openapi: 3.0.0 x-stoplight: id: 3x2f5e2eqgpny info: title: yq version: '1.0' servers: - url: 'https://api.yandex-query.cloud.yandex.net/api/fq/v1' paths: /queries: post: summary: create new query operationId: create-query responses: '200': description: OK content: application/json: schema: type: object properties: id: type: string required: - id '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/GenericError' requestBody: content: application/json: schema: type: object properties: name: type: string maxLength: 1024 default: human readable default name type: type: string enum: - ANALYTICS - STREAMING default: ANALYTICS text: type: string maxLength: 100000 minLength: 1 description: type: string default: '' required: - text parameters: - $ref: '#/components/parameters/Idempotency-Key' - $ref: '#/components/parameters/Authorization' - $ref: '#/components/parameters/x-request-id' - $ref: '#/components/parameters/db' - $ref: '#/components/parameters/project' parameters: [] '/queries/{query_id}/status': parameters: - name: query_id in: path required: true schema: type: string get: summary: get query status operationId: get-query-status responses: '200': description: OK content: application/json: schema: type: object properties: status: type: string enum: - RUNNING - COMPLETED - FAILED required: - status '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/GenericError' parameters: - $ref: '#/components/parameters/x-request-id' - $ref: '#/components/parameters/db' - $ref: '#/components/parameters/project' - $ref: '#/components/parameters/Authorization' '/queries/{query_id}': parameters: - name: query_id in: path required: true schema: type: string get: summary: get query description tags: [] responses: '200': description: OK content: application/json: schema: type: object properties: name: type: string type: type: string enum: - ANALYTICS - STREAMING text: type: string description: type: string meta: $ref: '#/components/schemas/Meta' issues: $ref: '#/components/schemas/QueryError' result_sets: type: array items: $ref: '#/components/schemas/ResultSetMeta' status: $ref: '#/components/schemas/Status' id: type: string required: - name - type - text - description - meta - result_sets - status - id '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/GenericError' operationId: get-query parameters: - $ref: '#/components/parameters/x-request-id' - $ref: '#/components/parameters/Authorization' - $ref: '#/components/parameters/db' - $ref: '#/components/parameters/project' '/queries/{query_id}/stop': post: responses: '204': description: No Content '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/GenericError' parameters: - $ref: '#/components/parameters/Idempotency-Key' - $ref: '#/components/parameters/Authorization' - $ref: '#/components/parameters/x-request-id' - $ref: '#/components/parameters/db' - $ref: '#/components/parameters/project' summary: stop query operationId: stop-query parameters: - name: query_id in: path required: true schema: type: string '/queries/{query_id}/results/{result_set_index}': parameters: - name: query_id in: path required: true schema: type: string - schema: type: integer format: int32 name: result_set_index in: path required: true get: summary: get query result set tags: [] responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/ResultSet' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/GenericError' '412': description: Precondition Failed content: application/json: schema: $ref: '#/components/schemas/GenericError' operationId: get-query-results parameters: - schema: type: integer minimum: 0 default: 0 in: query name: offset - in: query name: limit schema: type: integer minimum: 0 maximum: 1000 default: 100 - $ref: '#/components/parameters/Authorization' - $ref: '#/components/parameters/x-request-id' - $ref: '#/components/parameters/db' - $ref: '#/components/parameters/project' components: schemas: Meta: title: Meta x-stoplight: id: 7teufkl6phim7 type: object properties: started_at: type: string format: date-time finished_at: type: string format: date-time required: - started_at - finished_at Issue: title: Issue x-stoplight: id: zxxq42jy0xvnh type: object properties: position: $ref: '#/components/schemas/Position' message: type: string end_position: $ref: '#/components/schemas/Position' issue_code: type: integer severity: type: string enum: - FATAL - ERROR - WARNING - INFO issues: type: array items: $ref: '#/components/schemas/Issue' Position: title: Position x-stoplight: id: tcyf21n7n9iux type: object properties: row: type: integer column: type: integer file: type: string Column: title: Column x-stoplight: id: ix1xo4g783mto type: object properties: name: type: string type: type: string required: - name - type QueryMeta: title: QueryMeta x-stoplight: id: n2scqrbk9arg9 type: object properties: started_at: type: string format: date-time started_by: type: string finished_at: type: string format: date-time finished_by: type: string ResultSetMeta: title: ResultSetMeta x-stoplight: id: n2scqrbk9arg9 type: object properties: rows_count: type: integer truncated: type: boolean required: - rows_count - truncated Status: type: string title: Status x-stoplight: id: 8wdxl9a4q2gl1 enum: - RUNNING - COMPLETED - FAILED ResultSet: title: ResultSet x-stoplight: id: 2ef8uu68huzri type: object properties: columns: type: array items: $ref: '#/components/schemas/Column' rows: type: array items: type: array items: $ref: '#/components/schemas/AnyValue' required: - columns - rows AnyValue: nullable: true anyOf: - type: string - type: number - type: integer - type: boolean - type: array items: {} GenericError: title: GenericError x-stoplight: id: uslsk0w6n30gx type: object properties: details: type: array items: $ref: '#/components/schemas/Issue' message: type: string status: type: integer required: - message QueryError: title: QueryError x-stoplight: id: uslsk0w6n30gx type: object properties: details: type: array items: $ref: '#/components/schemas/Issue' message: type: string required: - message parameters: query_id: name: query_id in: path required: true schema: type: string next_page_token: name: page_token in: query required: false schema: type: string created_by_me: name: created_only_by_me in: query required: false schema: type: boolean page_size: name: page_size in: query required: false schema: type: integer minimum: 0 maximum: 100 Idempotency-Key: name: Idempotency-Key in: header schema: type: string Authorization: name: Authorization in: header required: false schema: type: string x-request-id: name: x-request-id in: header required: false schema: type: string project: name: project in: query required: false schema: type: string db: name: db in: query required: false schema: type: string