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

# Get a rule

> Retrieves details of a specific rule by its unique identifier.



## OpenAPI

````yaml /api-reference/5.9/fusion-api-query.json get /experience-manager/rules/{ruleId}
openapi: 3.0.1
info:
  title: Fusion Query API
  description: >-
    A Lucidworks Fusion microservice for machine-learning-enhanced ranking and
    retrieval.
  contact:
    name: Lucidworks
    url: www.lucidworks.com
    email: support@lucidworks.com
  license:
    name: License of API
    url: https://lucidworks.com/legal/developer-license-agreement/
  version: '5.9'
servers:
  - url: https://{FUSION HOST}/api
    description: Fusion
    variables:
      FUSION HOST:
        default: FUSION_HOST
        description: Your environment host.
  - url: https://{FUSION HOST}/api/apps/{APP_NAME}
    description: Fusion app
    variables:
      FUSION HOST:
        default: FUSION_HOST
        description: Your environment host.
      APP_NAME:
        default: APP_NAME
        description: The name of your Fusion app.
security:
  - Basic auth: []
  - API key: []
tags:
  - name: Custom Rule Type API
    description: Endpoints to define and manage custom rule type definitions.
  - name: Experiments API
    description: >-
      Use the Experiments API to compare different configuration variants and
      determine which ones are most successful.
  - name: Query Pipelines API
    description: >-
      Use these endpoints to view and manage your query pipelines.  You can also
      send queries using this API, though the Query Profiles API is recommended
      instead.
  - name: Query Profiles API
    description: >-
      The Query Profiles API provides static endpoints that you can consistently
      point to when querying your collections.  Query profiles allow you to
      change the query pipelines or collections behind them without changing the
      endpoint you use for your search queries.  See the Query Profiles CRUD API
      for endpoints that create and modify query profiles.
  - name: Query Profiles CRUD API
    description: >-
      Use these endpoints to create and modify query profiles.  Query profiles
      allow you to change the query pipelines or collections behind them without
      changing the endpoint you use for your search queries.  See the Query
      Profiles API for the query endpoints.
  - name: Query Rewrite API
    description: >-
      The Query Rewrite API manages documents used for query rewriting to
      improve relevancy using AI-generated data. Primarily for internal use.
  - name: Query Stage API
    description: >-
      Use these endpoints to view the available query pipeline stages and their
      configuration parameters.
  - name: Query Stage Plugins API
    description: >-
      Use these endpoints to view, install, and manage custom query stages
      developed with the Query Stage SDK.
  - name: Signal Indexing API
    description: Endpoints to index signals.
  - name: Experience Manager API
    description: API only for internal use by the Experience Manager Springboard system
  - name: Query Pipeline Template API
    description: Used internally to generate query pipelines from a template.
externalDocs:
  description: Lucidworks Documentation.
  url: https://doc.lucidworks.com/
paths:
  /experience-manager/rules/{ruleId}:
    get:
      tags:
        - Experience Manager API
      summary: Get a rule
      description: Retrieves details of a specific rule by its unique identifier.
      operationId: getRulesUsingGET
      parameters:
        - name: context
          in: query
          description: Application context for retrieving the rule.
          required: true
          schema:
            type: string
        - name: ruleId
          in: path
          description: Unique identifier of the rule to retrieve.
          required: true
          schema:
            type: string
        - name: staging
          in: query
          description: Indicates whether to retrieve the rule from a staging environment.
          required: true
          schema:
            type: boolean
      responses:
        '200':
          description: Rule retrieved successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RuleRes'
        '401':
          description: >-
            Unauthorized request. The caller does not have permission to
            retrieve rules.
          content: {}
        '403':
          description: Forbidden request. The user does not have the required privileges.
          content: {}
        '404':
          description: Rule not found.
          content: {}
components:
  schemas:
    RuleRes:
      title: Rule Response
      type: object
      description: >-
        Represents the response containing details of a rule in the Experience
        Manager.
      properties:
        campaign_id:
          type: string
          description: Unique identifier of the campaign associated with this rule.
        createdOn:
          type: string
          format: date-time
          description: Timestamp indicating when the rule was created.
        deployed:
          type: boolean
          description: Indicates whether the rule is currently deployed.
        description:
          type: string
          description: A brief description of the rule.
        display_type:
          type: string
          description: The display type associated with the rule.
        doc_type:
          type: string
          description: The document type of the rule response.
        effective_range:
          type: array
          description: Defines the time range during which the rule is active.
          items:
            type: string
        filters:
          type: array
          description: A list of filter conditions for applying the rule.
          items:
            $ref: '#/components/schemas/KeyAndValueRes'
        groups:
          type: string
          description: User groups associated with this rule.
        id:
          type: string
          description: Unique identifier for the rule.
        matching:
          type: string
          enum:
            - keywords
            - phrase
            - text
          description: Defines the matching criteria for the rule.
        name:
          type: string
          description: The name of the rule.
        priority:
          type: integer
          format: int32
          description: Defines the priority level of the rule.
        query_profile_id_ss:
          type: array
          description: A list of query profile IDs that trigger this rule.
          items:
            type: string
        response_values:
          type: array
          description: A list of response values applied by the rule.
          items:
            $ref: '#/components/schemas/KeyAndValueRes'
        review:
          type: string
          enum:
            - approved
            - auto
            - denied
            - pending
            - supplied
          description: The review status of the rule.
        rollup:
          type: string
          description: The rollup strategy applied to the rule.
        search_terms:
          type: array
          description: A list of search terms associated with the rule.
          items:
            type: string
        tags:
          type: array
          description: A list of tags associated with the rule.
          items:
            type: string
        target_segments:
          type: array
          uniqueItems: true
          description: A list of unique target segments for the rule.
          items:
            type: string
        updatedOn:
          type: string
          format: date-time
          description: Timestamp indicating when the rule was last updated.
        variant_id:
          type: string
          description: Unique identifier for the variant of this rule.
    KeyAndValueRes:
      type: object
      properties:
        key:
          type: string
        value:
          type: string
  securitySchemes:
    Basic auth:
      type: http
      scheme: basic
    API key:
      name: x-api-key
      type: apiKey
      in: header

````