Content Migrations API
API for accessing content migrations and migration issues
A MigrationIssue object looks like:
{ // the unique identifier for the issue id: 370663 // API url to the content migration content_migration_url: "https://example.com/api/v1/courses/1/content_migrations/1" // Description of the issue for the end-user description: "Questions in this quiz couldn't be converted" // Current state of the issue: active, resolved workflow_state: "active" // HTML Url to the Canvas page to investigate the issue fix_issue_html_url "https://example.com/courses/1/quizzes/2" // Severity of the issue: todo, warning, error issue_type: "warning" // Link to a Canvas error report if present (If the requesting user has permissions) error_report_html_url: "https://example.com/error_reports/3" // Site administrator error message (If the requesting user has permissions) error_message: "admin only message" // timestamps created_at: "2012-06-01T00:00:00-06:00", updated_at: "2012-06-01T00:00:00-06:00", }
A ContentMigration object looks like:
{ // the unique identifier for the migration id: 370663, // API url to the content migration's issues migration_issues_url: "https://example.com/api/v1/courses/1/content_migrations/1/migration_issues" // url to download the file uploaded for this migration // may not be present for all migrations content_archive_download_url: "https://example.com/api/v1/courses/1/content_migrations/1/download_archive" // The user who started the migration user_id: 4 // Current state of the issue: created pre_processing pre_processed pre_process_error converting converted importing imported failed workflow_state: "exporting" // timestamps started_at: "2012-06-01T00:00:00-06:00", finished_at: "2012-06-01T00:00:00-06:00", }
List migration issues MigrationIssuesController#index
GET /api/v1/courses/:course_id/content_migrations/:content_migration_id/migration_issues
Returns paginated migration issues
Example Request:
curl https://<canvas>/api/v1/courses/<course_id>/content_migrations/<content_migration_id>/migration_issues \ -H 'Authorization: Bearer <token>'
Get a migration issue MigrationIssuesController#show
GET /api/v1/courses/:course_id/content_migrations/:content_migration_id/migration_issues/:id
Returns data on an individual migration issue
Example Request:
curl https://<canvas>/api/v1/courses/<course_id>/content_migrations/<content_migration_id>/migration_issues/<id> \ -H 'Authorization: Bearer <token>'
Update a migration issue MigrationIssuesController#update
PUT /api/v1/courses/:course_id/content_migrations/:content_migration_id/migration_issues/:id
Update the workflow_state of a migration issue
Request Parameters:
-
workflow_state
Set the workflow_state of the issue, only 'active' and 'resolved' accepted
Example Request:
curl -X PUT https://<canvas>/api/v1/courses/<course_id>/content_migrations/<content_migration_id>/migration_issues/<id> \ -H 'Authorization: Bearer <token>' \ -F 'workflow_state=resolved'
List content migrations ContentMigrationsController#index
GET /api/v1/courses/:course_id/content_migrations
Returns paginated content migrations
Example Request:
curl https://<canvas>/api/v1/courses/<course_id>/content_migrations \ -H 'Authorization: Bearer <token>'
Get a content migration ContentMigrationsController#show
GET /api/v1/courses/:course_id/content_migrations/:id
Returns data on an individual content migration
Example Request:
curl https://<canvas>/api/v1/courses/<course_id>/content_migrations/<id> \ -H 'Authorization: Bearer <token>'