List
Resource: /api/v2/assessment_actions
HTTPS Request Method: GET
Description: A list of all assessment actions associated with a given assessment.
Required Parameters:
- api_key
- Either course[code], course[id] or assessment[id]
Note: there is no filtering or pagination for this endpoint.
Example Requests and Responses:
Only available request:
curl -X GET -d '{"api_key": "123456", "assessment":{"id":"16"}}' -H "Content-type: application/json" -H "Accept: application/json" http://your-subdomain.exceedlms.com/api/v2/assessment_actions
Example Response:
[
{
"id" : 1,
"assessment" : {
"id" : 16,
"course_assessment" : {
"id" : 54,
"name" : "Assessment Example"
}
},
"due_days" : null,
"enrollment_type" : "recommended",
"score_min" : 0,
"score_max" : 100
},
{
"score_max" : 100,
"score_min" : 0,
"enrollment_type" : "recommended",
"due_days" : null,
"assessment" : {
"id" : 16,
"course_assessment" : {
"name" : "Assessment Example",
"id" : 54
}
},
"assessment_question_section" : {
"id" : 31,
"name" : "Default"
},
"id" : 2
},
{
"assessment" : {
"course_assessment" : {
"id" : 54,
"name" : "Assessment Example"
},
"id" : 16
},
"id" : 4,
"enrollment_type" : "recommended",
"due_days" : null,
"score_min" : 0,
"score_max" : 100
},
{
"id" : 5,
"assessment_question_section" : {
"id" : 31,
"name" : "Default"
},
"assessment" : {
"id" : 16,
"course_assessment" : {
"id" : 54,
"name" : "Assessment Example"
}
},
"due_days" : null,
"enrollment_type" : "recommended",
"score_max" : 60,
"score_min" : 50
},
{
"assessment" : {
"id" : 16,
"course_assessment" : {
"id" : 54,
"name" : "Assessment Example"
}
},
"assessment_question_section" : {
"name" : "Default",
"id" : 31
},
"id" : 6,
"score_min" : 40,
"score_max" : 100,
"enrollment_type" : "required",
"due_days" : 5
}
]
Note: actions that are associated to the total assessement will not return an “assessment_question_section” key in the response.
Read
Resource: /api/v2/assessment_actions/id_of_resource
HTTPS Request Method: GET
Description: A single assessment question that matches the id passed in.
Required Parameters:
api_key
- Either
course[code]
,course[id]
orassessment[id]
id
of resource at end of url
Example Request:
curl -X GET -d '{"api_key": "123456", "assessment":{"id":"16"}}' -H "Content-type: application/json" -H "Accept: application/json" http://your-subdomain.exceedlms.com/api/v2/assessment_actions/6
Example Response:
{
"due_days" : 5,
"enrollment_type" : "required",
"score_max" : 100,
"assessment_question_section" : {
"id" : 31,
"name" : "Default"
},
"assessment" : {
"id" : 16,
"course_assessment" : {
"id" : 54,
"name" : "An assessment"
}
},
"id" : 6,
"score_min" : 40
}
Note: actions that are associated to the total assessment will not return an “assessment_question_section” key in the response.
Create
*Resource: */api/v2/assessment_actions
HTTPS Request Method: POST
Description: Creates a new assessment action object.
Required Parameters:
api_key
- Either
course[code]
,course[id]
orassessment[id]
assessment_action[course_id, score_max, score_min, enrollment_type]
Optional Parameters:
The following optional parameters must be within the assessment_action
key:
assessment_question_section_id
due_days (integer)
Example Requests:
Recommendation action based on total assessment score:
This request supplies the minimum required parameters.
curl -X POST -d '{"api_key": "123456", "assessment":{"id":"16"}, "assessment_action":{ "course_id":"13", "score_min":0, "score_max":50, "enrollment_type":”recommended”}}' -H "Content-type: application/json" -H "Accept: application/json" http://your-subdomain.exceedlms.com/api/v2/assessment_actions
Example Response:
{
"due_days" : null,
"enrollment_type" : "recommended",
"score_max" : 50,
"assessment" : {
"id" : 16,
"course_assessment" : {
"id" : 54,
"name" : "An assessment"
}
},
"score_min" : 0,
"id" : 7
}
Requirement action based on an assessment section score, with a due date:
This request supplies all possible parameters.
curl -X POST -d '{"api_key": "123456", "assessment":{"id":"16"}, "assessment_action":{ "course_id":"13", "score_min":20, "score_max":60, "assessment_question_section_id": 31, "enrollment_type":"required", "due_days": 10}}' -H "Content-type: application/json" -H "Accept: application/json" http://your-subdomain.exceedlms.com/api/v2/assessment_actions
Example Response:
{
"id" : 8,
"score_min" : 20,
"assessment_question_section" : {
"id" : 31,
"name" : "Default"
},
"due_days" : 10,
"score_max" : 60,
"assessment" : {
"course_assessment" : {
"name" : "An assessment",
"id" : 54
},
"id" : 16
},
"enrollment_type" : "required"
}
Update
Resource: /api/v2/assessment_actions/id_of_resource
HTTPS Request Method: PATCH or PUT
Description: Updates an assessment action object.
Required Parameters:
api_key
- Either
course[code]
,course[id]
orassessment[id]
id
of resource at end of urlassessment_action
key is also required with one or more of the optional parameters below
Optional Parameters:
The following optional parameters must be within the assessment_action
key:
course_id
score_max (integer between 0 and 100)
score_min (integer between 0 and 100)
enrollment_type (either "recommended" or "required")
assessment_question_section_id
due_days (integer, greater than 0)
Example Request:
curl -X PATCH -d '{"api_key": "123456", "assessment":{"id":"35"}, "assessment_action":{"enrollment_type":"recommended", "due_days":3 }}' -H "Content-type: application/json" -H "Accept: application/json" http://your-subdomain.exceedlms.com/api/v2/assessment_actions/7
Example Response:
{
"score_min" : 0,
"enrollment_type" : "recommended",
"id" : 7,
"due_days" : 3,
"assessment" : {
"id" : 16,
"course_assessment" : {
"name" : "An assessment",
"id" : 54
}
},
"score_max" : 50
}
Delete
Resource: /api/v2/assessment_actions/id_of_resource
HTTPS Request Method: DELETE
Description: Destroys an assessment action object.
Required Parameters:
api_key
id
of resource at end of url- Either
course[code]
,course[id]
orassessment[id]
Deleting this object will not delete any associations.
Example Request:
curl -X DELETE -d '{"api_key": "123456", "assessment":{"id":"16"}}' -H "Content-type: application/json" -H "Accept: application/json" http://your-subdomain.exceedlms.com/api/v2/assessment_actions/7
Example Response:
{
"enrollment_type" : "recommended",
"id" : 7,
"due_days" : 3,
"assessment" : {
"id" : 16,
"course_assessment" : {
"id" : 54,
"name" : "An assessment"
}
},
"score_max" : 50,
"score_min" : 0
}
Note: Even though we respond with the object, rest assured it has been removed from our system. Subsequent calls to delete it will result in an error.