Getting device info by name in JSON-RPC API
To get information about a backup device using its name and password, use the GetAccountInfo
method.
Required parameters
Parameter | Description | Supported values |
---|---|---|
name |
The name of the backup device to get information for | <std::string>
|
password
|
The password for access to the backup device | <std::string>
|
Optional parameters
Parameter | Description | Supported values |
---|---|---|
homeNodeInfo
|
A group of parameters related to the storage node | StorageNodeInfo , (has child parameters of its own, see the HomeNodeInfo child parameters table below) |
Parameter | Description | Type/Supported values |
---|---|---|
Id
|
The ID number of the home storage node to assign to the device | <int> Integer |
ActiveAccounts
|
Number of active devices associated to this storage node | <int> Integer |
TotalAccounts
|
Total number of devices associated to this storage node | <int> Integer |
LocationId
|
The location of the storage node. We recommend using the location of the customer that owns the node. | <int> Integer |
CommonInfo
|
Common information regarding the Storage Node | StorageNodeCommonInfo (has child parameters of its own, see the StorageNodeCommonInfo child parameters table below) |
|
State information regarding the Storage Node | StorageNodeStateInfo (has child parameters of its own, see the StorageNodeStateInfo child parameters table below) |
ModeInfo
|
Mode information regarding the Storage Node | StorageNodeModeInfo (has child parameters of its own, see the StorageNodeModeInfo child parameters table below) |
StorageNodeCommonInfo child parameters
Parameter | Description | Type/Supported values |
---|---|---|
StorageID
|
The ID number of the storage | <int> Integer |
Name
|
The name of the storage node | OptionalNonEmptyString String |
Family
|
The family of the storage node | OptionalNonEmptyString String |
User
|
The username the storage node belongs to | OptionalNonEmptyString String |
Password
|
The password of the storage node | OptionalNonEmptyString String |
Host
|
The hostname of the storage | OptionalNonEmptyString String |
Path
|
The path to the storage node | <std::string>
|
GatewayHost
|
The gateway host of the storage node | <std::string>
|
HttpGatwayHost
|
The HTTP gateway host of the storage node | <std::string>
|
CertificateInfo
|
Certificate information for the storage node | StorageNodeCertificateInfo (has child parameters of its own, see the StorageNodeCertificateInfo child parameters table below) |
StorageNodeCertificateInfo child parameters
Parameter | Description | Type/Supported values |
---|---|---|
Certificate
|
The certificate for the storage node | <std::string>
|
StartDate
|
The start date of the certificate | <std::time_t> Integer in Unix format. For example, 1535673599 stands for August 30, 2018 |
EndDate
|
The expiry date of the certificate | <std::time_t> Integer in Unix format. For example, 1535673599 stands for August 30, 2018 |
CertificatePin
|
The certificate pin | <std::string>
|
StorageNodeStateInfo child parameters
Parameter | Description | Type/Supported values |
---|---|---|
State
|
The state of the storage node |
|
UsedStorage
|
The used storage on the storage node | <std::int64_t> Integer (in mebibytes) |
TotalStorage
|
The total storage available on the storage node | <std::int64_t> Integer (in mebibytes) |
PrivilegedStorage
|
The privileged storage on the storage node | <std::int64_t> Integer (in mebibytes) |
StorageNodeModeInfo child parameters
Parameter | Description | Type/Supported values |
---|---|---|
Mode
|
The mode of the storage node |
|
Message
|
A note relative to the storage node mode | <std::string>
|
Sample request
{ "id": "jsonrpc", "jsonrpc": "2.0", "visa": "{{visa}}", "method": "GetAccountInfo", "params": { "name": "test-device", "password": "uadafjha36r" } }
Sample response
{ "id": "jsonrpc", "jsonrpc": "2.0", "result": { "homeNodeInfo": { "ActiveAccounts": 1084, "CommonInfo": { "CertificateInfo": { "ValidationMethod": "OsTrustStore" }, "Family": "WEBMOD", "GatewayHost": "", "Host": "hostname:port", "HttpGatewayHost": "hostname:port", "Name": "storageName", "Password": "*****", "Path": "", "StorageId": 1234567, "User": "*****" }, "Id": 2345678, "LocationId": 1, "ModeInfo": { "Mode": "Operable" }, "StateInfo": { "PrivilegedStorage": 0, "State": [ "Online" ], "TotalStorage": 269320579, "UpdateTimestamp": 1666347496, "UsedStorage": 210196248 }, "TotalAccounts": 165 }, "result": { "CreationTime": 1517402049, "ExpirationTime": 1535673599, "Id": 72896, "LocationId": 1, "Name": "test-device", "NameAlias": null, "OverrideVirtual": "Default", "PartnerId": 33495, "Password": "673487fcvg1", "ProductId": 28382, "RemovalTime": 0, "StorageId": 0, "StorageLocationId": 1, "Token": "3068a53c1-a64b-45c8-a87e-0000XX0000X0Xx0", "Type": "BackupManager" } }, "visa": "{{visa}}" }