> ## 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.

# Update the enabled status of a query rewrite type



## OpenAPI

````yaml /api-reference/4.2/service-query-rewrite.json put /query-rewrite/{type}
openapi: 3.0.0
info:
  version: 4.2.6-rc1
  title: Fusion Service query-rewrite
servers:
  - url: /api/apollo/
security: []
tags:
  - name: query-rewrite
paths:
  /query-rewrite/{type}:
    put:
      tags:
        - 4.2 Query Rewrite API
      summary: Update the enabled status of a query rewrite type
      operationId: updateQueryRewriteTypeEnabled
      parameters:
        - name: context
          in: query
          description: The current Fusion application Id
          required: false
          schema:
            type: string
        - name: type
          in: path
          description: The type of query rewrite
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/QueryRewriteTypeStatus'
        description: The new status to be updated
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/QueryRewriteTypeStatus'
components:
  schemas:
    QueryRewriteTypeStatus:
      type: object
      properties:
        app:
          type: string
          readOnly: true
        type:
          type: string
          readOnly: true
        enabled:
          type: boolean
          readOnly: true
          default: false
        numDeployed:
          type: integer
          format: int64
          readOnly: true
        collection:
          type: string
          readOnly: true
        job:
          type: string
          readOnly: true
        lastDeployedOn:
          type: string
          format: date-time
          readOnly: true
        lastJobStatus:
          $ref: '#/components/schemas/JobRunView'
    JobRunView:
      type: object
      properties:
        resource:
          $ref: '#/components/schemas/FusionResource'
        runId:
          type: string
          readOnly: true
        startTime:
          type: string
          format: date-time
          readOnly: true
        endTime:
          type: string
          format: date-time
          readOnly: true
        status:
          type: string
          readOnly: true
        error:
          $ref: '#/components/schemas/JobExecutionErrorView'
        extra:
          type: object
          readOnly: true
          additionalProperties:
            type: object
        startedBy:
          type: string
          readOnly: true
    FusionResource:
      type: object
      properties:
        type:
          type: string
          enum:
            - APPKIT_APP
            - WEBAPP_ADMIN_APP
            - APP
            - COLLECTION
            - INDEX_PIPELINE
            - INDEX_STAGE
            - QUERY_STAGE
            - QUERY_PIPELINE
            - INDEX_PROFILE
            - QUERY_PROFILE
            - BLOB
            - PARSER
            - DATASOURCE
            - TASK
            - SCHEDULE
            - SEARCH_CLUSTER
            - EXPERIMENT
            - SPARK_JOB
            - GROUP
            - CUSTOM_RULE_TYPE
            - TYPE
            - RESOURCE
            - 'NULL'
        id:
          type: string
        canonicalName:
          type: string
        uri:
          type: string
          format: uri
    JobExecutionErrorView:
      type: object
      properties:
        message:
          type: string
          readOnly: true
        detail:
          type: string
          readOnly: true

````