Box.net APIv1 migration
Note: You are currently viewing documentation for Moodle 2.8. Up-to-date documentation for the latest stable version of Moodle may be available here: Box.net APIv1 migration.
Note: This page contains information for site administrators only.
Box API v2
- The Moodle site must use HTTPS in order to access Box.
- Box plugins must be configured with a Box client ID and secret.
- For Box repository users it will no longer be possible to create a shortcut/alias to a file stored in Box. Existing aliases will need to be converted to file copies by running the Box.net-alias-to-copy-conversion tool.
Obtaining a Box client ID and secret
- Go to https://app.box.com and create an account or log in
- Go to https://app.box.com/developers/services and click the link 'Create new application'
- Enter an application name and click the 'Content API' button
- Once the application is created, click the 'Edit this application' button
- On the Edit a Box Application page, scroll down to the section 'OAuth2 parameters' and make a note of the client ID and secret
The client ID and secret can then be used to configure the Box repository and Box portfolio.
Box repository configuration
- Go to Administration > Site administration > Plugins > Repositories > Manage Repositories
- Reactivate the Box.net repository by selecting 'Enabled and visible' in the dropdown menu
- Configure the repository plugin by entering the Box client ID and secret. Make sure you don't include any white space in the text boxes!
- Save changes
Box portfolio configuration
- Go to Administration > Site administration > Plugins > Portfolios > Manage Portfolios
- Reactivate the Box.net portfolio by selecting 'Enabled and visible' in the dropdown menu
- Configure the portfolio plugin by entering the Box client ID and secret
- Save changes
The Box-alias-to-copy-conversion tool
IMPORTANT: The Box-alias-to-copy-conversion tool must be used before 14 December 2013 to avoid data loss!
Administrators are advised to run the Box-alias-to-copy-conversion tool immediately after upgrading their site. It may be run
Either from within Moodle:
- Ensure that the Box repository has been configured according to the instructions above
- Go to Administration > Site administration > Modules > Repositories > Manage repositories and click the settings link for Box
- Click the link to run the tool
Or via a CLI script, found at /repository/boxnet/cli/migrationv1.php.
Please be aware that this tool could take several hours to run depending on the number of aliases and their size.
Note: After running the tool, the Box settings page will still display the message 'It appears that you were using Box with the API version 1, have you run the migration tool to convert the old references?' Please just ignore it. ;-)