Box.net APIv1 migration: Difference between revisions
Helen Foster (talk | contribs) (Obtaining a Box.net client ID and secret, reorganising info) |
Mary Cooch (talk | contribs) (Box renaming) |
||
Line 2: | Line 2: | ||
''Note: This page contains information for site administrators only.'' | ''Note: This page contains information for site administrators only.'' | ||
==Box | ==Box API v2== | ||
Box.net API v1, which Moodle uses to interact with the [[Box | Box.net API v1, which Moodle uses to interact with the [[Box repository]] and [[Box portfolio]], expired on 14 December 2013. It was replaced by Box API v2. Three important consequences of the new API are: | ||
# The Moodle site must use HTTPS in order to access Box | # The Moodle site must use HTTPS in order to access Box. | ||
# Box | # Box plugins must be configured with a Box client ID and secret. | ||
# For Box | # 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-alias-to-copy-conversion tool.'' | ||
==Obtaining a Box | ==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 and create an account or log in | ||
Line 18: | Line 18: | ||
# On the Edit a Box Application page, scroll down to the section 'OAuth2 parameters' and make a note of the client ID and secret | # 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 | The client ID and secret can then be used to configure the Box repository and Box portfolio. | ||
==Box | ==Box repository configuration== | ||
# Go to ''Administration > Site administration > Plugins > Repositories > Manage Repositories'' | # Go to ''Administration > Site administration > Plugins > Repositories > Manage Repositories'' | ||
Line 27: | Line 27: | ||
# Save changes | # Save changes | ||
==Box | ==Box portfolio configuration== | ||
# Go to ''Administration > Site administration > Plugins > Portfolios > Manage Portfolios'' | # Go to ''Administration > Site administration > Plugins > Portfolios > Manage Portfolios'' | ||
Line 34: | Line 34: | ||
# Save changes | # Save changes | ||
==The Box | ==The Box-alias-to-copy-conversion tool== | ||
<p class="note">'''IMPORTANT''': The Box | <p class="note">'''IMPORTANT''': The Box-alias-to-copy-conversion tool must be used before 14 December 2013 to avoid data loss!</p> | ||
Administrators are advised to run the Box.net-alias-to-copy-conversion tool immediately after upgrading their site. It may be run | Administrators are advised to run the Box.net-alias-to-copy-conversion tool immediately after upgrading their site. It may be run | ||
Line 42: | Line 42: | ||
Either from within Moodle: | Either from within Moodle: | ||
# Ensure that the Box | # 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. | # Go to ''Administration > Site administration > Modules > Repositories > Manage repositories'' and click the settings link for Box. | ||
# Click the link to run the tool | # Click the link to run the tool | ||
Revision as of 13:04, 5 March 2014
Note: This page contains information for site administrators only.
Box API v2
Box.net API v1, which Moodle uses to interact with the Box repository and Box portfolio, expired on 14 December 2013. It was replaced by Box API v2. Three important consequences of the new API are:
- 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-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.net 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.net 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.net-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.