Changing device properties in JSON-RPC API
To modify a backup device, use the ModifyAccount
method. You can change the following properties:
- Re-assign the device to another customer
- Change the amount of storage allocated to the device
- Set an expiration time for the device
- Change the location of the device
- Re-assign the device to another storage pool
Device names and passwords cannot be changed.
Required parameters
Parameter | Description | Type/Supported values |
---|---|---|
accountInfo
|
A group of parameters related to the device | AccountInfo , (has child parameters of its own see the AccountInfo child parameters table below) |
Parameter | Description | Type/Supported values |
---|---|---|
ID
|
An ID to assign to the new device. It must not coincide with the ID of existing devices | <int> Integer |
Name
|
A name to assign to the new device. It must not coincide with the names of existing devices. | OptionalNonEmptyString String |
NameAlias
|
An alternative name to assign to the new device. It must not coincide with this devices name or the names of existing devices. | OptionalNonEmptyString String |
Password
|
A password to assign to the new device. | OptionalNonEmptyString String |
Token
|
A token that will become the Encryption Key/Security Code for the new device | OptionalNonEmptyString String |
Type
|
The type of device, based on what data will be backed up |
|
PartnerId
|
The ID of the customer the device is created for (retrieved through the GetPartnerInfo method) |
<int> Integer |
ProductId
|
The ID of the product to assign to the new device. Use the EnumerateProducts method to get the list of products available to the customer. |
<int> Integer |
LocationId |
The location of the device.
We recommend using the location of the customer that owns the device (unless you know that the customer has storage in the desired location). This can be found by running the EnumerateLocations method and finding the appropriate geographic region. |
<int> Integer |
CreationTime |
The time code at which the device was created | <std::time_t> Integer in Unix format. For example, 1535673599 stands for August 30, 2018 |
ExpirationTime |
The time code at which the device expires | <std::time_t> Integer in Unix format. For example, 1535673599 stands for August 30, 2018 |
Flags
|
An array of flags denoting the type of account |
|
StorageLocationId
|
The ID number of the storage location to be used for this new device | <int> Integer |
RemovalTime
|
The time code at which the device will be removed | <AbsoluteTime> Integer as the total number of seconds since the beginning of January 1st 1900 |
AccountGroupId
|
The ID of the AccountGroup the device is associated to which can be found by running GetAccountGroup |
<int> Integer |
OwnUserId
|
The ID of the user running the call | <int> Integer |
StorageId
|
The ID of the storage pool the device will be assigned to | <int> Integer |
ProfileId
|
The ID of the profile to assign to the device. | <int> Integer |
ContinuityEnabled
|
Enable or disable a continuity plan from an array |
|
Optional parameters
Parameter | Description | Supported values |
---|---|---|
forceRemoveCustomColumnValuesInOldScope
|
Do you wish to force remove custom column values for the device |
|
Sample request
In the below example, we are going to re-assign a device to another customer. To do so, submit the ID of the new customer together with the device name.
All other changes can be made by providing the new setting, information or value for the required parameter.
{ "id": "jsonrpc", "visa": "{{visa}}", "method": "ModifyAccount", "jsonrpc": "2.0", "params": { "accountInfo": { "PartnerId": 33493, "Name": "test-device", "NameAlias": "Test-Device-Alias" } } }
Sample response
{ "id": "jsonrpc", "jsonrpc": "2.0", "result": null, "visa": "{{visa}}" }