-
Notifications
You must be signed in to change notification settings - Fork 3
get_replication_throttle
Alberto Gonzalez edited this page Oct 29, 2015
·
1 revision
Given the replicating system by system ID, returns the throttle definition for that system.
GET /api/replication/throttle/?sid=4
Host: <server host name>
Accept: application/json
AuthToken: <authentication token returned from authenticate>
None.
/?sid={sid} - return the throttle definition for the specified system.
200 success
The API returns an array of one or more throttle objects, and an empty array if no throttling is defined.
| Index | Value | Type | Returned |
|---|---|---|---|
| percentage | throttle percentage | long | always |
| days | array of days of the week this throttle applies, to | always |
- | where 0 = Sunday and 6 = Saturday | start | hour of day that throttle starts, ranging from 0 to 23 | long | always end | hour of day that the throttle ends, ranging from 0 to 23 | long | always
The API also returns an array of bandwidth speeds, with corresponding values and which bandwidth is currently set.
| Index | Value | Type | Returned |
|---|---|---|---|
| name | name of the bandwidth | string | always |
| value | the bandwidth value in mbps | long | always |
| selected | whether or not this is the current bandwidth that is in use on this system | boolean | always |
GET /api/replication/throttle/?sid=1
Host: <server host name>
Accept: application/json
AuthToken: 8a00sjerhterqerjlqkjlk443l4j56869h4f_)(fjdkasHHHHHkdal324
A weekday throttle that starts at 8 am and ends at 6 pm, and a different throttle for Saturday and Sunday, will look like this:
{
"throttle": [
{
"percentage": 50,
"days": [1 ,2, 3, 4, 5],
"start": 8,
"end": 18,
},
{
"percentage": 90,
"days": [0, 6],
"start": 0,
"end": 0,
}
],
"bandwidths": [
{
"name": "Ethernet (1 Mbps)",
"value": 1,
"selected": false
},
{
"name": "Cable (38 Mbps)",
"value": 38,
"selected": false
},
{
"name": "Cable (160 Mbps)",
"value": 160,
"selected": false
},
{
"name": "DSL (200 Mbps)",
"value": 200,
"selected": true
},
{
"name": "Ethernet (1 Gbps)",
"value": 1000,
"selected": false
},
{
"name": "Custom",
"value": 0,
"selected": false
}
]
}
If no throttle, the array will be empty:
{
"throttle": [],
"bandwidths": [
{
"name": "Ethernet (1 Mbps)",
"value": 1,
"selected": false
},
{
"name": "Cable (38 Mbps)",
"value": 38,
"selected": false
},
{
"name": "Cable (160 Mbps)",
"value": 160,
"selected": false
},
{
"name": "DSL (200 Mbps)",
"value": 200,
"selected": true
},
{
"name": "Ethernet (1 Gbps)",
"value": 1000,
"selected": false
},
{
"name": "Custom",
"value": 0,
"selected": false
}
]
}