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

# Create a querying policy for a (product, network) pair.

> Create a new querying policy for a (product, network) pair.

The ``(network_id, product_id)`` pair is resolved server-side to its
network-product association (auto-creating it if missing). Per-model
and per-field selections for the policy are authored separately via
``PUT /networks/policies/querying/{policy_id}/configuration``.



## OpenAPI

````yaml POST /v1/networks/policies/querying
openapi: 3.1.0
info:
  title: SOLO Network API
  version: v1
servers:
  - url: https://api.solo.one
    description: Production
  - url: https://api.sandbox.solo.one
    description: Sandbox
security: []
paths:
  /v1/networks/policies/querying:
    post:
      tags:
        - Querying Policies
      summary: Create a querying policy for a (product, network) pair.
      description: |-
        Create a new querying policy for a (product, network) pair.

        The ``(network_id, product_id)`` pair is resolved server-side to its
        network-product association (auto-creating it if missing). Per-model
        and per-field selections for the policy are authored separately via
        ``PUT /networks/policies/querying/{policy_id}/configuration``.
      operationId: create_querying_policy_v1_networks_policies_querying_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateQueryingPolicyInput'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateQueryingPolicyResult'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    CreateQueryingPolicyInput:
      properties:
        product_id:
          type: string
          format: uuid
          title: Product Id
        network_id:
          type: string
          format: uuid
          title: Network Id
        name:
          type: string
          title: Name
      type: object
      required:
        - product_id
        - network_id
        - name
      title: CreateQueryingPolicyInput
      description: |-
        Body of ``POST /networks/policies/querying``.

        The dialog presents two independent dropdowns — Product and Network —
        so the REST contract carries those ids directly. The backend resolves
        (or auto-creates) the join ``NetworkProduct`` row and creates the
        policy via the repo layer in a single GraphQL mutation.

        Per-model / per-field selections are authored separately via the
        wizard's ``PUT /networks/policies/querying/{policy_id}/configuration``
        route, so this payload intentionally has no nested ``models`` list.
    CreateQueryingPolicyResult:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        network_product_id:
          type: string
          format: uuid
          title: Network Product Id
        entity_id:
          type: string
          format: uuid
          title: Entity Id
        name:
          type: string
          title: Name
        is_default:
          type: boolean
          title: Is Default
      type: object
      required:
        - id
        - network_product_id
        - entity_id
        - name
        - is_default
      title: CreateQueryingPolicyResult
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````