API Documentation
Initiate Evaluation Request
Description
This endpoint is used to initiate an assignment evaluation request, applicable for different versions of the evaluation system.
Request
- Endpoint:
/api/open/evaluation/start - Method:
POST
Request Headers
| Parameter | Type | Required | Description |
|---|---|---|---|
X-TOKEN-KEY | string | Yes | Your API key |
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
assignments_title | string | Yes | Assignment title |
assignments_des | string | Yes | Assignment description |
rubrics | Array | Yes | Evaluation criteria, format as per example below |
content | string | Yes | Assignment content |
assignments_type | string | Yes | Dissertation, General Essay, Publication, Report, Short Essay |
total_score | int | Yes | Total score |
total_score_type | string | Yes | Total score mode: average or sum |
Example Request
curl --location '/api/open/evaluation/start' \
--header 'X-TOKEN-KEY: X-TOKEN-KEY' \
--header 'Content-Type: application/json' \
--data '{
"assignments_desc": "This is an assignment description",
"assignments_title": "Assignment Title",
"rubrics": [
{
"item": "Manage",
"rubrics": {
"8-9": "Exceptional management of project with clear, detailed planning, and adjustments documented. Demonstrates outstanding time management and resource allocation.",
"6-7": "Very good management with clear planning and some adjustments. Demonstrates very good time management and resource allocation.",
"4-5": "Adequate management with some planning and few adjustments. Adequate time management and resource allocation.",
"2-3": "Limited management with minimal planning. Poor time management and resource allocation.",
"0-1": "Very poor management with no planning. Very poor time management and resource allocation."
}
},
// ... (other rubrics omitted for brevity)
],
"content": "This is the student's assignment content",
"assignments_type": "General Essay",
"total_score_type": "sum",
"total_score": 100
}'Response
| Parameter | Type | Required | Description |
|---|---|---|---|
status | string | Yes | Request status |
task_id | string | Yes | Task ID |
Example Response
{
"status": "success",
"task_id": "11ab486e-e761-4317-b441-fb683bc4b387"
}Query Evaluation Results
Description
This endpoint is used to query the evaluation results and status, including the task's current position, total queue length, current step, and other information.
Request
- Endpoint:
/api/open/evaluation/result - Method:
POST
Request Headers
| Parameter | Type | Required | Description |
|---|---|---|---|
X-TOKEN-KEY | string | Yes | Your API key |
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
task_id | string | Yes | Task ID |
Example Request
curl --location --request POST '/api/open/evaluation/result?task_id=11ab486e-e761-4317-b441-fb683bc4b387' \
--header 'X-TOKEN-KEY: X-TOKEN-KEY'Response
| Parameter | Type | Required | Description |
|---|---|---|---|
evaluations | Array | Yes | Evaluation results |
task_id | string | Yes | Task ID |
score | string | Yes | Score |
Example Response
{
"data": {
"id": 1,
"user_id": 1,
"token": "2b948fd314884f2e9c702bee693e9587",
"task_id": "445e14ca-26d6-40b3-9b85-b48d576a0287",
"total_score": 100,
"total_score_type": "sum",
"status": "SUCCESS",
"module_code": null,
"assignments_type": "General Essay",
"assignments_desc": "This is an assignment description",
"assignments_title": "Assignment Title",
"content": "This is the student's assignment content",
"evaluation": [
{
"item": "Manage",
"comment": "<b>Strengths</b>: 1. The project demonstrates clear planning and some adjustments. 2. Shows very good time management and resource allocation. <b>Weaknesses</b>: 1. The details of the adjustments are not sufficiently comprehensive and require further elaboration.",
"score": 0,
"sub_score": 7,
"type": "sub_score",
"is_evaluation": true,
"evidence": "... (evidence text omitted for brevity) ..."
},
// ... (other evaluation items omitted for brevity)
],
"cur_step_name": "Finished",
"progress": 100,
"cur_step": 5,
"total_step": 5,
"score": 41,
"position": -1,
"length": null,
"create_time": "2024-07-26T09:01:54.000Z",
"update_time": "2024-07-26T09:01:54.738Z"
},
"code": 0,
"msg": "Success"
}