The Instructure Community will enter a read-only state on November 22, 2025 as we prepare to migrate to our new Community platform in early December.
Read our blog post for more info about this change.
Hello,
I am trying to work with the Canvas API to automate backups of Pages in a course. Eventually I would like to backup all pages, but at the moment, I'll settle for just any single page. I am trying the following, which gives me just an empty shell.
curl -d "export_type=common_cartridge&select[pages]=<???>" -X POST -H "Authorization: Bearer <secret>" "https://server.instructure.com/api/v1/courses/329697/content_exports"
I believe I am not formatting the <???> correctly. The API documentation says "The value for each key is a list of object ids. An id can be an integer or a string." but I must not be formatting the "list" correctly. I have tried just a page id by itself, wrapped in [ ] and wrapped in { } to no avail.
I'll keep working on it, but please help if you can.
Thanks,
Jay
I haven't done a content export before, but it looks like the selective content may be similar to the selective content for a content migration (https://canvas.instructure.com/doc/api/content_migrations.html#method.content_migrations.content_lis... ).
Rather than using select[pages]=<???>, you could try using copy[all_wiki_pages]=1
There is a post here that I found helpful when I was performing a selective content import before: https://community.canvaslms.com/t5/Canvas-Developers-Group/Using-Content-Migrations-API-to-copy-cour...
Community helpTo interact with Panda Bot, our automated chatbot, you need to sign up or log in:
Sign inTo interact with Panda Bot, our automated chatbot, you need to sign up or log in:
Sign in
This discussion post is outdated and has been archived. Please use the Community question forums and official documentation for the most current and accurate information.