Versions Compared

Key

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

Status
colourRed
titleRogo 6.1.0

Web services

The following restful endpoints are available:

...

Expand
titleGradebook

Filter by assessment

Handler

Gradebook requests for a specifc 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>


External Systems

...

...

From 6.4.0


External system need to be provided with external id in all calls.

...

The following config settings can be found in the rogo config fileconfiguration screen:

$cfgcfg_enable_apiEnables or disables the API functionality
$cfgapi_oauth_access_lifetimeStores in seconds the lifetime of an oauth access token
$cfgapi_oauth_refresh_token_lifetimeStores in seconds the lifetime of an oauth refresh token
$cfgapi_oauth_always_issue_new_refresh_tokenEnables or disables the oauth refresh token
api_allow_superuser

Allow sys admin users to access all availbe external systems

6.5.0 onwards.


Developer Tools


insert into config (component, setting, value) values ('core', 'apilogfile', '<writeable_path>/api.log');

the configuration screen via the 'apilogfile' setting

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

From Rogo 6.4

.

0 this setting can be set in teh configuration screen - Adminstration Tools > Configuration

Expand
titleLogging

Logging of all API requests and reponses can be enabled by added the apilogfile config item in the database:

Code Block
languagesql
Info


Expand
titleFrameworks

The following frameworks are used in the api code:

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

...