ArthurAI Tasks V1 API
The Tasks V1 API from ArthurAI — 7 operation(s) for tasks v1.
The Tasks V1 API from ArthurAI — 7 operation(s) for tasks v1.
openapi: 3.1.0
info:
title: Arthur GenAI Engine Agent Discovery Tasks V1 API
version: 2.1.688
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:
AgentMetadataResponse:
properties:
provider:
$ref: '#/components/schemas/RegisteredAgentProvider'
description: Provider of the registered agent.
gcp_metadata:
anyOf:
- $ref: '#/components/schemas/GCPAgentMetadataResponse'
- type: 'null'
description: Metadata for the agent.
service_names:
anyOf:
- items:
type: string
type: array
- type: 'null'
title: Service Names
description: List of service names that send traces to this task
type: object
required:
- provider
title: AgentMetadataResponse
description: Agent metadata for responses.
ToxicityConfig:
properties:
threshold:
type: number
title: Threshold
description: 'Optional. Float (0, 1) indicating the level of tolerable toxicity to consider the rule passed or failed. Min: 0 (no toxic language) Max: 1 (very toxic language). Default: 0.5'
default: 0.5
additionalProperties: false
type: object
title: ToxicityConfig
example:
threshold: 0.5
NewRuleRequest:
properties:
name:
type: string
title: Name
description: Name of the rule
examples:
- SSN Regex Rule
type:
type: string
title: Type
description: Type of the rule. It can only be one of KeywordRule, RegexRule, ModelSensitiveDataRule, ModelHallucinationRule, ModelHallucinationRuleV2, PromptInjectionRule, PIIDataRule
examples:
- RegexRule
apply_to_prompt:
type: boolean
title: Apply To Prompt
description: Boolean value to enable or disable the rule for llm prompt
examples:
- true
apply_to_response:
type: boolean
title: Apply To Response
description: Boolean value to enable or disable the rule for llm response
examples:
- false
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:
- name
- type
- apply_to_prompt
- apply_to_response
title: NewRuleRequest
example1:
description: Sensitive Data Example with its required configuration
summary: Sensitive Data Example
value:
apply_to_prompt: true
apply_to_response: false
config:
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 types
name: Sensitive Data Rule
type: ModelSensitiveDataRule
example2:
description: Regex Example with its required configuration. Be sure to properly encode requests using JSON libraries. For example, the regex provided encodes to a different string when encoded to account for escape characters.
summary: Regex Example
value:
apply_to_prompt: true
apply_to_response: true
config:
regex_patterns:
- \d{3}-\d{2}-\d{4}
- \d{5}-\d{6}-\d{7}
name: SSN Regex Rule
type: RegexRule
example3:
description: Keywords Rule Example with its required configuration
summary: Keywords Rule Example
value:
apply_to_prompt: true
apply_to_response: true
config:
keywords:
- Blocked_Keyword_1
- Blocked_Keyword_2
name: Blocked Keywords Rule
type: KeywordRule
example4:
description: Prompt Injection Rule Example, no configuration required
summary: Prompt Injection Rule Example
value:
apply_to_prompt: true
apply_to_response: false
name: Prompt Injection Rule
type: PromptInjectionRule
example5:
description: Hallucination Rule Example, no configuration required (This rule is deprecated. Use ModelHallucinationRuleV2 instead.)
summary: Hallucination Rule V1 Example (Deprecated)
value:
apply_to_prompt: false
apply_to_response: true
name: Hallucination Rule
type: ModelHallucinationRule
example6:
description: Hallucination Rule Example, no configuration required
summary: Hallucination Rule V2 Example
value:
apply_to_prompt: false
apply_to_response: true
name: Hallucination Rule
type: ModelHallucinationRuleV2
example7:
description: Hallucination Rule Example, no configuration required. This rule is in beta and must be enabled by the system administrator.
summary: Hallucination Rule V3 Example (Beta)
value:
apply_to_prompt: false
apply_to_response: true
name: Hallucination Rule
type: ModelHallucinationRuleV3
example8:
description: PII Rule Example, no configuration required. "disabled_pii_entities", "confidence_threshold", and "allow_list" accepted. Valid value for "confidence_threshold" is 0.0-1.0. Valid values for "disabled_pii_entities" are CREDIT_CARD,CRYPTO,DATE_TIME,EMAIL_ADDRESS,IBAN_CODE,IP_ADDRESS,NRP,LOCATION,PERSON,PHONE_NUMBER,MEDICAL_LICENSE,URL,US_BANK_NUMBER,US_DRIVER_LICENSE,US_ITIN,US_PASSPORT,US_SSN
summary: PII Rule Example
value:
apply_to_prompt: true
apply_to_response: true
config:
allow_list:
- arthur.ai
- Arthur
confidence_threshold: '0.5'
disabled_pii_entities:
- EMAIL_ADDRESS
- PHONE_NUMBER
name: PII Rule
type: PIIDataRule
example9:
description: Toxicity Rule Example, no configuration required. Threshold accepted
summary: Toxicity Rule Example
value:
apply_to_prompt: true
apply_to_response: true
config:
threshold: 0.5
name: Toxicity Rule
type: ToxicityRule
MetricType:
type: string
enum:
- QueryRelevance
- ResponseRelevance
- ToolSelection
title: MetricType
PutTaskConnectionInfo:
properties:
validation_key:
$ref: '#/components/schemas/PostTaskValidationAPIKey'
description: The information for the API key with validation permissions for the task.
api_host:
type: string
title: Api Host
description: Host for the task.
type: object
required:
- validation_key
- api_host
title: PutTaskConnectionInfo
PostTaskValidationAPIKey:
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
title: Key
description: The value of the API key.
type: object
required:
- id
- name
- key
title: PostTaskValidationAPIKey
InternalServerError:
properties:
detail:
type: string
title: Detail
default: Internal server error
type: object
title: InternalServerError
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
RegisteredAgentProvider:
type: string
enum:
- gcp
- external
title: RegisteredAgentProvider
KeywordsConfig:
properties:
keywords:
items:
type: string
type: array
title: Keywords
description: List of Keywords
type: object
required:
- keywords
title: KeywordsConfig
example:
keywords:
- Blocked_Keyword_1
- Blocked_Keyword_2
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
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:
- type: string
- type: 'null'
title: Config
description: JSON-serialized configuration for the Metric
created_at:
type: string
format: date-time
title: Created At
description: Time the Metric was created in unix milliseconds
updated_at:
type: string
format: date-time
title: Updated At
description: Time the Metric was updated in unix milliseconds
enabled:
anyOf:
- type: boolean
- type: 'null'
title: Enabled
description: Whether the Metric is enabled
type: object
required:
- id
- name
- type
- metric_metadata
- created_at
- updated_at
title: MetricResponse
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
TaskResponse:
properties:
id:
type: string
title: Id
description: ' ID of the task'
name:
type: string
title: Name
description: Name of the task
created_at:
type: integer
title: Created At
description: Time the task was created in unix milliseconds
updated_at:
type: integer
title: Updated At
description: Time the task was created in unix milliseconds
is_agentic:
anyOf:
- type: boolean
- type: 'null'
title: Is Agentic
description: Whether the task is agentic or not
is_system_task:
anyOf:
- type: boolean
- type: 'null'
title: Is System Task
description: Whether this is a system-managed task (e.g., for traces without a task_id or service name, or for Arthur-created traces)
default: false
is_autocreated:
anyOf:
- type: boolean
- type: 'null'
title: Is Autocreated
description: Whether this task was automatically created by Arthur
default: false
is_archived:
anyOf:
- type: boolean
- type: 'null'
title: Is Archived
description: Whether this task is archived
default: false
agent_metadata:
anyOf:
- $ref: '#/components/schemas/AgentMetadataResponse'
- type: 'null'
description: Metadata to describe the creation source/provider for registered agents.
rules:
items:
$ref: '#/components/schemas/RuleResponse'
type: array
title: Rules
description: List of all the rules for the task.
metrics:
anyOf:
- items:
$ref: '#/components/schemas/MetricResponse'
type: array
- type: 'null'
title: Metrics
description: List of all the metrics for the task.
type: object
required:
- id
- name
- created_at
- updated_at
- rules
title: TaskResponse
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
RuleType:
type: string
enum:
- KeywordRule
- ModelHallucinationRuleV2
- ModelSensitiveDataRule
- PIIDataRule
- PromptInjectionRule
- RegexRule
- ToxicityRule
title: RuleType
RuleScope:
type: string
enum:
- default
- task
title: RuleScope
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
BadRequestError:
properties:
detail:
type: string
title: Detail
default: Bad Request
type: object
title: BadRequestError
LLMBaseConfigSettings:
properties:
timeout:
anyOf:
# --- truncated at 32 KB (54 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/arthurai/refs/heads/main/openapi/arthurai-tasks-v1-api-openapi.yml