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?

brandon42
Community Explorer

 

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:

  1. Is /api/v1/files/:id/create_success?uuid=... a supported or documented API endpoint?

  2. If not, what is the official and recommended way to retrieve the uuid or attachment needed for the pre_attachment when importing with zip_file_importer?

  3. Should we always fetch the uploaded file info using /api/v1/folders/:folder_id/files or /api/v1/users/self/files instead?

Any clarification or official guidance would be appreciated. Thanks!

Labels (2)
0 Likes