> ## Documentation Index
> Fetch the complete documentation index at: https://www.osohq.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Post query

> Query v1: query for any predicate and any combination of concrete and wildcard arguments.

Unlike `GET /facts`, which only lists facts you've added to Oso Cloud, you can use `POST /query` to list derived information about any rule in your policy.



## OpenAPI

````yaml /reference/openapi.json post /query
openapi: 3.1.0
info:
  title: Oso Cloud HTTP API
  version: 0.1.0
  description: >-
    <p>Oso Cloud exposes an HTTP API that you can use to make queries directly,
    without using one of the clients.</p><p>For endpoints that require
    authentication, pass your API key as an HTTP Bearer Auth payload.</p><p>For
    example, using curl: <code>curl -H &quot;Authorization: Bearer
    $OSO_AUTH&quot; https://cloud.osohq.com/api/</code></p>
servers:
  - url: https://api.osohq.com/api/
security: []
paths:
  /query:
    post:
      tags:
        - Check API
      description: >-
        Query v1: query for any predicate and any combination of concrete and
        wildcard arguments.


        Unlike `GET /facts`, which only lists facts you've added to Oso Cloud,
        you can use `POST /query` to list derived information about any rule in
        your policy.
      operationId: post_query
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/QueryDeprecated'
        required: true
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/QueryResultDeprecated'
        default:
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
      deprecated: true
      security:
        - ApiKey: []
components:
  schemas:
    QueryDeprecated:
      type: object
      required:
        - fact
      properties:
        fact:
          $ref: '#/components/schemas/Fact'
        context_facts:
          default: []
          type: array
          items:
            $ref: '#/components/schemas/Fact'
    QueryResultDeprecated:
      type: object
      required:
        - results
      properties:
        results:
          type: array
          items:
            $ref: '#/components/schemas/Fact'
    ApiError:
      type: object
      required:
        - message
      properties:
        message:
          type: string
    Fact:
      description: 'A pattern object for matching authorization-relevant data, ie: facts.'
      type: object
      required:
        - args
        - predicate
      properties:
        predicate:
          type: string
        args:
          type: array
          items:
            $ref: '#/components/schemas/Value'
    Value:
      type: object
      properties:
        type:
          type: string
          nullable: true
        id:
          type: string
          nullable: true
  securitySchemes:
    ApiKey:
      description: Requires an API key to access.
      type: http
      scheme: bearer
      bearerFormat: Bearer e_0123_123_token0123

````