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

# Apply Rules



## OpenAPI

````yaml /api-reference/openapi.json get /v1/apply/rules
openapi: 3.1.0
info:
  title: Visceral Backend
  version: 0.2.0
  description: >-
    The Visceral backend HTTP API. SDK and ingestion endpoints authenticate with
    a workspace API key; dashboard and CLI endpoints authenticate with a user
    session token. Both are sent as `Authorization: Bearer <token>`.
servers:
  - url: https://api.visceralai.dev
security: []
paths:
  /v1/apply/rules:
    get:
      tags:
        - apply
      summary: Apply Rules
      operationId: apply_rules_v1_apply_rules_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApplyRulesResponse'
      security:
        - workspaceApiKey: []
components:
  schemas:
    ApplyRulesResponse:
      properties:
        workspace_id:
          type: string
          format: uuid
          title: Workspace Id
        rules:
          items:
            $ref: '#/components/schemas/CacheLayoutRule'
          type: array
          title: Rules
      type: object
      required:
        - workspace_id
        - rules
      title: ApplyRulesResponse
    CacheLayoutRule:
      properties:
        decision_id:
          type: string
          format: uuid
          title: Decision Id
        priority_order:
          type: integer
          title: Priority Order
        config:
          additionalProperties: true
          type: object
          title: Config
      type: object
      required:
        - decision_id
        - priority_order
        - config
      title: CacheLayoutRule
  securitySchemes:
    workspaceApiKey:
      type: http
      scheme: bearer
      description: >-
        Workspace API key (`vsc_live_...`), minted from the dashboard or
        `visceral key create`. Identifies the SDK/proxy as a workspace.

````