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.
The schema can be found here: JSON-RPC schema for Cove Data Protection (Cove)
You can find information on how to Construct A JSON-RPC API Call in conjunction with our Schema here.
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 into sections for you, as this makes it easier to view.
It is also advisable to have the API platform of your liking installed on your device before beginning.
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:
The Enums section displays a list of supported values (enumerators) for parameters where this parameter requires the choice of one or more of a set of predefined values.
These lists of supported values can be used with their respective methods to filter information or to work out what an output means.
Example
Below are the values available for AccountFlags::Enum
:
{ "Name" : "AccountFlags::Enum", "Namespace" : "", "Struct" : "AccountFlags", "Values" : [ "Undefined", "Managed_Obsolete", "Trial", "AutoDeployed", "Count" ] }
This means that for any Method with a Parameter (Params) whose Type is 'AccountFlags::Enum' such as AccountInfo, the selection will be one or multiple of the AccountFlag::Enum Values.
The Methods section shows the names of the methods that can be used, and which parameter names and types can be used with these methods.
If a type is not int
, bool
, std::time_t
, std::string
or std::set<int>
, then the type is either an enumeration, or structure and will be found by searching for the type in these sections. E.g. "AccountStatisticsQuery"
with its accepted fields and types, is found in Structs.
Example
The method EnumerateAccountStatistics
has the following parameters that can be used when calling this method:
{ "IsConstant" : true, "Name" : "EnumerateAccountStatistics", "Params" : [ { "IsOutput" : false, "IsPointer" : false, "Name" : "query", "Type" : "AccountStatisticsQuery" }, { "IsOutput" : true, "IsPointer" : false, "Name" : "totalStatistics", "Type" : "TotalStatisticsInfo" } ], "ResultType" : "std::unique_ptr<IForwardIterator<AccountStatisticsInfo> >" },
In the Structs section you will see the fields and the accepted field types for parameters that show something other than an ::Enum or one of the these types:
- int
- bool
- std::time_t
- std::size_t
- std::string
- std::set<int>
- std::vector<std::string>
Example
The below example contains all of the parameters that may be used under the "Query"
parameter named "AccountStatisticsQuery"
:
{ Fields: [ { "Name" : "PartnerId", "Type" : "int" }, { "Name" : "Filter", "Type" : "std::string" }, { "Name" : "ExcludedPartners", "Type" : "std::set<int>" }, { "Name" : "SelectionMode", "Type" : "AccountStatisticsSelectionMode::Enum" }, { "Name" : "Labels", "Type" : "std::set<int>" }, { "Name" : "StartRecordNumber", "Type" : "std::size_t" }, { "Name" : "RecordsCount", "Type" : "std::size_t" }, { "Name" : "OrderBy", "Type" : "std::string" }, { "Name" : "Columns", "Type" : "std::vector<std::string>" }, { "Name" : "Totals", "Type" : "std::vector<std::string>" } ], "Name" : "AccountStatisticsQuery", "Namespace" : "" },
For a list of Column Vectors, please see the Management Console column codes for API page.