const url = 'https://studyfetchapi.com/api/v1/assignment-grader/create';
const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: '{"rubric":{"criteria":[{"pointsPossible":123,"title":"<string>","description":"<string>"}]},"title":"<string>","materialId":"<string>","model":"<string>","textToGrade":"<string>","userId":"<string>"}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
{
"id": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"grade": 123,
"rubric": {},
"title": "<string>"
}
const url = 'https://studyfetchapi.com/api/v1/assignment-grader/create';
const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: '{"rubric":{"criteria":[{"pointsPossible":123,"title":"<string>","description":"<string>"}]},"title":"<string>","materialId":"<string>","model":"<string>","textToGrade":"<string>","userId":"<string>"}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
{
"id": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"grade": 123,
"rubric": {},
"title": "<string>"
}
API Key for authentication
Assignment graded successfully
The response is of type object
.
Was this page helpful?