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

# Set Processor Eval Rubric

> Link or detach an EvalRubric on a custom processor.

DUAL WRITE (mirrors the generation-agent flow in
custom_processors/tasks.py, where the version's eval_definition and the
processor.eval_rubric_id back-link are always written together): the
execution engine reads ONLY the rubric copy embedded in the ACTIVE
version's eval_definition, so the back-link and that copy must move as one.

- `{"eval_rubric_id": <id>}`: verifies the rubric exists on this team
  (404) and isn't archived (400), then sets processor.eval_rubric_id AND
  mirrors rubric.eval_definition into the active version. Requires a
  completed active version (400 otherwise) — a link without the mirrored
  copy would silently never score.
- `{"eval_rubric_id": null}`: clears processor.eval_rubric_id AND the
  active version's eval_definition. Tolerates a processor with no active
  version (nothing to clear on the version side), so a dangling link is
  always removable.



## OpenAPI

````yaml https://www.datalab.to/openapi.json patch /api/v1/custom_pipelines/{processor_id}/eval_rubric
openapi: 3.1.0
info:
  title: Datalab API
  version: 0.0.1
servers:
  - url: https://www.datalab.to
    description: Datalab API
security: []
paths:
  /api/v1/custom_pipelines/{processor_id}/eval_rubric:
    patch:
      tags:
        - Custom Pipelines (Deprecated)
      summary: Set Processor Eval Rubric
      description: >-
        Link or detach an EvalRubric on a custom processor.


        DUAL WRITE (mirrors the generation-agent flow in

        custom_processors/tasks.py, where the version's eval_definition and the

        processor.eval_rubric_id back-link are always written together): the

        execution engine reads ONLY the rubric copy embedded in the ACTIVE

        version's eval_definition, so the back-link and that copy must move as
        one.


        - `{"eval_rubric_id": <id>}`: verifies the rubric exists on this team
          (404) and isn't archived (400), then sets processor.eval_rubric_id AND
          mirrors rubric.eval_definition into the active version. Requires a
          completed active version (400 otherwise) — a link without the mirrored
          copy would silently never score.
        - `{"eval_rubric_id": null}`: clears processor.eval_rubric_id AND the
          active version's eval_definition. Tolerates a processor with no active
          version (nothing to clear on the version side), so a dangling link is
          always removable.
      operationId: >-
        set_processor_eval_rubric_api_v1_custom_pipelines__processor_id__eval_rubric_patch
      parameters:
        - name: processor_id
          in: path
          required: true
          schema:
            type: string
            title: Processor Id
        - name: wos-session
          in: cookie
          required: false
          schema:
            type: string
            title: Wos-Session
        - name: datalab_active_team
          in: cookie
          required: false
          schema:
            type: string
            title: Datalab Active Team
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SetProcessorEvalRubricRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
components:
  schemas:
    SetProcessorEvalRubricRequest:
      properties:
        eval_rubric_id:
          anyOf:
            - type: integer
            - type: 'null'
          title: Eval Rubric Id
          description: >-
            EvalRubric ID to link to this processor, or null to detach the
            current rubric
      type: object
      title: SetProcessorEvalRubricRequest
      description: >-
        Request body for linking/detaching an eval rubric on a custom processor.


        eval_rubric_id set  -> link that rubric (dual write: back-link + mirror
        the
                               rubric's eval_definition into the ACTIVE version).
        eval_rubric_id null -> detach (clear the back-link AND the active
        version's
                               embedded eval_definition).
    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
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key

````