Products: Managed Backup (Agent)
Article ID: m0607Last Modified: 22-Mar-2025

Get Started with Managed Backup API

Managed Backup enables interaction with backend features using the API. The API provides a set of requests that can be incorporated into user automation workflow or various remote management solutions (for example, ConnectWise).

This chapter covers the following topics:

API Credentials

To start using API, perform the following steps:

  1. Generate API credentials on Settings > General using main administrative account. Scroll down to the bottom of the page and press the Add credentials button:

  1. Click Generate

  1. Select and copy Login and Password to a text file and save them to the safe place.

Once credentials are generated, proceed to request the initial Access Token which will be used for authentication in HTTPS requests to Managed Backup services.

Request Access Token

Use the saved Login (as UserName) and Password in the following Python code to obtain a temporary Access Token:

import requests


access_point = 'https://api.mspbackups.com'
method = '/api/Provider/Login'


authentication_request = requests.post(url=access_point + method,
                                     json={"UserName": "xmkfXp4ZW",
                                           "Password": "ig2PLQHtsPQgRyiR"})


print("Status code: " + str(authentication_request.status_code) + "\n")


json_data = authentication_request.json()


for dictionary in json_data:
   print(str(dictionary) + ": " + str(json_data[dictionary]) + "\n")


Use the obtained temporary Access Token to access other API methods described in the documentation.

Example of Managed Backup API Usage for New User Creation

For example, the following Python code snippet will create a new user account if run right after the previous one:

access_token = json_data['access_token']


new_user = {
           "Email": "testuser2", # required
           "Enabled": True, # required
           "Password": "yourpassword", # required
           }


create_user_request = requests.post('https://api.mspbackups.com/api/Users/',
                                   json=new_user,
                                   headers={"Accept": "application/json",
                                            "Authorization": "Bearer " + access_token})
print(create_user_request.json())

The base URL for all requests is https://api.mspbackups.com. Once a request is sent, the api.mspbackups.com URL is appended by a string that reflects the purpose of the request.

Edit /Remove API Credentials

Generated API Credentials can be changed or removed in API area on Setting > General, if needed.

Note: if you change existing API credentials, previous ones expire automatically

Test API Requests

You can create test API requests using the Swagger tool.

The Swagger is located at https://api.mspbackups.com/Swagger/

Be aware that the link to Swagger is case-sensitive and must always be as follows: https://api.mspbackups.com/Swagger/

To learn more about Swagger, refer to the https://swagger.io/ resource

https://git.cloudberrylab.com/egor.m/doc-help-mbs.git
Production