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

# Evaluate a rule expression



## OpenAPI

````yaml https://api.arklow.io/swagger/ui/json post /v1/orgs/{org_id}/rules/evaluate
openapi: 3.1.0
info:
  title: Arklow
  description: Arklow's API
  version: 0.1.0
servers:
  - url: https://api.arklow.io
    description: Production
  - url: http://localhost:3123
    description: Local development
security:
  - apiKey: []
tags:
  - name: actions
  - name: api_keys
  - name: billing
  - name: config
  - name: credentials
  - name: destinations
  - name: invites
  - name: members
  - name: metrics
  - name: notifications
  - name: orgs
  - name: rules
  - name: sources
  - name: users
  - name: ingress
externalDocs:
  url: https://api.arklow.io/swagger/ui
paths:
  /v1/orgs/{org_id}/rules/evaluate:
    post:
      tags:
        - rules
      summary: Evaluate a rule expression
      operationId: post_v1_orgs_by_org_id_rules_evaluate
      parameters:
        - schema:
            type: string
            pattern: ^[0-9]+$
          in: path
          name: org_id
          required: true
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - expression
              properties:
                expression:
                  type: string
                context:
                  type: object
                  properties:
                    available_fields:
                      type: array
                      items:
                        type: string
                    fields:
                      type: object
                      additionalProperties: {}
                    lists:
                      type: object
                      additionalProperties:
                        type: array
                        items:
                          anyOf:
                            - type: object
                              required:
                                - end
                                - kind
                                - start
                              properties:
                                end:
                                  anyOf:
                                    - type: number
                                    - type: string
                                kind:
                                  anyOf:
                                    - type: string
                                      enum:
                                        - ip
                                    - type: string
                                      enum:
                                        - number
                                start:
                                  anyOf:
                                    - type: number
                                    - type: string
                            - anyOf:
                                - type: array
                                  items: 3afc58d2-ce22-4319-9ee6-e8b778bb4304
                                - type: object
                                  additionalProperties: 67cbc6c7-7f86-4dc6-af5b-efbb09cbaa70
                                - type: object
                                  required:
                                    - end
                                    - kind
                                    - start
                                  properties:
                                    end:
                                      anyOf:
                                        - type: number
                                        - type: string
                                    kind:
                                      anyOf:
                                        - type: string
                                          enum:
                                            - ip
                                        - type: string
                                          enum:
                                            - number
                                    start:
                                      anyOf:
                                        - type: number
                                        - type: string
                                - anyOf:
                                    - type: 'null'
                                    - type: boolean
                                    - type: number
                                    - type: string
                                    - {}
                                - type: object
                                  required:
                                    - kind
                                    - values
                                  properties:
                                    kind:
                                      type: string
                                      enum:
                                        - spread
                                    values:
                                      type: array
                                      items: 3afc58d2-ce22-4319-9ee6-e8b778bb4304
                              title: RuleRuntimeValue
                    now:
                      type: string
                      format: date-time
                    phase:
                      anyOf:
                        - type: string
                        - type: 'null'
        required: true
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                required:
                  - data
                  - errors
                properties:
                  data:
                    anyOf:
                      - type: object
                        required:
                          - expression
                          - result
                        properties:
                          expression:
                            type: string
                          result:
                            type: object
                            required:
                              - ast
                              - missing_fields
                              - phase
                              - status
                              - value
                            properties:
                              ast: {}
                              missing_fields:
                                type: array
                                items:
                                  type: string
                              phase:
                                anyOf:
                                  - type: string
                                  - type: 'null'
                              status:
                                anyOf:
                                  - type: string
                                    enum:
                                      - deferred
                                  - type: string
                                    enum:
                                      - match
                                  - type: string
                                    enum:
                                      - no_match
                              value:
                                anyOf:
                                  - type: boolean
                                  - type: 'null'
                            additionalProperties: false
                      - type: 'null'
                  errors:
                    anyOf:
                      - type: array
                        items:
                          type: object
                          required:
                            - code
                            - message
                          properties:
                            code:
                              type: string
                            message:
                              type: string
                      - type: 'null'
        '400':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                required:
                  - data
                  - errors
                properties:
                  data:
                    anyOf:
                      - type: 'null'
                      - type: 'null'
                  errors:
                    anyOf:
                      - type: array
                        items:
                          type: object
                          required:
                            - code
                            - message
                          properties:
                            code:
                              type: string
                            message:
                              type: string
                      - type: 'null'
        '404':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                required:
                  - data
                  - errors
                properties:
                  data:
                    anyOf:
                      - type: 'null'
                      - type: 'null'
                  errors:
                    anyOf:
                      - type: array
                        items:
                          type: object
                          required:
                            - code
                            - message
                          properties:
                            code:
                              type: string
                            message:
                              type: string
                      - type: 'null'
components:
  securitySchemes:
    apiKey:
      type: apiKey
      name: x-arklow-auth
      in: header

````