Arthur AI Tasks V1 API

The Tasks V1 API from Arthur AI — 7 operation(s) for tasks v1.

OpenAPI Specification

arthur-ai-tasks-v1-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Arthur Scope Agents V1 Tasks V1 API
  version: 0.1.0
tags:
- name: Tasks V1
paths:
  /api/v1/models/{model_id}/task:
    patch:
      tags:
      - Tasks V1
      summary: Update A Task
      description: Submits a job to update the task definition for this model and returns the job ID. When the job finishes, it will upload the latest copy of the task state. Requires model_task_update permission.
      operationId: patch_task
      security:
      - OAuth2AuthorizationCode:
        - model_task_update
      parameters:
      - name: model_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Model Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatchTaskRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskMutationResponse'
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerError'
          description: Internal Server Error
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestError'
          description: Bad Request
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundError'
          description: Not Found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    delete:
      tags:
      - Tasks V1
      summary: Delete A Task
      description: Submits a job to delete the task and the corresponding platform model, and returns the job ID. Requires model_task_delete permission.
      operationId: delete_task
      security:
      - OAuth2AuthorizationCode:
        - model_task_delete
      parameters:
      - name: model_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Model Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskMutationResponse'
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerError'
          description: Internal Server Error
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundError'
          description: Not Found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    get:
      tags:
      - Tasks V1
      summary: Get Cached Task State
      description: Retrieve the task state cached in the control plane. Requires model_task_read permission.
      operationId: get_task_state_cache
      security:
      - OAuth2AuthorizationCode:
        - model_task_read
      parameters:
      - name: model_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Model Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskReadResponse'
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerError'
          description: Internal Server Error
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundError'
          description: Not Found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/models/{model_id}/task/sync:
    post:
      tags:
      - Tasks V1
      summary: Sync A Task
      description: Submits a job to fetch the latest task state and returns the job ID. When the job finishes, it will upload the latest copy of the task state. Requires model_task_sync permission.
      operationId: sync_task
      security:
      - OAuth2AuthorizationCode:
        - model_task_sync
      parameters:
      - name: model_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Model Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskMutationResponse'
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerError'
          description: Internal Server Error
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestError'
          description: Bad Request
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundError'
          description: Not Found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/models/{model_id}/task/cache:
    put:
      tags:
      - Tasks V1
      summary: Upload Task State
      description: Upload a copy of the task state to cache in the control plane. Requires model_task_put_state_cache permission.
      operationId: put_task_state_cache
      security:
      - OAuth2AuthorizationCode:
        - model_task_put_state_cache
      parameters:
      - name: model_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Model Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PutTaskStateCacheRequest'
      responses:
        '204':
          description: Successful Response
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerError'
          description: Internal Server Error
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestError'
          description: Bad Request
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundError'
          description: Not Found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/models/{model_id}/task/connection_info:
    put:
      tags:
      - Tasks V1
      summary: Upload Task State
      description: Upload the task connection information. Requires model_task_put_connection_info permission.
      operationId: put_task_connection_info
      security:
      - OAuth2AuthorizationCode:
        - model_task_put_connection_info
      parameters:
      - name: model_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Model Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PutTaskConnectionInfo'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskConnectionInfo'
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerError'
          description: Internal Server Error
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundError'
          description: Not Found
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestError'
          description: Bad Request
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    get:
      tags:
      - Tasks V1
      summary: Get Task Connection Info
      description: Retrieve the task connection information. Requires model_task_get_connection_info permission.
      operationId: get_task_connection_info
      security:
      - OAuth2AuthorizationCode:
        - model_task_get_connection_info
      parameters:
      - name: model_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Model Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskConnectionInfo'
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerError'
          description: Internal Server Error
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundError'
          description: Not Found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    delete:
      tags:
      - Tasks V1
      summary: Delete Connection Info.
      description: Deletes connection information for a model. Requires model_task_delete_connection_info permission.
      operationId: delete_connection_info
      security:
      - OAuth2AuthorizationCode:
        - model_task_delete_connection_info
      parameters:
      - name: model_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Model Id
      responses:
        '204':
          description: Successful Response
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerError'
          description: Internal Server Error
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundError'
          description: Not Found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/models/{model_id}/task/regenerate_validation_key:
    post:
      tags:
      - Tasks V1
      summary: Regenerate Task Validation Key
      description: Regenerate the task validation key. Requires model_task_regenerate_validation_key permission.
      operationId: post_regenerate_validation_key
      security:
      - OAuth2AuthorizationCode:
        - model_task_regenerate_validation_key
      parameters:
      - name: model_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Model Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskValidationKeyRegenerationResponse'
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerError'
          description: Internal Server Error
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundError'
          description: Not Found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/projects/{project_id}/tasks:
    post:
      tags:
      - Tasks V1
      summary: Create A Task.
      description: Submits a job to create a task in the project and returns a job ID. When the job finishes, it will upload a copy of the task state. Requires the project_create_model_task permission.
      operationId: project_create_model_task
      security:
      - OAuth2AuthorizationCode:
        - project_create_model_task
      parameters:
      - name: project_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Project Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PostTaskRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskMutationResponse'
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerError'
          description: Internal Server Error
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestError'
          description: Bad Request
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundError'
          description: Not Found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/projects/{project_id}/link_task:
    post:
      tags:
      - Tasks V1
      summary: Link An Existing Task To A New Model.
      description: Submits a job to link an existing task to a new model in the project and returns a job ID. When the job finishes, it will upload a copy of the task state. Requires the project_create_model_link_task permission.
      operationId: project_create_model_link_task
      security:
      - OAuth2AuthorizationCode:
        - project_create_model_link_task
      parameters:
      - name: project_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Project Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PostLinkTaskRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskMutationResponse'
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerError'
          description: Internal Server Error
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestError'
          description: Bad Request
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundError'
          description: Not Found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    TaskValidationKeyRegenerationResponse:
      properties:
        job_id:
          type: string
          format: uuid
          title: Job Id
          description: Job ID executing the validation key regeneration.
      type: object
      required:
      - job_id
      title: TaskValidationKeyRegenerationResponse
    AgentMetadata:
      properties:
        provider:
          $ref: '#/components/schemas/RegisteredAgentProvider'
          description: Provider of the registered agent.
        gcp_metadata:
          anyOf:
          - $ref: '#/components/schemas/GCPAgentMetadata'
          - type: 'null'
          description: Metadata for the agent.
      type: object
      required:
      - provider
      title: AgentMetadata
    GCPAgentMetadataResponse:
      properties:
        project_id:
          type: string
          title: Project Id
          description: Project ID of the agent.
        region:
          type: string
          title: Region
          description: Region of the agent.
        resource_id:
          type: string
          title: Resource Id
          description: Resource ID of the agent.
      type: object
      required:
      - project_id
      - region
      - resource_id
      title: GCPAgentMetadataResponse
      description: GCP-specific agent metadata for responses.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
            - type: string
            - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
      - loc
      - msg
      - type
      title: ValidationError
    TraceTransformVariableDefinition:
      properties:
        variable_name:
          type: string
          title: Variable Name
          description: Name of the variable to extract.
        span_name:
          type: string
          title: Span Name
          description: Name of the span to extract data from.
        attribute_path:
          type: string
          title: Attribute Path
          description: Dot-notation path to the attribute within the span (e.g., 'attributes.input.value.sqlQuery').
        fallback:
          anyOf:
          - type: string
          - type: 'null'
          title: Fallback
          description: Fallback value to use if the attribute is not found.
      type: object
      required:
      - variable_name
      - span_name
      - attribute_path
      title: TraceTransformVariableDefinition
    Eval:
      properties:
        name:
          type: string
          title: Name
          description: Name of the llm eval
        eval_kind:
          type: string
          title: Eval Kind
          description: Eval kind discriminator (e.g. 'llm_as_a_judge', 'pii', 'toxicity')
          default: llm_as_a_judge
        model_name:
          anyOf:
          - type: string
          - type: 'null'
          title: Model Name
          description: Name of the LLM model (e.g., 'gpt-4o', 'claude-3-sonnet'). None for ML evals.
        model_provider:
          anyOf:
          - $ref: '#/components/schemas/ModelProvider'
          - type: 'null'
          description: Provider of the LLM model (e.g., 'openai', 'anthropic', 'azure'). None for ML evals.
        instructions:
          anyOf:
          - type: string
          - type: 'null'
          title: Instructions
          description: Instructions for the llm eval. None for ML evals.
        variables:
          items:
            type: string
          type: array
          title: Variables
          description: List of variable names for the llm eval
        tags:
          items:
            type: string
          type: array
          title: Tags
          description: List of tags for this llm eval version
        config:
          anyOf:
          - $ref: '#/components/schemas/LLMBaseConfigSettings'
          - additionalProperties: true
            type: object
          - type: 'null'
          title: EvalConfig
          description: Eval configuration. LLMBaseConfigSettings for LLM evals; type-specific dict for ML evals.
        created_at:
          type: string
          format: date-time
          title: Created At
          description: Timestamp when the llm eval was created.
        deleted_at:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Deleted At
          description: Time that this llm eval was deleted
        version:
          type: integer
          title: Version
          description: Version of the llm eval
          default: 1
      type: object
      required:
      - name
      - created_at
      title: Eval
    TaskValidationAPIKey:
      properties:
        id:
          type: string
          title: Id
          description: The Shield ID for the API key.
        name:
          type: string
          title: Name
          description: The user-friendly name of the API key.
        key:
          type: string
          format: password
          title: Key
          description: The value of the API key.
          writeOnly: true
      type: object
      required:
      - id
      - name
      - key
      title: TaskValidationAPIKey
    PatchTaskRequest:
      properties:
        rules_to_enable:
          items:
            type: string
            format: uuid
          type: array
          title: Rules To Enable
          description: List of rule IDs to enable on the task.
        rules_to_disable:
          items:
            type: string
            format: uuid
          type: array
          title: Rules To Disable
          description: List of rule IDs to disable on the task.
        rules_to_archive:
          items:
            type: string
            format: uuid
          type: array
          title: Rules To Archive
          description: List of rule IDs to archive on the task.
        rules_to_add:
          items:
            $ref: '#/components/schemas/NewRuleRequest'
          type: array
          title: Rules To Add
          description: List of new rules to add to the task.
      type: object
      title: PatchTaskRequest
    LogitBiasItem:
      properties:
        token_id:
          type: integer
          title: Token Id
          description: Token ID to bias
        bias:
          type: number
          maximum: 100.0
          minimum: -100.0
          title: Bias
          description: Bias value between -100 and 100
      type: object
      required:
      - token_id
      - bias
      title: LogitBiasItem
    ModelProvider:
      type: string
      enum:
      - anthropic
      - openai
      - gemini
      - bedrock
      - vertex_ai
      - hosted_vllm
      - azure
      title: ModelProvider
    ContinuousEvalResponse:
      properties:
        id:
          type: string
          format: uuid
          title: Id
          description: ID of the transform.
        name:
          type: string
          title: Name
          description: Name of the continuous eval.
        description:
          anyOf:
          - type: string
          - type: 'null'
          title: Description
          description: Description of the continuous eval.
        task_id:
          type: string
          title: Task Id
          description: ID of the parent task.
        eval_type:
          $ref: '#/components/schemas/EvalType'
          description: 'Type of evaluator: ''llm_eval'' or ''ml_eval''.'
          default: llm_eval
        llm_eval_name:
          anyOf:
          - type: string
          - type: 'null'
          title: Llm Eval Name
          description: Name of the eval.
        llm_eval_version:
          anyOf:
          - type: integer
          - type: 'null'
          title: Llm Eval Version
          description: Version of the eval.
        transform_id:
          type: string
          format: uuid
          title: Transform Id
          description: ID of the transform.
        transform_version_id:
          anyOf:
          - type: string
            format: uuid
          - type: 'null'
          title: Transform Version Id
          description: ID of the pinned transform version. When set, the continuous eval will always execute using this version's configuration snapshot.
        transform_variable_mapping:
          items:
            $ref: '#/components/schemas/ContinuousEvalTransformVariableMappingResponse'
          type: array
          title: Transform Variable Mapping
          description: Mapping of transform variables to eval variables.
        enabled:
          type: boolean
          title: Enabled
          description: Whether the continuous eval is enabled.
          default: true
        created_at:
          type: string
          format: date-time
          title: Created At
          description: Timestamp representing the time the transform was added to the llm eval.
        updated_at:
          type: string
          format: date-time
          title: Updated At
          description: Timestamp representing the time the continuous eval was last updated.
      type: object
      required:
      - id
      - name
      - task_id
      - transform_id
      - created_at
      - updated_at
      title: ContinuousEvalResponse
    PutTaskStateCacheRequest:
      properties:
        task:
          $ref: '#/components/schemas/TaskResponse'
          description: Copy of the task state to cache in the control plane.
        evals:
          items:
            $ref: '#/components/schemas/Eval'
          type: array
          title: Evals
          description: Copy of the eval state for this task in the control plane.
        continuous_evals:
          items:
            $ref: '#/components/schemas/ContinuousEvalResponse'
          type: array
          title: Continuous Evals
          description: Copy of the continuous eval state for this task in the control plane.
        transforms:
          items:
            $ref: '#/components/schemas/TraceTransformResponse'
          type: array
          title: Transforms
          description: Copy of the transform state for this task in the control plane.
      type: object
      required:
      - task
      title: PutTaskStateCacheRequest
    ContinuousEvalTransformVariableMappingResponse:
      properties:
        transform_variable:
          type: string
          title: Transform Variable
          description: Name of the transform variable.
        eval_variable:
          type: string
          title: Eval Variable
          description: Name of the eval variable.
      type: object
      required:
      - transform_variable
      - eval_variable
      title: ContinuousEvalTransformVariableMappingResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ExamplesConfig:
      properties:
        examples:
          items:
            $ref: '#/components/schemas/ExampleConfig'
          type: array
          title: Examples
          description: List of all the examples for Sensitive Data Rule
        hint:
          anyOf:
          - type: string
          - type: 'null'
          title: Hint
          description: Optional. Hint added to describe what Sensitive Data Rule should be checking for
      type: object
      required:
      - examples
      title: ExamplesConfig
      example:
        examples:
        - example: John has O negative blood group
          result: true
        - example: Most of the people have A positive blood group
          result: false
        hint: specific individual's blood type
    TraceTransformDefinition:
      properties:
        variables:
          items:
            $ref: '#/components/schemas/TraceTransformVariableDefinition'
          type: array
          title: Variables
          description: List of variable extraction rules.
      type: object
      required:
      - variables
      title: TraceTransformDefinition
    RuleResponse:
      properties:
        id:
          type: string
          title: Id
          description: ID of the Rule
        name:
          type: string
          title: Name
          description: Name of the Rule
        type:
          $ref: '#/components/schemas/RuleType'
          description: Type of Rule
        apply_to_prompt:
          type: boolean
          title: Apply To Prompt
          description: Rule applies to prompt
        apply_to_response:
          type: boolean
          title: Apply To Response
          description: Rule applies to response
        enabled:
          anyOf:
          - type: boolean
          - type: 'null'
          title: Enabled
          description: Rule is enabled for the task
        scope:
          $ref: '#/components/schemas/RuleScope'
          description: Scope of the rule. The rule can be set at default level or task level.
        created_at:
          type: integer
          title: Created At
          description: Time the rule was created in unix milliseconds
        updated_at:
          type: integer
          title: Updated At
          description: Time the rule was updated in unix milliseconds
        config:
          anyOf:
          - $ref: '#/components/schemas/KeywordsConfig'
          - $ref: '#/components/schemas/RegexConfig'
          - $ref: '#/components/schemas/ExamplesConfig'
          - $ref: '#/components/schemas/ToxicityConfig'
          - $ref: '#/components/schemas/PIIConfig'
          - type: 'null'
          title: Config
          description: Config of the rule
      type: object
      required:
      - id
      - name
      - type
      - apply_to_prompt
      - apply_to_response
      - scope
      - created_at
      - updated_at
      title: RuleResponse
    NotFoundError:
      properties:
        detail:
          type: string
          title: Detail
          default: Resource not found
      type: object
      title: NotFoundError
    InternalServerError:
      properties:
        detail:
          type: string
          title: Detail
          default: Internal server error
      type: object
      title: InternalServerError
    PostTaskRequest:
      properties:
        name:
          type: string
          minLength: 1
          title: Name
          description: The name of the task
        connector_id:
          type: string
          format: uuid
          title: Connector Id
          description: The id of the connector where the task will be created. The connector must be an engine internal connector.
        onboarding_identifier:
          anyOf:
          - type: string
          - type: 'null'
          title: Onboarding Identifier
          description: An identifier to add to the created model, to make it easy to find after the job completes.
        rules_to_add:
          items:
            $ref: '#/components/schemas/NewRuleRequest'
          type: array
          title: Rules To Add
          description: List of rules to add to the task.
        is_agentic:
          type: boolean
          title: Is Agentic
          description: Whether this task should be created as an agentic trace task. If True, no rules will be applied to the task.
          default: false
        agent_metadata:
          anyOf:
          - $ref: '#/components/schemas/AgentMetadata'
          - type: 'null'
          description: Metadata for registered agents.
      type: object
      required:
      - name
      - connector_id
      title: PostTaskRequest
    MetricResponse:
      properties:
        id:
          type: string
          title: Id
          description: ID of the Metric
        name:
          type: string
          title: Name
          description: Name of the Metric
        type:
          $ref: '#/components/schemas/MetricType'
          description: Type of the Metric
        metric_metadata:
          type: string
          title: Metric Metadata
          description: Metadata of the Metric
        config:
          anyOf:
          

# --- truncated at 32 KB (54 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/arthur-ai/refs/heads/main/openapi/arthur-ai-tasks-v1-api-openapi.yml