admin.restoreSiteConfig Method

Admin APIs are extremely complex and should only be used after consulting Bunchball Support.

Restores a backup of your Nitro site. This method is used in the Nitro Studio Backup and Restore process.

admin.restoreSiteConfig supports OAuth security. To run this method you must:

  1. Create an OAuth Client with a restore scope and record the Client Id and Secret Key values.
  2. Use the Client Id and Secret Key to generate an OAuth token.
  3. Use the OAuth access token to call the API gateway endpoint at https://api.bunchball.com/restore.

Arguments

Name

Required

Type

Default Value

Range

Comments

asyncToken

No

String

None

0 - 255 chars

Returns any value passed in the response. Often used to identify which request this is the response for. Typically a single request and response.

data

YES

String

None

n/a

The backup ID or XML data to restore.

type

YES

String

None

0 - 255 chars

The restore type:

  • 0 - Restore by backup ID.
  • 1 - Restore by XML file.

Examples

Restore by Backup ID.

Copy
curl -X POST \
  https://api.bunchball.com/restore \
  -H 'authorization: Bearer 6bb666bbbb6b66b666d66666b66b6b66bb6666' \
  -H 'cache-control: no-cache' \
  -H 'content-type: application/x-www-form-urlencoded' \
  -H 'postman-token: 6bbbb66b-b6bb-b6b6-b6b6-b666b6bb666b' \
  -d 'type=0&data=40620'

Restore by XML file.

Copy
curl -X POST \
  http://localhost:3003/restore \
  -H 'authorization: Bearer 6ce780cdde3a91c646d293583b74b9b499ac8721' \
  -H 'cache-control: no-cache' \
  -H 'content-type: application/x-www-form-urlencoded' \
  -H 'postman-token: ef5611b2-d6f2-0219-b0e0-205306ccf2f7' \
  -d 'type=1&data=%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%20standalone%3D%22yes%22%3F%3E%20%3CNitro%20method%3D%22admin.backupSiteConfig%22%20server%3D%22bc8c01d15a88%2Fnitro%22%20res%3D%22ok%22%3E%20%20%20%20%20%3CSiteConfiguration%20name%3D%22Test%20Site%20used%20by%20unit%20test%20script.%20No%20limits!%22%20userlinkUrl%3D%22http%3A%2F%2Ftest.bunchball.com%2FuserId%22%20achievementCallbackUrl%3D%22%22%20levelType%3D%221%22%20whitelistDisabled%3D%221%22%20authenticationDisabled%3D%221%22%20userFilterPrefix%3D%22%22%20catalogBuyBackPercent%3D%220%22%20ownedItemFeedDescription%3D%22%22%20giftItemFeedDescription%3D%22%22%20giftNotifyUrl%3D%22test%22%20itemPurchaseNotifyUrl%3D%22http%3A%2F%2Fnicknorrell.com%2Ftemp%2F%22%20subdomain%3D%22test.nitro.bunchball.net%22%20enforceSubdomain%3D%220%22%20version%3D%221.1%22%2..

See also

RESTFul APIs

admin.restoreSiteConfig Method