Download OpenAPI specification:Download
Endpoints for creating and managing jobs via the Clavata Public API.
Retrieves batch jobs, optionally filtered by batch job IDs or states. If no filters are provided, all batch jobs will be returned.
| batchJobIds | Array of strings IDs of the batch jobs to get. If not provided, all batch jobs will be returned. |
| states | Array of strings Items Enum: "BATCH_JOB_STATE_UNSPECIFIED" "BATCH_JOB_STATE_ERROR" "BATCH_JOB_STATE_INITIALIZED" "BATCH_JOB_STATE_QUEUED" "BATCH_JOB_STATE_PREPROCESSING" "BATCH_JOB_STATE_PREPROCESSED" "BATCH_JOB_STATE_SUBMITTED" "BATCH_JOB_STATE_POSTPROCESSING" "BATCH_JOB_STATE_POSTPROCESSED" "BATCH_JOB_STATE_COMPLETED" "BATCH_JOB_STATE_CANCELLED" The state of the batch jobs to get. If not provided, all batch jobs will be returned. |
{- "batchJobs": [
- {
- "batchJobId": "string",
- "name": "string",
- "state": "BATCH_JOB_STATE_UNSPECIFIED",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "policyId": "string",
- "policyVersionId": "string",
- "outputFileUrl": "string"
}
]
}Creates a new batch job that can process multiple content items in bulk. Returns a presigned URL for uploading the input file. Start the job by making a POST request to StartBatchJob after uploading the input file.
| name | string (The name for the batch job) |
| policyId | string (The policy to be used for the batch job) |
{- "name": "string",
- "policyId": "string"
}{- "batchJobId": "string",
- "name": "string",
- "error": {
- "errorCode": "BATCH_JOB_ERROR_UNSPECIFIED",
- "errorMessage": "string"
}, - "inputFileUploadUrl": "string"
}Cancels a batch job. This will stop the batch job from being processed further.
| batchJobId required | string The ID of the batch job to cancel |
{ }{- "batchJobId": "string",
- "state": "BATCH_JOB_STATE_UNSPECIFIED",
- "error": {
- "errorCode": "BATCH_JOB_ERROR_UNSPECIFIED",
- "errorMessage": "string"
}
}Starts a batch job that has been created. The batch job must have an input file uploaded before it can be started.
| batchJobId required | string The ID of the batch job to start |
{ }{- "batchJobId": "string",
- "state": "BATCH_JOB_STATE_UNSPECIFIED",
- "error": {
- "errorCode": "BATCH_JOB_ERROR_UNSPECIFIED",
- "errorMessage": "string"
}
}Retrieves a list of jobs with optional filtering by time ranges and status. Incomplete jobs will only include basic information.
| query.createdTimeRange.start | string <date-time> The start of the time range |
| query.createdTimeRange.end | string <date-time> The end of the time range |
| query.createdTimeRange.inclusive | boolean Whether to treat the time range as inclusive or exclusive |
| query.updatedTimeRange.start | string <date-time> The start of the time range |
| query.updatedTimeRange.end | string <date-time> The end of the time range |
| query.updatedTimeRange.inclusive | boolean Whether to treat the time range as inclusive or exclusive |
| query.completedTimeRange.start | string <date-time> The start of the time range |
| query.completedTimeRange.end | string <date-time> The end of the time range |
| query.completedTimeRange.inclusive | boolean Whether to treat the time range as inclusive or exclusive |
| query.status | string Default: "JOB_STATUS_UNSPECIFIED" Enum: "JOB_STATUS_UNSPECIFIED" "JOB_STATUS_PENDING" "JOB_STATUS_RUNNING" "JOB_STATUS_COMPLETED" "JOB_STATUS_FAILED" "JOB_STATUS_CANCELED" The status of the job |
| query.policyId | string Policy ID that created the job |
| pageSize | integer <int32> The maximum number of jobs to return |
| pageToken | string A token identifying the page to return; for keyset pagination |
{- "jobs": [
- {
- "jobUuid": "string",
- "customerId": "string",
- "status": "JOB_STATUS_UNSPECIFIED",
- "results": [
- {
- "jobUuid": "string",
- "report": {
- "policyId": "string",
- "policyKey": "string",
- "policyVersionId": "string",
- "result": "OUTCOME_UNSPECIFIED",
- "sectionEvaluationReports": [
- {
- "name": "string",
- "result": "OUTCOME_UNSPECIFIED",
- "message": "string",
- "assertionEvaluationReports": [
- {
- "result": null,
- "message": null,
- "score": null
}
], - "exceptionEvaluationReport": {
- "result": "OUTCOME_UNSPECIFIED",
- "assertionEvaluationReports": [
- null
], - "reviewResult": {
- "outcome": null,
- "score": null
}
}, - "reviewResult": {
- "outcome": "OUTCOME_UNSPECIFIED",
- "score": 0.1
}
}
], - "exceptionEvaluationReport": {
- "result": "OUTCOME_UNSPECIFIED",
- "assertionEvaluationReports": [
- {
- "result": "OUTCOME_UNSPECIFIED",
- "message": "string",
- "score": 0.1
}
], - "reviewResult": {
- "outcome": "OUTCOME_UNSPECIFIED",
- "score": 0.1
}
}, - "contentHash": "string",
- "contentMetadata": {
- "property1": "string",
- "property2": "string"
}, - "reviewResult": {
- "outcome": "OUTCOME_UNSPECIFIED",
- "score": 0.1
}, - "threshold": 0.1,
- "labelMatches": {
- "property1": 0.1,
- "property2": 0.1
}, - "tokenUsage": {
- "inputTokens": 0,
- "billedTokens": 0,
- "multiplier": 0.1
}
}, - "created": "2019-08-24T14:15:22Z"
}
], - "created": "2019-08-24T14:15:22Z",
- "updated": "2019-08-24T14:15:22Z",
- "completed": "2019-08-24T14:15:22Z",
- "policyId": "string",
- "policyVersionId": "string",
- "threshold": 0.1
}
], - "nextPageToken": "string"
}Retrieves details of a specific job, including evaluation results if the job is complete.
| jobUuid required | string jobId is the unique identifier of the job |
{- "job": {
- "jobUuid": "string",
- "customerId": "string",
- "status": "JOB_STATUS_UNSPECIFIED",
- "results": [
- {
- "jobUuid": "string",
- "report": {
- "policyId": "string",
- "policyKey": "string",
- "policyVersionId": "string",
- "result": "OUTCOME_UNSPECIFIED",
- "sectionEvaluationReports": [
- {
- "name": "string",
- "result": "OUTCOME_UNSPECIFIED",
- "message": "string",
- "assertionEvaluationReports": [
- {
- "result": "OUTCOME_UNSPECIFIED",
- "message": "string",
- "score": 0.1
}
], - "exceptionEvaluationReport": {
- "result": "OUTCOME_UNSPECIFIED",
- "assertionEvaluationReports": [
- {
- "result": null,
- "message": null,
- "score": null
}
], - "reviewResult": {
- "outcome": "OUTCOME_UNSPECIFIED",
- "score": 0.1
}
}, - "reviewResult": {
- "outcome": "OUTCOME_UNSPECIFIED",
- "score": 0.1
}
}
], - "exceptionEvaluationReport": {
- "result": "OUTCOME_UNSPECIFIED",
- "assertionEvaluationReports": [
- {
- "result": "OUTCOME_UNSPECIFIED",
- "message": "string",
- "score": 0.1
}
], - "reviewResult": {
- "outcome": "OUTCOME_UNSPECIFIED",
- "score": 0.1
}
}, - "contentHash": "string",
- "contentMetadata": {
- "property1": "string",
- "property2": "string"
}, - "reviewResult": {
- "outcome": "OUTCOME_UNSPECIFIED",
- "score": 0.1
}, - "threshold": 0.1,
- "labelMatches": {
- "property1": 0.1,
- "property2": 0.1
}, - "tokenUsage": {
- "inputTokens": 0,
- "billedTokens": 0,
- "multiplier": 0.1
}
}, - "created": "2019-08-24T14:15:22Z"
}
], - "created": "2019-08-24T14:15:22Z",
- "updated": "2019-08-24T14:15:22Z",
- "completed": "2019-08-24T14:15:22Z",
- "policyId": "string",
- "policyVersionId": "string",
- "threshold": 0.1
}
}Creates a new job for content evaluation. Can be configured to wait for completion or return immediately with a job ID.
required | Array of objects (Content Data) The content data to be evaluated. Only one content type should be set per entry. |
| policyId required | string (The policy keys to be evaluated) |
| threshold | number <double> The threshold to use for truthyness. If not set a default value will be used. |
| expedited | boolean If set, the job will be evaluated in expedited mode, prioritizing speed over cost. |
object (Webhook Details (Optional)) A POST request to make when the job is complete. | |
object (v1CreateJobRequestOptions) Options for evaluation behavior. |
{- "contentData": [
- {
- "text": "string",
- "image": "string",
- "imageUrl": "string",
- "metadata": {
- "property1": "string",
- "property2": "string"
}
}
], - "policyId": "string",
- "threshold": 0.1,
- "expedited": true,
- "webhook": {
- "url": "string",
- "extraHeaders": {
- "property1": "string",
- "property2": "string"
}
}, - "options": {
- "options": {
- "property1": "string",
- "property2": "string"
}
}
}{- "job": {
- "jobUuid": "string",
- "customerId": "string",
- "status": "JOB_STATUS_UNSPECIFIED",
- "results": [
- {
- "jobUuid": "string",
- "report": {
- "policyId": "string",
- "policyKey": "string",
- "policyVersionId": "string",
- "result": "OUTCOME_UNSPECIFIED",
- "sectionEvaluationReports": [
- {
- "name": "string",
- "result": "OUTCOME_UNSPECIFIED",
- "message": "string",
- "assertionEvaluationReports": [
- {
- "result": "OUTCOME_UNSPECIFIED",
- "message": "string",
- "score": 0.1
}
], - "exceptionEvaluationReport": {
- "result": "OUTCOME_UNSPECIFIED",
- "assertionEvaluationReports": [
- {
- "result": null,
- "message": null,
- "score": null
}
], - "reviewResult": {
- "outcome": "OUTCOME_UNSPECIFIED",
- "score": 0.1
}
}, - "reviewResult": {
- "outcome": "OUTCOME_UNSPECIFIED",
- "score": 0.1
}
}
], - "exceptionEvaluationReport": {
- "result": "OUTCOME_UNSPECIFIED",
- "assertionEvaluationReports": [
- {
- "result": "OUTCOME_UNSPECIFIED",
- "message": "string",
- "score": 0.1
}
], - "reviewResult": {
- "outcome": "OUTCOME_UNSPECIFIED",
- "score": 0.1
}
}, - "contentHash": "string",
- "contentMetadata": {
- "property1": "string",
- "property2": "string"
}, - "reviewResult": {
- "outcome": "OUTCOME_UNSPECIFIED",
- "score": 0.1
}, - "threshold": 0.1,
- "labelMatches": {
- "property1": 0.1,
- "property2": 0.1
}, - "tokenUsage": {
- "inputTokens": 0,
- "billedTokens": 0,
- "multiplier": 0.1
}
}, - "created": "2019-08-24T14:15:22Z"
}
], - "created": "2019-08-24T14:15:22Z",
- "updated": "2019-08-24T14:15:22Z",
- "completed": "2019-08-24T14:15:22Z",
- "policyId": "string",
- "policyVersionId": "string",
- "threshold": 0.1
}
}Initiates a streaming job that processes content data and returns results as they become available. Useful for real-time content evaluation.
required | Array of objects (Content Data) The content data to be evaluated. Only one content type should be set per entry. |
| policyId required | string (policy_keys is the list of policy names to be evaluated. If empty, all policies will be evaluated) |
| threshold | number <double> The threshold to use for truthyness. If not set a default value will be used. |
| expedited | boolean If set, the job will be evaluated in expedited mode, prioritizing speed over cost. |
object (v1EvaluateRequestOptions) Options for evaluation behavior. |
{- "contentData": [
- {
- "text": "string",
- "image": "string",
- "imageUrl": "string",
- "metadata": {
- "property1": "string",
- "property2": "string"
}
}
], - "policyId": "string",
- "threshold": 0.1,
- "expedited": true,
- "options": {
- "options": {
- "property1": "string",
- "property2": "string"
}
}
}{- "result": {
- "jobUuid": "string",
- "contentHash": "string",
- "policyEvaluationReport": {
- "policyId": "string",
- "policyKey": "string",
- "policyVersionId": "string",
- "result": "OUTCOME_UNSPECIFIED",
- "sectionEvaluationReports": [
- {
- "name": "string",
- "result": "OUTCOME_UNSPECIFIED",
- "message": "string",
- "assertionEvaluationReports": [
- {
- "result": "OUTCOME_UNSPECIFIED",
- "message": "string",
- "score": 0.1
}
], - "exceptionEvaluationReport": {
- "result": "OUTCOME_UNSPECIFIED",
- "assertionEvaluationReports": [
- {
- "result": "OUTCOME_UNSPECIFIED",
- "message": "string",
- "score": 0.1
}
], - "reviewResult": {
- "outcome": "OUTCOME_UNSPECIFIED",
- "score": 0.1
}
}, - "reviewResult": {
- "outcome": "OUTCOME_UNSPECIFIED",
- "score": 0.1
}
}
], - "exceptionEvaluationReport": {
- "result": "OUTCOME_UNSPECIFIED",
- "assertionEvaluationReports": [
- {
- "result": "OUTCOME_UNSPECIFIED",
- "message": "string",
- "score": 0.1
}
], - "reviewResult": {
- "outcome": "OUTCOME_UNSPECIFIED",
- "score": 0.1
}
}, - "contentHash": "string",
- "contentMetadata": {
- "property1": "string",
- "property2": "string"
}, - "reviewResult": {
- "outcome": "OUTCOME_UNSPECIFIED",
- "score": 0.1
}, - "threshold": 0.1,
- "labelMatches": {
- "property1": 0.1,
- "property2": 0.1
}, - "tokenUsage": {
- "inputTokens": 0,
- "billedTokens": 0,
- "multiplier": 0.1
}
}
}, - "error": {
- "code": 0,
- "message": "string",
- "details": [
- {
- "@type": "string",
- "property1": null,
- "property2": null
}
]
}
}