PATCH https://api.zatomic.ai/v1/prompts/scoring/criteria/{criteriaId}/criterionset/{criterionId}
// Example
PATCH https://api.zatomic.ai/v1/prompts/scoring/criteria/sca_2rjp9HFpIsiYQrAiSbZlz85r3GC/criterionset/scn_2tVwnAnheHa6NKuYvKcXrqDB21z
API Reference
- Overview
- Versioning
- Authentication
- Workspaces
- Status Codes and Errors
- Credit Usage
- Expanding Objects
- OpenAPI Spec
- Contexts
- The Context Object
- Create File Context
- Create Text Context
- Update Context
- Delete Context
- Retrieve Context
- Retrieve All Contexts
- Context Versions
- The Context Version Object
- Create File Context Version
- Create Text Context Version
- Update File Context Version
- Update Text Context Version
- Delete Context Version
- Retrieve Context Version
- Retrieve All Context Versions
- Projects
- The Project Object
- Create Project
- Update Project
- Delete Project
- Retrieve Project
- Retrieve All Projects
- Prompts
- The Prompt Object
- Create Prompt
- Update Prompt
- Delete Prompt
- Retrieve Prompt
- Retrieve All Prompts
- Generate Prompt
- Prompt Versions
- The Prompt Version Object
- Create Prompt Version
- Update Prompt Version
- Delete Prompt Version
- Retrieve Prompt Version
- Retrieve All Prompt Versions
- Calculate Prompt Version Score
- Retrieve Prompt Version Score
- Generate Prompt Version Heatmap
- Retrieve Prompt Version Heatmap
- Analyze Prompt Version Balance
- Retrieve Prompt Version Balance
- Analyze Prompt Version Risk
- Retrieve Prompt Version Risk
- Improve Prompt Version
- Scoring Criteria
- The Scoring Criteria Object
- The Scoring Criterion Object
- Create Scoring Criteria
- Update Scoring Criteria
- Delete Scoring Criteria
- Retrieve Scoring Criteria
- Retrieve All Scoring Criteria
- Generate Scoring Criteria
- Create Scoring Criterion
- Update Scoring Criterion
- Delete Scoring Criterion
- Retrieve Scoring Criterion
- Scoring Criteria Results
- The Scoring Criteria Results Object
- Scoring
- The Scoring Object
- Calculate Prompt Score
- Heatmaps
- The Heatmap Object
- Generate Prompt Heatmap
- Balance
- The Balance Object
- Analyze Prompt Balance
- Risk
- The Risk Object
- Analyze Prompt Risk
Update Scoring Criterion
This endpoint allows you to update an inidividual scoring criterion. All fields are required.
Endpoint
Endpoint Request
| Request Properties | |
|---|---|
|
slug
string
|
The slug for the criterion. Can only contain lowercase letters and underscores. |
|
label
string
|
The criterion label. |
|
description
string
|
The criterion description. |
|
questions
string
|
The question or questions the criterion is trying to answer. |
|
weight
integer
|
The weight assigned to the criterion. Must be a whole number between 1 and 999. |
Request Body
{
"slug": "criterion_slug",
"label": "The label of the criterion.",
"description": "The criterion description.",
"questions": "The question or questions the criterion is trying to answer.",
"weight": 0
}
Endpoint Response
A successful call returns a response that contains the updated scoring criterion object.
| HTTP Status Codes | ||
|---|---|---|
| 200 | OK | The scoring criterion was updated. |
| 400 | Bad Request | The criterion slug was not provided in the request. |
| 400 | Bad Request | The criterion slug contained characters other than lowercase letters and underscores. |
| 400 | Bad Request | The criterion label was not provided in the request. |
| 400 | Bad Request | The criterion description was not provided in the request. |
| 400 | Bad Request | The criterion questions were not provided in the request. |
| 400 | Bad Request | The criterion weight did not have a value. |
| 400 | Bad Request | The criterion weight was not a whole number between 1 and 999. |
| 404 | Not Found | The scoring criterion didn't exist. |
| 500 | Internal Server Error | Something went wrong on Zatomic's end. |