Use Cases

This article describes a use case of REST API available for Xopero ONE product.

Getting the last backup plan status(GitHub/Bitbucket/GitLab only)

At first, use the authorization method to get the token that will allow you to proceed with further operations. After getting the token, select the proper authentication method as described in the API authentication article. As you're properly authorized you can now use Get many method, which will list all of your organizations with backup plans and their last statuses.

Activating the license for the repository

At first, use the authorization method to get the token that will allow you to proceed with further operations. After getting the token, select the proper authentication method as described in the API authentication article. As you're properly authorized you can now use the Get many method, where you'll find the repository name and repository ID that will be required in the next step. After gathering the IDs of your repositories use Activate method with an array of selected repository IDs that you want to activate the license for.

Deactivating the license for the repository

At first, use the authorization method to get the token that will allow you to proceed with further operations. After getting the token, select the proper authentication method as described in the API authentication article. As you're properly authorized you can now use the Get many method, where you'll find the repository name and repository ID that will be required in the next step. After gathering the IDs of your repositories use Deactivate method with an array of selected repository IDs that you want to deactivate the license for.

Attach repository to a backup plan

At first, use the authorization method to get the token that will allow you to proceed with further operations. After getting the token, select the proper authentication method as described in the API authentication article. As you're properly authorized you can now use the Get many method (GitOrganizationController) to find the backup plan ID Get many method (GitRepositoryController) to get the repository ID. After gathering the IDs of your repositories and plans use Attach method with a pair of selected repository ID and plan ID.

See also:

Last updated