The Course Toolkit Application Programming Interface (API) enables you integrate your course with an existing website and/or applications.
Note: this feature is intended for software developers only. Enabling the API allows access to your account and users - we recommend disabling it if you do not wish to use it, and
regularly updating your API key with a secure password in order to keep your account data secure.
Enabling API Access
To use the API, you must first enable API access and specify an API key, or password, in your account settings:
- Sign in to your Course Toolkit account
- Click the Settings tab
- Choose the 'API Access' option and enable/disable API access. If you want to use the API, specifiy a secure API key (password)
Once you have enabled your API, you can access it via a POST request to the following URL:
|api-user||Your account ID (e.g. 523098). This can be found in the Settings tab.
|api-key||Your account API key as specified in your account settings.
|api-action||The action name for your API request.
|Other||Other API request-specific values
The API response is formatted as an associative JSON array.
|response||Response status code (0 = Success)
|response_description||An explanation of the response error (where applicable)
|Other||Other request-specific values
You can call any of the following API functions using the api-action field:
- Removes user.
Requires: userid (ID of the user)
- Creates a new user if user doesn't exist.
Requires: email (email address of the new user)
- Returns details of a user including line-separated course permissions in format "COURSEID PERMISSIONS" where PERMISSIONS is 'all' for full course access or comma-separated individual module IDs
Requires: userid (account number of the user)