SIS Imports
API for importing data from Student Information Systems
A SisImportData object looks like:
A SisImportStatistic object looks like:
A SisImportStatistics object looks like:
A SisImportCounts object looks like:
A SisImport object looks like:
GET /api/v1/accounts/:account_id/sis_imports
GET /api/v1/accounts/:account_id/sis_imports
Scope: url:GET|/api/v1/accounts/:account_id/sis_imports
Returns the list of SIS imports for an account
Example:
Request Parameters:
Parameter | Type | Description |
---|---|---|
|
| If set, only shows imports created after the specified date (use ISO8601 format) |
|
| If set, only shows imports created before the specified date (use ISO8601 format) |
|
| If set, only returns imports that are in the given state. Allowed values: |
Returns a list of SisImport objects.
SisImportsApiController#importing
GET /api/v1/accounts/:account_id/sis_imports/importing
GET /api/v1/accounts/:account_id/sis_imports/importing
Scope: url:GET|/api/v1/accounts/:account_id/sis_imports/importing
Returns the SIS imports that are currently processing for an account. If no imports are running, will return an empty array.
Example:
Returns a SisImport object.
SisImportsApiController#create
POST /api/v1/accounts/:account_id/sis_imports
POST /api/v1/accounts/:account_id/sis_imports
Scope: url:POST|/api/v1/accounts/:account_id/sis_imports
Import SIS data into Canvas. Must be on a root account with SIS imports enabled.
For more information on the format that’s expected here, please see the “SIS CSV” section in the API docs.
Request Parameters:
Parameter | Type | Description |
---|---|---|
|
| Choose the data format for reading SIS data. With a standard Canvas install, this option can only be ‘instructure_csv’, and if unprovided, will be assumed to be so. Can be part of the query string. |
|
| There are two ways to post SIS import data - either via a multipart/form-data form-field-style attachment, or via a non-multipart raw post request.
‘attachment’ is required for multipart/form-data style posts. Assumed to be SIS data from a file upload form field named ‘attachment’.
Examples:
If you decide to do a raw post, you can skip the ‘attachment’ argument, but you will then be required to provide a suitable Content-Type header. You are encouraged to also provide the ‘extension’ argument.
Examples:
If the attachment is a zip file, the uncompressed file(s) cannot be 100x larger than the zip, or the import will fail. For example, if the zip file is 1KB but the total size of the uncompressed file(s) is 100KB or greater the import will fail. There is a hard cap of 50 GB. |
|
| Recommended for raw post request style imports. This field will be used to distinguish between zip, xml, csv, and other file format extensions that would usually be provided with the filename in the multipart post request scenario. If not provided, this value will be inferred from the Content-Type, falling back to zip-file format if all else fails. |
|
| If set, this SIS import will be run in batch mode, deleting any data previously imported via SIS that is not present in this latest import. See the SIS CSV Format page for details. Batch mode cannot be used with diffing. |
|
| Limit deletions to only this term. Required if batch mode is enabled. |
|
| Runs batch mode against all terms in terms file. Requires change_threshold. |
|
| When set the import will skip any deletes. This does not account for objects that are deleted during the batch mode cleanup process. |
|
| Default is false. If true, any fields containing “sticky” or UI changes will be overridden. See SIS CSV Format documentation for information on which fields can have SIS stickiness |
|
| This option, if present, will process all changes as if they were UI changes. This means that “stickiness” will be added to changed fields. This option is only processed if ‘override_sis_stickiness’ is also provided. |
|
| This option, if present, will clear “stickiness” from all fields touched by this import. Requires that ‘override_sis_stickiness’ is also provided. If ‘add_sis_stickiness’ is also provided, ‘clear_sis_stickiness’ will overrule the behavior of ‘add_sis_stickiness’ |
|
| This option, if present, will override the old (or non-existent) non-matching SIS ID with the new SIS ID in the upload, if a pseudonym is found from the login field and the SIS ID doesn’t match. |
|
| If set on a CSV import, Canvas will attempt to optimize the SIS import by comparing this set of CSVs to the previous set that has the same data set identifier, and only applying the difference between the two. See the SIS CSV Format documentation for more details. Diffing cannot be used with batch_mode |
|
| If true, and diffing_data_set_identifier is sent, this SIS import will be part of the data set, but diffing will not be performed. See the SIS CSV Format documentation for details. |
|
| If diffing_drop_status is passed, this SIS import will use this status for enrollments that are not included in the sis_batch. Defaults to ‘deleted’ Allowed values: |
|
| For users removed from one batch to the next one using the same diffing_data_set_identifier, set their status to the value of this argument. Defaults to ‘deleted’. Allowed values: |
|
| If batch_mode_enrollment_drop_status is passed, this SIS import will use this status for enrollments that are not included in the sis_batch. This will have an effect if multi_term_batch_mode is set. Defaults to ‘deleted’ This will still mark courses and sections that are not included in the sis_batch as deleted, and subsequently enrollments in the deleted courses and sections as deleted. Allowed values: |
|
| If set with batch_mode, the batch cleanup process will not run if the number of items deleted is higher than the percentage set. If set to 10 and a term has 200 enrollments, and batch would delete more than 20 of the enrollments the batch will abort before the enrollments are deleted. The change_threshold will be evaluated for course, sections, and enrollments independently. If set with diffing, diffing will not be performed if the files are greater than the threshold as a percent. If set to 5 and the file is more than 5% smaller or more than 5% larger than the file that is being compared to, diffing will not be performed. If the files are less than 5%, diffing will be performed. The way the percent is calculated is by taking the size of the current import and dividing it by the size of the previous import. The formula used is: |
|
| If set with diffing, diffing will not be performed if the number of rows to be run in the fully calculated diff import exceeds the threshold. |
Returns a SisImport object.
GET /api/v1/accounts/:account_id/sis_imports/:id
GET /api/v1/accounts/:account_id/sis_imports/:id
Scope: url:GET|/api/v1/accounts/:account_id/sis_imports/:id
Get the status of an already created SIS import.
Returns a SisImport object.
SisImportsApiController#restore_states
PUT /api/v1/accounts/:account_id/sis_imports/:id/restore_states
PUT /api/v1/accounts/:account_id/sis_imports/:id/restore_states
Scope: url:PUT|/api/v1/accounts/:account_id/sis_imports/:id/restore_states
This will restore the the workflow_state for all the items that changed their workflow_state during the import being restored. This will restore states for items imported with the following importers: accounts.csv terms.csv courses.csv sections.csv group_categories.csv groups.csv users.csv admins.csv This also restores states for other items that changed during the import. An example would be if an enrollment was deleted from a sis import and the group_membership was also deleted as a result of the enrollment deletion, both items would be restored when the sis batch is restored.
Request Parameters:
Parameter | Type | Description |
---|---|---|
|
| If set, will only restore items that were deleted from batch_mode. |
|
| If set, will only restore items that were deleted. This will ignore any items that were created or modified. |
|
| If set, will only restore enrollments that were concluded. This will ignore any items that were created or deleted. |
Example Request:
Returns a Progress object.
PUT /api/v1/accounts/:account_id/sis_imports/:id/abort
PUT /api/v1/accounts/:account_id/sis_imports/:id/abort
Scope: url:PUT|/api/v1/accounts/:account_id/sis_imports/:id/abort
Abort a SIS import that has not completed.
Aborting a sis batch that is running can take some time for every process to see the abort event. Subsequent sis batches begin to process 10 minutes after the abort to allow each process to clean up properly.
Example Request:
Returns a SisImport object.
SisImportsApiController#abort_all_pending
PUT /api/v1/accounts/:account_id/sis_imports/abort_all_pending
PUT /api/v1/accounts/:account_id/sis_imports/abort_all_pending
Scope: url:PUT|/api/v1/accounts/:account_id/sis_imports/abort_all_pending
Abort already created but not processed or processing SIS imports.
Example Request:
© Instructure, Inc. Generated on Wed Nov 6 14:20:09 2024 This documentation is generated directly from the Canvas LMS source code, available on Github.
Last updated