Version: Kora Courses, December 23, 2022 or later
Permissions required: Administrator
- Digication administrators have the ability to utilize CSV import files for batch creation and updates and deletion of users, courses, and registrations.
- These CSV files can be imported either manually through the administration UI or through automated uploads for increased efficiency.
There are three types of data import files: User, Course, and Registration. Each file type must be imported separately.
For more information about the data import files, including formatting files, importing manually, and reviewing import logs, please see the articles under “Import data using CSV”.
All data is sent using the Comma Separated Values (CSV) format, defined in RFC 4180. Data should be sent in UTF-8. The maximum file size of a single import is 25MB. If an import is larger than this, it must be split and processed as separate imports.
Automating imports
Generating an import key
Imports can be automated by using Digication’s API and a unique key that can be generated in your Administration area.
- To generate a key, log into Digication as an Administrator and click Administration (1).
- Click Kora Administration (2) and then click Import (3). Select “Keys” (4).
- Click “+Generate Import Key” (5) to generate a unique key. You can generate one or more unique keys for data integration.
Once you’ve generated your key, you can use it to securely and automatically import data into Digication.
Data Transmission using cURL
A free tool called “cURL” is available for most platforms that can be used to automate the upload process. It can be downloaded from https://curl.haxx.se/
For each import, the following information is required:
- resourceType (USER/COURSE/REGISTRATION)
- Correctly formatted import file
In order for the files to process correctly, CSV files for automated imports must use the CSV headers provided in our CSV import templates. To learn more about how to format the CSV files and example templates, please refer to "Import data using CSV".
An example of the recommended cURL syntax used to upload the CSV files using our API is below.
curl https://YOURSCHOOLHERE.digication.com/srvs/campus-api/graphql \
-F operations='{ "query": "mutation($userFile: Upload!) {createImports(imports: [{resourceType: USER,file: $userFile}], key:\"ALPHA-NUMERIC-API-KEY\") {id }}", "variables": { "userFile": null } }' \
-F map='{ "0": ["variables.userFile"] }' -F 0=@/PATH-TO-YOUR-FILE-HERE
Just like a manually processed import file, you can view the status of any automated imports, including error reports, in the Kora Administration area.
For periodic CSV file uploads whether nightly or at a frequency of your choice you have the flexibility to automate the upload process using your preferred tool. Popular options include using scheduled tasks on Windows or employing cron jobs on Linux or Unix-based systems.
Comments
Please sign in to leave a comment.