SolarWinds Backup Help

How to use the Backup Manager JSON-RPC API schema

The schema for the protocol is currently in beta.

The schema lists available methods and supported parameters, but it cannot be used to generate a client for the service automatically.

See the schema here: JSON-RPC schema for SolarWinds Backup (beta)

Recommendations

Before getting started, we would recommend you either:

  • Download a JSON API reader plugin for your preferred web browser
    or
  • Use a browser which automatically reads API's and breaks the schema down for you

Schema sections

Using a reader or a browser with a built-in reader allows for a much easier view of the schema so that the page is broken down into smaller sections:

Constructing an API call

  1. Ensure the start of the method includes the following, filling in your Visa with one received by running an authorization call:

    { "jsonrpc":"2.0", "visa": "33491-50121-1-1512736778-A99E8BAC8AC82XXXXX0000000XXXXXXXXXXXX00000", "id":"jsonrpc",

  2. Search in the schema for the method you need and add this to the call you are creating:

    "method" : "EnumerateAccountHistoryStatistics",

  3. Add the parameters and fill these in with the criteria you wish to search for:
    {
        "params" : {
    	"query" : {
    	    "PartnerId" : 123456,
    	    "StartRecordNumber" : 0,
    	    "RecordsCount" : 3,
    	    "SelectionMode" : "Merged",
    	    "Columns" : ["AN","CD","ED","US"],
    	    "Filter" : "ANY =~ '*mac*'"
    	},
    	"timeslice" : 1555419099,
    	"totalStatistics" : "*"
        }
    }
    • Look under the method in the Schema for all of the parameters that are available for it. If any of the parameters' type is not int, bool, std::time_t, str::string or IdSet, search in Structs or Enum for the type given
    • If it is an enumeration (list) your API parameter should contain one or more of the given types.
  4. Ensure you have closed the brackets and have commas at the end of lines which are followed by another parameter

For the above query, a sample response would be:

{
    "id": "jsonrpc",
    "jsonrpc": "2.0",
    "result": {
	"result": [
	{
		"AccountId": 987654,
		"Flags": null,
		"PartnerId": 123456,
		"Settings": [
		    {
			"AN": "homemac1"
		    },
		    {
			"CD": "1547372143"
		    },
		    {
			"ED": "2147483647"
		    },
		    {
			"US": "85631231628"
		    }
		]
	},
	{
		"AccountId": 987654,
		"Flags": null,
		"PartnerId": 123456,
		"Settings": [
		    {
			"AN": "workmac1"
		    },
		    {
			"CD": "1536906195"
		    },
		    {
			"ED": "2147483647"
		    },
		    {
			"US": "167282794538"
		    }
		]
	},
	{
		"AccountId": 987654,
		"Flags": null,
		"PartnerId": 123456,
		"Settings": [
		    {
			"AN": "homemac2"
		    },
		    {
			"CD": "1543482480"
		    },
		    {
			"ED": "2147483647"
		    },
		    {
			"US": "150175546885"
		    }
		]
	}
	],
	"totalStatistics": null
    },
    "visa": "33491-50121-1-1512736778-A99E8BAC8AC82XXXXX0000000XXXXXXXXXXXX00000"
}