Set a question's rubric
curl --request PUT \
--url https://api.evalezy.com/v1/exams/{examId}/questions/{questionId}/rubric \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"rubric": {
"partial_marking": true,
"criteria": [
{
"name": "Correct accounts debited and credited",
"marks": 2,
"guidance": "Purchases account debited, creditor credited."
},
{
"name": "Narration",
"marks": 1,
"guidance": "Clear narration for each entry."
},
{
"name": "Amounts and totals",
"marks": 2,
"guidance": "Amounts match the question; totals agree."
}
]
},
"model_answer": "Purchases A/c Dr 50,000 To Mehta Traders 50,000 (Being goods purchased on credit)"
}
'import requests
url = "https://api.evalezy.com/v1/exams/{examId}/questions/{questionId}/rubric"
payload = {
"rubric": {
"partial_marking": True,
"criteria": [
{
"name": "Correct accounts debited and credited",
"marks": 2,
"guidance": "Purchases account debited, creditor credited."
},
{
"name": "Narration",
"marks": 1,
"guidance": "Clear narration for each entry."
},
{
"name": "Amounts and totals",
"marks": 2,
"guidance": "Amounts match the question; totals agree."
}
]
},
"model_answer": "Purchases A/c Dr 50,000 To Mehta Traders 50,000 (Being goods purchased on credit)"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
rubric: {
partial_marking: true,
criteria: [
{
name: 'Correct accounts debited and credited',
marks: 2,
guidance: 'Purchases account debited, creditor credited.'
},
{name: 'Narration', marks: 1, guidance: 'Clear narration for each entry.'},
{
name: 'Amounts and totals',
marks: 2,
guidance: 'Amounts match the question; totals agree.'
}
]
},
model_answer: 'Purchases A/c Dr 50,000 To Mehta Traders 50,000 (Being goods purchased on credit)'
})
};
fetch('https://api.evalezy.com/v1/exams/{examId}/questions/{questionId}/rubric', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"version": 123,
"sync": "<string>",
"question": {},
"questions": [
{}
],
"warnings": [
{
"code": "<string>",
"message": "<string>",
"field": "<string>"
}
]
}{
"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"
}
}Rubrics
Set a question's rubric
Sets or clears one long-answer question’s rubric and/or model answer. Send {"rubric": null} to clear the rubric. The same rules as Update several rubrics apply.
Scope: evaluation:write
PUT
/
exams
/
{examId}
/
questions
/
{questionId}
/
rubric
Set a question's rubric
curl --request PUT \
--url https://api.evalezy.com/v1/exams/{examId}/questions/{questionId}/rubric \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"rubric": {
"partial_marking": true,
"criteria": [
{
"name": "Correct accounts debited and credited",
"marks": 2,
"guidance": "Purchases account debited, creditor credited."
},
{
"name": "Narration",
"marks": 1,
"guidance": "Clear narration for each entry."
},
{
"name": "Amounts and totals",
"marks": 2,
"guidance": "Amounts match the question; totals agree."
}
]
},
"model_answer": "Purchases A/c Dr 50,000 To Mehta Traders 50,000 (Being goods purchased on credit)"
}
'import requests
url = "https://api.evalezy.com/v1/exams/{examId}/questions/{questionId}/rubric"
payload = {
"rubric": {
"partial_marking": True,
"criteria": [
{
"name": "Correct accounts debited and credited",
"marks": 2,
"guidance": "Purchases account debited, creditor credited."
},
{
"name": "Narration",
"marks": 1,
"guidance": "Clear narration for each entry."
},
{
"name": "Amounts and totals",
"marks": 2,
"guidance": "Amounts match the question; totals agree."
}
]
},
"model_answer": "Purchases A/c Dr 50,000 To Mehta Traders 50,000 (Being goods purchased on credit)"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
rubric: {
partial_marking: true,
criteria: [
{
name: 'Correct accounts debited and credited',
marks: 2,
guidance: 'Purchases account debited, creditor credited.'
},
{name: 'Narration', marks: 1, guidance: 'Clear narration for each entry.'},
{
name: 'Amounts and totals',
marks: 2,
guidance: 'Amounts match the question; totals agree.'
}
]
},
model_answer: 'Purchases A/c Dr 50,000 To Mehta Traders 50,000 (Being goods purchased on credit)'
})
};
fetch('https://api.evalezy.com/v1/exams/{examId}/questions/{questionId}/rubric', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"version": 123,
"sync": "<string>",
"question": {},
"questions": [
{}
],
"warnings": [
{
"code": "<string>",
"message": "<string>",
"field": "<string>"
}
]
}{
"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.
Example:
"3"
Path Parameters
Exam id (UUID).
Question id (UUID).
Body
application/json
The body is of type object.