Note: You are currently viewing documentation for Moodle 2.5. Up-to-date documentation for the latest stable version of Moodle may be available here: Box.net APIv1 migration.

Box.net APIv1 migration: Difference between revisions

From MoodleDocs
(copying text from 26 wiki)
 
mNo edit summary
 
(2 intermediate revisions by 2 users not shown)
Line 2: Line 2:
''Note: This page contains information for site administrators only.''
''Note: This page contains information for site administrators only.''


==Box.net API v2==
==Box API v2==


Box.net API v1, which Moodle uses to interact with the [[Box.net repository]] and [[Box.net portfolio]], is due to expire on 14 December 2013. It will be replaced by Box.net API v2. Two important consequences of the new API are:
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:


# For Box.net repository users it will no longer be possible to create a shortcut/alias to a file stored in Box.net. ''Existing aliases will need to be converted to file copies by running the Box.net-alias-to-copy-conversion tool.''
# The Moodle site must use HTTPS in order to access Box.
# The Moodle site must use HTTPS in order to access Box.net.
# 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.''


==The Box.net-alias-to-copy-conversion tool==
==Obtaining a Box client ID and secret==


<p class="note">'''IMPORTANT''': The Box.net-alias-to-copy-conversion tool must be used before 14 December 2013 to avoid data loss!</p>
# 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


Administrators are advised to run the Box.net-alias-to-copy-conversion tool immediately after upgrading their site. It may be run
The client ID and secret can then be used to configure the Box repository and Box portfolio.


Either from within Moodle:
==Box repository configuration==


# Go to ''Administration > Site administration > Modules > Repositories > Manage repositories'' and click the settings link for Box.net
# Go to ''Administration > Site administration > Plugins > Repositories > Manage Repositories''
# Click the link to run the tool.
# 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


Or via a CLI script, found at /repository/boxnet/cli/migrationv1.php.
==Box portfolio configuration==


''Please be aware that this tool could take several hours to run depending on the number of aliases and their size.''
# 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


==Continued use of the Box.net repository and portfolio==
==The Box-alias-to-copy-conversion tool==


To continue using the Box.net repository and Box.net portfolio, the ''Moodle site must use HTTPS''. Assuming this criterion is satisfied, after upgrading their site, administrators must reconfigure the Box.net repository and portfolio plugins as follows:
<p class="note">'''IMPORTANT''': The Box-alias-to-copy-conversion tool must be used before 14 December 2013 to avoid data loss!</p>


===Box.net repository configuration===
Administrators are advised to run the Box-alias-to-copy-conversion tool immediately after upgrading their site. It may be run


# Obtain a ''client ID'' and ''secret'' from [https://app.box.com/developers/services Box.net]
Either from within Moodle:
# Go to ''Administration > Site administration > Plugins > Repositories > Manage Repositories''
 
# Activate the Box.net repository by selecting 'Enable and visible' in the dropdown menu
# Ensure that the Box repository has been configured according to the instructions above
# Configure each repository by entering the client ID and secret. Make sure you don't include any white space in the text boxes!
# Go to ''Administration > Site administration > Modules > Repositories > Manage repositories'' and click the settings link for Box.
# Save changes
# Click the link to run the tool


===Box.net portfolio configuration===
Or via a CLI script, found at /repository/boxnet/cli/migrationv1.php.


# Obtain a ''client ID'' and ''secret'' from [https://app.box.com/developers/services Box.net] (This step is not necessary if you have them already for the Box.net repository.)
''Please be aware that this tool could take several hours to run depending on the number of aliases and their size.''
# Go to ''Administration > Site administration > Plugins > Portfolios > Manage Portfolios''
# Activate the Box.net portfolio by selecting 'Enable and visible' in the dropdown menu
# Configure each portfolio by entering the client ID and secret
# Save changes


[[Category:Site administration]]
[[Category:Site administration]]
[[Category:Portfolios]]
[[Category:Portfolios]]

Latest 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:

  1. The Moodle site must use HTTPS in order to access Box.
  2. Box plugins must be configured with a Box client ID and secret.
  3. 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

  1. Go to https://app.box.com and create an account or log in
  2. Go to https://app.box.com/developers/services and click the link 'Create new application'
  3. Enter an application name and click the 'Content API' button
  4. Once the application is created, click the 'Edit this application' button
  5. 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

  1. Go to Administration > Site administration > Plugins > Repositories > Manage Repositories
  2. Reactivate the Box.net repository by selecting 'Enabled and visible' in the dropdown menu
  3. 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!
  4. Save changes

Box portfolio configuration

  1. Go to Administration > Site administration > Plugins > Portfolios > Manage Portfolios
  2. Reactivate the Box.net portfolio by selecting 'Enabled and visible' in the dropdown menu
  3. Configure the portfolio plugin by entering the Box.net client ID and secret
  4. 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:

  1. Ensure that the Box repository has been configured according to the instructions above
  2. Go to Administration > Site administration > Modules > Repositories > Manage repositories and click the settings link for Box.
  3. 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.