curl --request PATCH \
--url https://api.evalezy.com/v1/exams/{examId}/rubrics \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"questions": {
"b2e1d3c5-7f9a-4b4d-8e6f-0a2c3d4e5f6a": {
"rubric": {
"partial_marking": true,
"criteria": [
{
"name": "Role of hydrochloric acid",
"marks": 1,
"guidance": "Acidic medium, kills germs, activates pepsin."
},
{
"name": "Enzymes named",
"marks": 1,
"keywords": [
"pepsin"
],
"guidance": "Pepsin digests proteins."
},
{
"name": "Mucus and protection",
"marks": 1,
"guidance": "Mucus protects the inner lining from the acid."
}
]
}
},
"d3f2e4c6-8a0b-4c5e-9f7a-1b3d4e5f6a7b": {
"model_answer": null
}
}
}
'import requests
url = "https://api.evalezy.com/v1/exams/{examId}/rubrics"
payload = { "questions": {
"b2e1d3c5-7f9a-4b4d-8e6f-0a2c3d4e5f6a": { "rubric": {
"partial_marking": True,
"criteria": [
{
"name": "Role of hydrochloric acid",
"marks": 1,
"guidance": "Acidic medium, kills germs, activates pepsin."
},
{
"name": "Enzymes named",
"marks": 1,
"keywords": ["pepsin"],
"guidance": "Pepsin digests proteins."
},
{
"name": "Mucus and protection",
"marks": 1,
"guidance": "Mucus protects the inner lining from the acid."
}
]
} },
"d3f2e4c6-8a0b-4c5e-9f7a-1b3d4e5f6a7b": { "model_answer": None }
} }
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
questions: {
'b2e1d3c5-7f9a-4b4d-8e6f-0a2c3d4e5f6a': {
rubric: {
partial_marking: true,
criteria: [
{
name: 'Role of hydrochloric acid',
marks: 1,
guidance: 'Acidic medium, kills germs, activates pepsin.'
},
{
name: 'Enzymes named',
marks: 1,
keywords: ['pepsin'],
guidance: 'Pepsin digests proteins.'
},
{
name: 'Mucus and protection',
marks: 1,
guidance: 'Mucus protects the inner lining from the acid.'
}
]
}
},
'd3f2e4c6-8a0b-4c5e-9f7a-1b3d4e5f6a7b': {model_answer: null}
}
})
};
fetch('https://api.evalezy.com/v1/exams/{examId}/rubrics', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"version": 4,
"questions": [
{
"question_id": "b2e1d3c5-7f9a-4b4d-8e6f-0a2c3d4e5f6a"
}
]
}{
"error": {
"code": "invalid_api_key",
"message": "The API key is not valid.",
"request_id": "req_4f9c2a7e1b3d4c8a9e6f0b2d5a7c1e3f"
}
}{
"error": {
"code": "insufficient_scope",
"message": "This API key lacks the evaluation:write scope.",
"request_id": "req_4f9c2a7e1b3d4c8a9e6f0b2d5a7c1e3f",
"details": {
"required_scope": "evaluation:write"
}
}
}{
"error": {
"code": "not_found",
"message": "The resource was not found.",
"request_id": "req_4f9c2a7e1b3d4c8a9e6f0b2d5a7c1e3f"
}
}{
"error": {
"code": "conflict",
"message": "The request conflicts with the current state.",
"request_id": "req_4f9c2a7e1b3d4c8a9e6f0b2d5a7c1e3f"
}
}{
"error": {
"code": "rubric_version_mismatch",
"message": "The rubric is at version 4, not 3. Re-read it and retry.",
"request_id": "req_4f9c2a7e1b3d4c8a9e6f0b2d5a7c1e3f"
}
}{
"error": {
"code": "validation_failed",
"message": "questions[0].max_marks is required.",
"request_id": "req_4f9c2a7e1b3d4c8a9e6f0b2d5a7c1e3f",
"details": {
"errors": [
{
"field": "questions[0].max_marks",
"code": "required",
"message": "max_marks is required."
}
]
}
}
}{
"error": {
"code": "rate_limited",
"message": "Too many requests. Retry after 2 s.",
"request_id": "req_4f9c2a7e1b3d4c8a9e6f0b2d5a7c1e3f"
}
}Update several rubrics
Sets or clears the rubric and/or model answer of several long-answer questions in one version bump. The body maps question ids to {rubric, model_answer}; send null to clear one.
Criterion marks must add up to the question’s max marks (422 rubric_marks_mismatch), names must be unique (422 rubric_duplicate_criterion) and guidance must not contain mark figures (422 rubric_guidance_has_marks). Send If-Match with the version you read to avoid overwriting someone else’s change.
Scope: evaluation:write
curl --request PATCH \
--url https://api.evalezy.com/v1/exams/{examId}/rubrics \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"questions": {
"b2e1d3c5-7f9a-4b4d-8e6f-0a2c3d4e5f6a": {
"rubric": {
"partial_marking": true,
"criteria": [
{
"name": "Role of hydrochloric acid",
"marks": 1,
"guidance": "Acidic medium, kills germs, activates pepsin."
},
{
"name": "Enzymes named",
"marks": 1,
"keywords": [
"pepsin"
],
"guidance": "Pepsin digests proteins."
},
{
"name": "Mucus and protection",
"marks": 1,
"guidance": "Mucus protects the inner lining from the acid."
}
]
}
},
"d3f2e4c6-8a0b-4c5e-9f7a-1b3d4e5f6a7b": {
"model_answer": null
}
}
}
'import requests
url = "https://api.evalezy.com/v1/exams/{examId}/rubrics"
payload = { "questions": {
"b2e1d3c5-7f9a-4b4d-8e6f-0a2c3d4e5f6a": { "rubric": {
"partial_marking": True,
"criteria": [
{
"name": "Role of hydrochloric acid",
"marks": 1,
"guidance": "Acidic medium, kills germs, activates pepsin."
},
{
"name": "Enzymes named",
"marks": 1,
"keywords": ["pepsin"],
"guidance": "Pepsin digests proteins."
},
{
"name": "Mucus and protection",
"marks": 1,
"guidance": "Mucus protects the inner lining from the acid."
}
]
} },
"d3f2e4c6-8a0b-4c5e-9f7a-1b3d4e5f6a7b": { "model_answer": None }
} }
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
questions: {
'b2e1d3c5-7f9a-4b4d-8e6f-0a2c3d4e5f6a': {
rubric: {
partial_marking: true,
criteria: [
{
name: 'Role of hydrochloric acid',
marks: 1,
guidance: 'Acidic medium, kills germs, activates pepsin.'
},
{
name: 'Enzymes named',
marks: 1,
keywords: ['pepsin'],
guidance: 'Pepsin digests proteins.'
},
{
name: 'Mucus and protection',
marks: 1,
guidance: 'Mucus protects the inner lining from the acid.'
}
]
}
},
'd3f2e4c6-8a0b-4c5e-9f7a-1b3d4e5f6a7b': {model_answer: null}
}
})
};
fetch('https://api.evalezy.com/v1/exams/{examId}/rubrics', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"version": 4,
"questions": [
{
"question_id": "b2e1d3c5-7f9a-4b4d-8e6f-0a2c3d4e5f6a"
}
]
}{
"error": {
"code": "invalid_api_key",
"message": "The API key is not valid.",
"request_id": "req_4f9c2a7e1b3d4c8a9e6f0b2d5a7c1e3f"
}
}{
"error": {
"code": "insufficient_scope",
"message": "This API key lacks the evaluation:write scope.",
"request_id": "req_4f9c2a7e1b3d4c8a9e6f0b2d5a7c1e3f",
"details": {
"required_scope": "evaluation:write"
}
}
}{
"error": {
"code": "not_found",
"message": "The resource was not found.",
"request_id": "req_4f9c2a7e1b3d4c8a9e6f0b2d5a7c1e3f"
}
}{
"error": {
"code": "conflict",
"message": "The request conflicts with the current state.",
"request_id": "req_4f9c2a7e1b3d4c8a9e6f0b2d5a7c1e3f"
}
}{
"error": {
"code": "rubric_version_mismatch",
"message": "The rubric is at version 4, not 3. Re-read it and retry.",
"request_id": "req_4f9c2a7e1b3d4c8a9e6f0b2d5a7c1e3f"
}
}{
"error": {
"code": "validation_failed",
"message": "questions[0].max_marks is required.",
"request_id": "req_4f9c2a7e1b3d4c8a9e6f0b2d5a7c1e3f",
"details": {
"errors": [
{
"field": "questions[0].max_marks",
"code": "required",
"message": "max_marks is required."
}
]
}
}
}{
"error": {
"code": "rate_limited",
"message": "Too many requests. Retry after 2 s.",
"request_id": "req_4f9c2a7e1b3d4c8a9e6f0b2d5a7c1e3f"
}
}Authorizations
Your institute's API key, vak_eval_ followed by 48 hex characters. An institute admin creates keys in the dashboard under Settings -> Integrations -> API keys.
Headers
Optional. The rubric version you last read, e.g. 3. If the rubric has moved on, the call fails with 412 rubric_version_mismatch.
"3"
Path Parameters
Exam id (UUID).
Body
The body is of type object.