Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Expand
titleModule management

Handler

All module management requests should hit /api/modulemanagement.

Schema

The module management schema is available at /api/schema/modulemanagement/managementrequest.xsd

Create

In order to create a module the create tag needs to be sent containing the name, modluecodemodulecode, school and faculty tags.

Code Block
languagexml
titleCreate Request
<?xml version="1.0" encoding="utf-8"?>
<moduleManagementRequest xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://localhost/rogo/api/schema/modulemanagement/managementrequest.xsd">
	<create id="str1234">
    	<modulecode>abc</modulecode>
    	<name>abc</name>
    	<school>abc</school>
    	<faculty>abc</faculty>
  	</create>
</moduleManagementRequest>

If the operation is successful the response returns the id of the created module in the id node and a message of 'OK' in the status node. The create tags id attribute is return in order for the external system to match up its request with the response. i.e. a request might contain 100 create requests, meaning we need to be able to identify the response to the specific request.

Code Block
languagexml
titleCreate Response
<?xml version="1.0" encoding="utf-8"?>
<moduleManagementResponse>
	<create id="str1234">
		<id>23</id>
        <status_code>100</status_code>
		<status>OK</status>
	</create>
</moduleManagementResponse>

If there is an error performing the operation the response message returns an id in the id node if applicable and a message in the status node. The create tags id attribute is return in order for the external system to match up its request with the response. i.e. a request might contain 100 create requests, meaning we need to be able to identify the response to the specific request.

Code Block
languagexml
titleCreate Error Response
<?xml version="1.0" encoding="utf-8"?>
<moduleManagementResponse>
	<create id="str1234">
		<id>12</id>
		<status_code>505</status_code>
		<status>Module already exists</status>
	</create>
</moduleManagementResponse>

Update

In order to update a module the update tag needs to be sent containing an id tag (or external id) of the module to be updated.

Code Block
languagexml
titleUpdate Request
<?xml version="1.0" encoding="utf-8"?>
<moduleManagementRequest xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://localhost/rogo/api/schema/modulemanagement/managementrequest.xsd">
	<update id="1">
    	<id>23</id>
    	<name>abcd</name>
	</update>
</moduleManagementRequest>

If the operation is successful the response returns the id of the updated module in the id node and a message of 'OK' in the status node. The create tags id attribute is return in order for the external system to match up its request with the response. i.e. a request might contain 100 create requests, meaning we need to be able to identify the response to the specific request.

Code Block
languagexml
titleUpdate Response
<?xml version="1.0" encoding="utf-8"?>
<moduleManagementResponse>
	<update id="1">
        <id>23</id>
		<status_code>100</status_code>
		<status>OK</status>
	</update>
</moduleManagementResponse>

If there is an error performing the operation the response message returns a null id node and a message in the status node. The create tags id attribute is return in order for the external system to match up its request with the response. i.e. a request might contain 100 create requests, meaning we need to be able to identify the response to the specific request.

Code Block
languagexml
titleCreate Error Response
<?xml version="1.0" encoding="utf-8"?>
<moduleManagementResponse>
	<update id="1">
        <id></id>
        <status_code>501</status_code>
		<status>Module does not exist</status>
	</update>
</moduleManagementResponse>
Valid attributes
AttributeActionInfoRequired?
idupdateThe id used to identify the module to updateOnly used when updating
externalidcreate/updateThe external is used to identify the moduleIf using the externalid as your primary identifier instead of id
externalsyscreate/updateThe name of the external systemIf using the externalid as your primary identifier instead of id
modulecodecreate/updateThe code of the moduleWhen creating
namecreate/updateThe name of the moduleWhen creating
schoolcreate/updateSchool the module is in i.e. 'School of Computer Science'When creating and if updating faculty
facultycreate/updateFaculty the module is in i.e. 'Faculty of Science'. Only when school attribute supplied
smscreate/updateStudent management system used to create moduleNo


Delete

In order to delete a module the delete tag needs to be sent containing an id tag of the module to be deleted.

Code Block
languagexml
titleDelete Request
<?xml version="1.0" encoding="utf-8"?>
<moduleManagementRequest xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://localhost/rogo/api/schema/modulemanagement/managementrequest.xsd">
	<delete id="az">
		<id>23</id>
	</delete>
</moduleManagementRequest>

If the operation is successful the response returns the id of the deleted module in the id node and a message of 'OK' in the status node. The delete tags id attribute is return in order for the external system to match up its request with the response. i.e. a request might contain 100 delete requests, meaning we need to be able to identify the response to the specific request.

Code Block
languagexml
titleDelete Response
<?xml version="1.0" encoding="utf-8"?>
<moduleManagementResponse>
	<delete id="az">
		<id>23</id>
        <status_code>100</status_code>
		<status>OK</status>
	</delete>
</moduleManagementResponse>

If there is an error performing the operation the response message returns a null id node and a message in the status node. The delete tags id attribute is return in order for the external system to match up its request with the response. i.e. a request might contain 100 delete requests, meaning we need to be able to identify the response to the specific request.

Code Block
languagexml
titleCreate Error Response
<?xml version="1.0" encoding="utf-8"?>
<moduleManagementResponse>
	<delete id="az">
		<id></id>
        <status>You do not have permission to run this action</status>
	</delete>
</moduleManagementResponse>
Valid attributes
AttributeActionInfoRequired?
iddeleteThe id used to identify the module to deleteYes
externalidcreate/updateThe external is used to identify the moduleIf using the externalid as your primary identifier instead of id


Response Codes

Possible response codes are as follows:

CodeDescription

100

Action successfully performed

500

Error deleting module
501Module does not exist
502Cannot delete module as in use
503Error updating module
504Error creating module
505Module already exists
506Faculty not supplied
511School not supplied
512Nothing to update
513School External ID already in use


...

Expand
titleUser management

Handler

All user management requests should hit /api/usermanagement.

Schema

The user management schema is available at /api/schema/usermanagement/managementrequest.xsd

Create

In order to create a user the create tag needs to be sent containing the username, surname, course and role at the minimum.

Code Block
languagexml
titleCreate Request
<?xml version="1.0" encoding="utf-8"?>
<userManagementRequest xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://localhost/rogo/api/schema/usermanagement/managementrequest.xsd">
	<create id="str1234">
    	<username>test</username>
    	<surname>testy</surname>
    	<role>Student</role>
    	<course>test</course>
    	<modules>
    		<moduleid id="dfdsf">2</moduleid>
    	</modules>
	</create>
</userManagementRequest>

If the operation is successful the response returns the id of the created user in the id node and a message of 'OK' in the status node. The create tags id attribute is return in order for the external system to match up its request with the response. i.e. a request might contain 100 create requests, meaning we need to be able to identify the response to the specific request.

Code Block
languagexml
titleCreate Response
<?xml version="1.0" encoding="utf-8"?>
<userManagementResponse>
	<create id="str1234">
        <id>1133</id>
        <status_code>100</status_code>
		<status>OK</status>
	</create>
</userManagementResponse>

If there is an error performing the operation the response message returns an id in the id node if applicable and a message in the status node. The create tags id attribute is return in order for the external system to match up its request with the response. i.e. a request might contain 100 create requests, meaning we need to be able to identify the response to the specific request.

Code Block
languagexml
titleCreate Error Response
<?xml version="1.0" encoding="utf-8"?>
<userManagementResponse>
	<create id="str1234">
        <id></id>
		<status_code>703</status_code>
		<status>User not created</status>
	</create>
</userManagementResponse>

Update

In order to update a user the update tag needs to be sent containing an id tag of the user to be updated.

Code Block
languagexml
titleUpdate Request
<?xml version="1.0" encoding="utf-8"?>
<userManagementRequest xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://localhost/rogo/api/schema/usermanagement/managementrequest.xsd">
	<update id="str1234">
    	<id>1133</id>
    	<surname>testy2</surname>
	</update>
</userManagementRequest>

If the operation is successful the response returns the id of the updated user in the id node and a message of 'OK' in the status node. The create tags id attribute is return in order for the external system to match up its request with the response. i.e. a request might contain 100 create requests, meaning we need to be able to identify the response to the specific request.

Code Block
languagexml
titleUpdate Response
<?xml version="1.0" encoding="utf-8"?>
<facultyManagementResponse>
	<update id="str1234">
        <id>1133</id>
        <status_code>100</status_code>
		<status>OK</status>
	</update>
</facultyManagementResponse>

If there is an error performing the operation the response message returns a null id node and a message in the status node. The create tags id attribute is return in order for the external system to match up its request with the response. i.e. a request might contain 100 create requests, meaning we need to be able to identify the response to the specific request.

Code Block
languagexml
titleCreate Error Response
<?xml version="1.0" encoding="utf-8"?>
<userManagementResponse>
	<update id="str1234">
        <id></id>
		<status_code>702</status_code>
		<status>User not updated</status>
	</update>
</userManagementResponse>
Valid attributes
AttributeActionInfoRequired?
idupdateThe id used to identify the user to updateOnly used when updating
usernamecreate/updatea unique usernameOn creation
surnamecreate/updatethe users surnameOn creation
rolecreate/updatethe users role i.e. StudentOn creation
titlecreate/updatethe users titleNo
forenamecreate/updatefirst name of the userNo
initialscreate/updateinitials for the userNo
emailcreate/updatethe users unique email addressNo
passwordcreate/updatepassword for the user if not using ldapNo
coursecreate/updatethe course the student is studying / staff typeNo
gendercreate/updategender of the userNo
yearcreate/updatethe current year the studnet student is studyingNo
studentidcreate/updatea studnet student id from an external SMSNo
modulescreate/updateThe modules the user is enroled enrolled onNo


Delete

In order to delete a user the delete tag needs to be sent containing an id tag of the user to be deleted.

Code Block
languagexml
titleDelete Request
<?xml version="1.0" encoding="utf-8"?>
<userManagementRequest xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://localhost/rogo/api/schema/usermanagement/managementrequest.xsd">
	<delete id="str1234">
    	<id>1133</id>
	</delete>
</userManagementRequest>

If the operation is successful the response returns the id of the deleted user in the id node and a message of 'OK' in the status node. The delete tags id attribute is return in order for the external system to match up its request with the response. i.e. a request might contain 100 delete requests, meaning we need to be able to identify the response to the specific request.

Code Block
languagexml
titleDelete Response
<?xml version="1.0" encoding="utf-8"?>
<userManagementResponse>
	<delete id="str1234">
        <id>1133</id>
        <status_code>100</status_code>
		<status>OK</status>
	</delete>
</userManagementResponse>

If there is an error performing the operation the response message returns a null id node and a message in the status node. The delete tags id attribute is return in order for the external system to match up its request with the response. i.e. a request might contain 100 delete requests, meaning we need to be able to identify the response to the specific request.

Code Block
languagexml
titleDelete Error Response
<?xml version="1.0" encoding="utf-8"?>
<userManagementResponse>
	<delete id="str1234">
        <id></id>
        <status>User does not exist</status>
	</delete>
</userManagementResponse>
Valid attributes
AttributeActionInfoRequired?
iddeleteThe id used to identify the user to deleteOnly used when updating


Response Codes

Possible response codes are as follows:

CodeDescription

100

Action successfully performed
700Error when deleting user
701User does not exist
702Error when updating user
703Error when creating user
704User not deleted as in use
705Course does not exist
706User already exists
707Invalid user role
708Nothing to update

Notes 1 - Roles

The only valid roles are as follows:

StudentsStaff Members
StudentStaff
GraduateInactive Staff
Left

Students are assigned to a course, Staff emembers members use the course field to assign there type. The supported staff types are as follows:

University Lecturer
NHS Lecturer

If you are looking to change a student user to a staff suer user via the API (or vice-versa) then it is important to also supply the course.

Notes 2 - Modules

The current functionality of the usermanagement API is to only enrol users onto modules that have been provided in the modules element. No un-enrolment takes place. The reasoning behind this is that the usermanagement API is to be used as the initial creation/upadte of the users before the churn of an academic year starts. Once the churn starts the modulemanagement/enrol api should be used as this is more efficient at enrolling and un-enrolling users.

...

Expand
titleModule Enrolment

Handler

All module management requests should hit /api/modulemanagement/enrol.

Schema

The user enrolment schema is available at /api/schema/modulemanagement/enrolrequest.xsd

Enrol

In order to enrol a user onto a module the module id, user id and user attempt must be provided (the academic session is considered to be the current session unless provided).

Code Block
languagexml
titleCreate Request
<?xml version="1.0" encoding="utf-8"?>
<moduleManagementEnrolRequest xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://localhost/rogo/api/schema/modulemanagement/enrolrequest.xsd">
	<enrol id="str1234">
    	<userid>119</userid>
    	<moduleid>3</moduleid>
    	<attempt>3</attempt>
	</enrol>
</moduleManagementEnrolRequest>

If the operation is successful the response returns the id of the enrolement enrolment in the id node and a message of 'OK' in the status node. The create tags id attribute is return in order for the external system to match up its request with the response. i.e. a request might contain 100 create requests, meaning we need to be able to identify the response to the specific request.

Code Block
languagexml
titleCreate Response
<?xml version="1.0" encoding="utf-8"?>
<moduleManagementEnrolResponse>
	<enrol id="str1234">
        <id>38</id>
        <status_code>100</status_code>
		<status>OK</status>
	</enrol>
</moduleManagementEnrolResponse>

If there is an error performing the operation the response message returns an id in the id node if applicable and a message in the status node. The create tags id attribute is return in order for the external system to match up its request with the response. i.e. a request might contain 100 enrol requests, meaning we need to be able to identify the response to the specific request.

Code Block
languagexml
titleCreate Error Response
<?xml version="1.0" encoding="utf-8"?>
<moduleManagementEnrolResponse>
	<enrol id="str1234">
        <id></id>
		<status_code>507</status_code>
		<status>User does not exist</status>
	</enrol>
</moduleManagementEnrolResponse>

Un-enrol

In order to un-enrol a user onto a module the module id and  user id must be provided (the academic session is considered to be the current session unless provided).

Code Block
languagexml
titleCreate Request
<?xml version="1.0" encoding="utf-8"?>
<moduleManagementEnrolRequest xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://localhost/rogo/api/schema/modulemanagement/enrolrequest.xsd">
	<unenrol id="str1234">
    	<userid>119</userid>
    	<moduleid>3</moduleid>
		<session>2016</session>
	</unenrol>
</moduleManagementEnrolRequest>

If the operation is successful the response returns the id of the enrolement in the id node and a message of 'OK' in the status node. The create tags id attribute is return in order for the external system to match up its request with the response. i.e. a request might contain 100 create requests, meaning we need to be able to identify the response to the specific request.

Code Block
languagexml
titleCreate Response
<?xml version="1.0" encoding="utf-8"?>
<moduleManagementEnrolResponse>
	<unenrol id="str1234">
        <id>38</id>
        <status_code>100</status_code>
		<status>OK</status>
	</unenrol>
</moduleManagementEnrolResponse>

If there is an error performing the operation the response message returns an id in the id node if applicable and a message in the status node. The create tags id attribute is return in order for the external system to match up its request with the response. i.e. a request might contain 100 enrol requests, meaning we need to be able to identify the response to the specific request.

Code Block
languagexml
titleCreate Error Response
<?xml version="1.0" encoding="utf-8"?>
<moduleManagementEnrolResponse>
	<unenrol id="str1234">
        <id></id>
		<status_code>507</status_code>
 		<status>User does not exist</status>
	</unenrol>
</moduleManagementEnrolResponse>
Valid attributes
AttributeActionInfoRequired?
useridenrol/unenrolThe rogo user id to enrol/unenrol to/from a moduleYes
moduleidenrol/unenrolthe rogo module id to enrol/unenrol to/fromYes
sessionenrol/unenrolThe academic year the enrolment is forFor unenrol
attemptenrol/unenrolThe users attempt at this moduleWhen enrolling


Response Codes

Possible response codes are as follows:

CodeDescription

100

Action successfully performed
507Invalid user
508Error enrolling user
509Error unenrolling user
510Invalid academic session supplied
514User already enrolled


Notes

The enrolment API only enrols users onto modules as students.


...

Expand
titleAssessment management

Handler

All assessment management requests should hit /api/assessmentmanagement.

Schema

The user management schema is available at /api/schema/assessmentmanagement/managementrequest.xsd

Create

In order to create an assessment the create tag needs to be sent containing the title, type, owner, session, start date, end date and modules at the minimum.

Code Block
languagexml
titleCreate Request
<?xml version="1.0" encoding="utf-8"?>
<assessmentManagementRequest xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://localhost/rogo/api/schema/assessmentmanagement/managementrequest.xsd">
	<create id="str1234">
    	<title>test</title>
    	<type>Formative</type>
    	<owner>1</owner>
    	<session>2016</session>
		<startdatetime>2016-05-30T09:00:00</startdatetime>
		<enddatetime>2016-05-30T10:00:00</enddatetime> 
		<modules>
    		<moduleid id="dfdsf">2</moduleid>
    	</modules>
	</create>
</assessmentManagementRequest>

If the operation is successful the response returns the id of the created assessmentin the id node and a message of 'OK' in the status node. The create tags id attribute is return in order for the external system to match up its request with the response. i.e. a request might contain 100 create requests, meaning we need to be able to identify the response to the specific request.

Code Block
languagexml
titleCreate Response
<?xml version="1.0" encoding="utf-8"?>
<assessmentManagementResponse>
	<create id="str1234">
        <id>1133</id>
		<status_code>100</status_code>
		<status>OK</status>
	</create>
</assessmentManagementResponse>

If there is an error performing the operation the response message returns an id in the id node if applicable and a message in the status node. The create tags id attribute is return in order for the external system to match up its request with the response. i.e. a request might contain 100 create requests, meaning we need to be able to identify the response to the specific request.

Code Block
languagexml
titleCreate Error Response
<?xml version="1.0" encoding="utf-8"?>
<assessmentManagementResponse>
	<create id="str1234">
        <id></id>
		<status_code>215</status_code>
 		<status>Paper type unknown</status>
	</create>
</assessmentManagementResponse>

Update

In order to update an assessment the update tag needs to be sent containing an id tag of the assessment to be updated.

Code Block
languagexml
titleUpdate Request
<?xml version="1.0" encoding="utf-8"?>
<assessmentManagementRequest xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://localhost/rogo/api/schema/assessmentmanagement/managementrequest.xsd">
	<update id="str1234">
    	<id>1133</id>
    	<title>testy2</title>
	</update>
</assessmentManagementRequest>

If the operation is successful the response returns the id of the updated assessment in the id node and a message of 'OK' in the status node. The create tags id attribute is return in order for the external system to match up its request with the response. i.e. a request might contain 100 create requests, meaning we need to be able to identify the response to the specific request.

Code Block
languagexml
titleUpdate Response
<?xml version="1.0" encoding="utf-8"?>
<assessmentManagementResponse>
	<update id="str1234">
        <id>1133</id>
		<status_code>100</status_code>
 		<status>OK</status>
	</update>
</assessmentManagementResponse>

If there is an error performing the operation the response message returns a null id node and a message in the status node. The create tags id attribute is return in order for the external system to match up its request with the response. i.e. a request might contain 100 create requests, meaning we need to be able to identify the response to the specific request.

Code Block
languagexml
titleCreate Error Response
<?xml version="1.0" encoding="utf-8"?>
<assessmentManagementResponse>
	<update id="str1234">
        <id></id>
		<status_code>206</status_code>
		<status>Assessment title is already in use</status>
	</update>
</assessmentManagementResponse>
Valid attributes
AttributeActionInfoRequired?
idupdateThe id used to identify the assessment to updateOnly used when updating
externalidcreate/updateThe external is used to identify the moduleIf using the externalid as your primary identifier instead of id
externalsyscreate/updateThe name of the external systemIf using the externalid as your primary identifier instead of id
titlecreate/updateThe title of the assessmenton creation
typecreateThe type of assessmentcreate only
ownercreate/updateThe owner of the assessment within Rogoon creation
sessioncreate/updateThe academic year the assessment is run inon creation
startdatetimecreate/updateThe start time of the assessmenton creation
enddatetimecreate/updateThe end time of the assessmenton creation
modulescreate/updateThe modules the assessment is run underon creation
timezonecreate/updateThe timezone the assessment will be taken inno
durationcreate/updateThe duration of the assessmentno
labscreate/updateThe labs the assessment will be taken inno


Delete

In order to delete a assessment the delete tag needs to be sent containing an id tag of the user to be deleted.

Code Block
languagexml
titleDelete Request
<?xml version="1.0" encoding="utf-8"?>
<assessmentManagementRequest xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://localhost/rogo/api/schema/assessmentmanagement/managementrequest.xsd">
	<delete id="str1234">
    	<id>1133</id>
	</delete>
</assessmentManagementRequest>

If the operation is successful the response returns the id of the deleted assessment in the id node and a message of 'OK' in the status node. The delete tags id attribute is return in order for the external system to match up its request with the response. i.e. a request might contain 100 delete requests, meaning we need to be able to identify the response to the specific request.

Code Block
languagexml
titleDelete Response
<?xml version="1.0" encoding="utf-8"?>
<assessmentManagementResponse>
	<delete id="str1234">
        <id>1133</id>
		<status_code>100</status_code>
 		<status>OK</status>
	</delete>
</assessmentManagementResponse>

If there is an error performing the operation the response message returns a null id node and a message in the status node. The delete tags id attribute is return in order for the external system to match up its request with the response. i.e. a request might contain 100 delete requests, meaning we need to be able to identify the response to the specific request.

Code Block
languagexml
titleDelete Error Response
<?xml version="1.0" encoding="utf-8"?>
<assessmentManagementResponse>
	<delete id="str1234">
        <id></id>
		<status_code>202</status_code>
 		<status>Paper does not exist</status>
	</delete>
</assessmentManagementResponse>
Valid attributes
AttributeActionInfoRequired?
iddeleteThe id used to identify the assessment to deleteyes
externalidcreate/updateThe external is used to identify the moduleIf using the externalid as your primary identifier instead of id


Schedule

In order to schedule an assessment the schedule tag needs to be sent containing the owner, title, duration, session and month at a minimum.

Code Block
languagexml
titleSchedule Request
<?xml version="1.0" encoding="utf-8"?>
<assessmentManagementRequest xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://localhost/rogo/api/schema/assessmentmanagement/managementrequest.xsd">
	<schedule id="str1234">
		<owner>1</owner>
		<title>test</title>
    	<session>2016</session>
        <duration>60</duration>
		<month>1</month>
		<modules>
    		<moduleid id="dfdsf">2</moduleid>
    	</modules>
  	</schedule>
</assessmentManagementRequest>

If the operation is successful the response returns the id of the scheduled assessment in the id node and a message of 'OK' in the status node. The delete tags id attribute is return in order for the external system to match up its request with the response. i.e. a request might contain 100 schedule requests, meaning we need to be able to identify the response to the specific request.

Code Block
languagexml
titleSchedule Response
<?xml version="1.0" encoding="utf-8"?>
<assessmentManagementResponse>
	<schedule id="str1234">
        <id>1133</id>
		<status_code>100</status_code>
 		<status>OK</status>
	</schedule>
</assessmentManagementResponse>

If there is an error performing the operation the response message returns a null id node and a message in the status node. The delete tags id attribute is return in order for the external system to match up its request with the response. i.e. a request might contain 100 schedule requests, meaning we need to be able to identify the response to the specific request.

Code Block
languagexml
titleSchedule Error Response
<?xml version="1.0" encoding="utf-8"?>
<assessmentManagementResponse>
	<schedule id="str1234">
        <id></id>
		<status_code>214</status_code>
 		<status>This system is set-up to only allow the scheduling of summative exams</status>
	</schedule>
</assessmentManagementResponse>
Valid attributes
AttributeActionInfoRequired?
titlescheduleThe title of the assessmentyes
ownerscheduleThe owner of the assessment within Rogoyes
sessionscheduleThe academic year the assessment is run inyes
modulesscheduleThe modules the assessment is run underyes
durationscheduleThe duration of the assessmentyes
monthscheduleThe month we would like to schedule inyes
cohort_sizescheduleSize of cohortYes
sittingsscheduleHow many sittings are requiredno
barriersscheduleAre barriers required in the exam roomno
notesscheduleMisc notesno
campusscheduleReuqest Request campus to run the assessment onno
externalidcreate/updateThe external is used to identify the moduleIf using the externalid as your primary identifier instead of id
externalsyscreate/updateThe name of the external systemIf using the externalid as your primary identifier instead of id


Response Codes

Possible response codes are as follows:

CodeDescription

100

Action successfully performed

200

Undefined error
201Error deleting paper
202Paper does not exist cannot delete
203Paper not deleted as in use
204Error creating paper
205Error scheduling paper
206Invalid paper title
207Invalid paper owner
208Invalid user role
209Invalid academic session
210Paper doesn not exist cannot update
211Invalid modules supplied
212Invalid start/end date supplied
213Error updating paper
214Cannot create summative paper as centrally controlled
215

Invalid paper type supplied

216Nothing to update
217External ID already in use


...

Expand
titleGradebook

Filter by assessment

Handler

Gradebook requests for a specifc specific paper should hit /api/gradebook/paper/<id>.

Code Block
languagexml
titleGradebook filer by assessment response
<?xml version="1.0" encoding="utf-8"?>
<gradebookResponse>
    <assessment id="<id>">
    	<gradeitem>
        	<userid>1</userid>
        	<username>test</username>
        	<raw_grade>40</raw_grade>
        	<adjusted_grade>30</adjusted_grade>
        	<classification>Fail</classification>
   		</gradeitem>
    	...
	</assessment>
</gradebookResponse>


Filter by module

Handler

Gradebook requests for a specifc module should hit /api/gradebook/module/<id>.

Code Block
languagexml
titleGradebook filer by module response
<?xml version="1.0" encoding="utf-8"?>
<gradebookResponse>
	<module id="<id>">
		<assessment id="1234">
    		<gradeitem>
        		<userid>1</userid>
        		<username>test</username>
        		<raw_grade>60</raw_grade>
        		<adjusted_grade>55</adjusted_grade>
        		<classification>Pass</classification>
    		</gradeitem>
    		...
		</assessment>
		..
	</module>
</gradebookResponse>


If there is an error performing and of the above operations the response message returns null in the id node and a message in the status node. The create tags id attribute is returned in order to match up its request with the response.

Code Block
languagexml
titleGradebook Error Response
<?xml version="1.0" encoding="utf-8"?>
<gradebookResponse>
	<gradebook id="1234">
        <id></id>
        <status>Gradebook not found for module 1234</status>
	</unenrol>
</gradebookResponse>


...


In order to use the web services  defiend defined in the API you must be authenticated. Authentication is acheived achieved via Oauth2.Rogo uses the bshaffer php library.

...

cfg_enable_apiEnables or disables the API functionality
api_oauth_access_lifetimeStores in seconds the lifetime of an oauth access token
api_oauth_refresh_token_lifetimeStores in seconds the lifetime of an oauth refresh token
api_oauth_always_issue_new_refresh_tokenEnables or disables the oauth refresh token
api_allow_superuser

Allow sys admin users to access all availbe available external systems

6.5.0 onwards.

...

Expand
titleLogging

Logging of all API requests and reponses responses can be enabled by added the apilogfile config item in the configuration screen via the 'apilogfile' setting

Logging is only suggested for development servers as it will chew through your disk space.

...

Expand
titleFrameworks

The following frameworks are used in the api code:

  • Slim - php api framework
  • Twig - php template engine