Found this content helpful? Log in or sign up to leave a like!
Does Canvas provide /files/:id/create_success?uuid=... as a usable endpoint for zip file import migration?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi everyone,
I'm currently working on implementing content migrations using the Canvas API, specifically with migration_type=zip_file_importer.
After uploading a .zip file via the file upload flow (starting with POST /api/v1/folders/:folder_id/files), I receive an upload_url and upload_params. I can successfully upload the file to that URL using multipart/form-data.
However, to initiate the content migration, the API requires a pre_attachment or valid file reference. I noticed that the upload flow internally redirects to:
/api/v1/files/:id/create_success?uuid=...
I tried calling this endpoint manually via curl with the correct file ID and UUID, but I receive a 400 Bad Request. It seems this endpoint is intended for internal use by the browser after upload.
My questions are:
-
Is
/api/v1/files/:id/create_success?uuid=...a supported or documented API endpoint? -
If not, what is the official and recommended way to retrieve the
uuidorattachmentneeded for thepre_attachmentwhen importing withzip_file_importer? -
Should we always fetch the uploaded file info using
/api/v1/folders/:folder_id/filesor/api/v1/users/self/filesinstead?
Any clarification or official guidance would be appreciated. Thanks!
