To retrieve a list of QoS profiles, an application submits an HTTP GET request to the URL that represents the QoS profile resource.
/qos
GET
The response header includes the following information:
Field | Description |
---|---|
Content-Type | The content type and character encoding of the response. |
Content-Length | The length of the retrieved content. |
The response body contains a list containing the following elements in JSON format:
Element | Description |
---|---|
name | A string value that identifies the QoS profile. |
description | A string value describing the QoS profile. |
latency | A integer value that specifies latency in milliseconds. |
jitter | A JSON containing "min" and "max" keys that specify jitter min/max integers in milliseconds. |
trafficLoss | A decimal value that specifies traffic loss as a percentage(eg 0.01 == 1%) |
createdAt | A timestamp when the profile was created. |
updatedAt | A timestamp when the profile was last updated. |
Status Code | Description |
---|---|
200-299 | The request was successful. The list of QoS profiles are in the response body. |
400 | Bad request. Typically returned if required information was not provided as input. |
500-599 | Server error. |
{ "qos_profiles": [
{
"_id": "0xdeadbeef",
"name": "qos profile name",
"description": "qos profile description",
"createdAt": "2014-02-12 03:34:51",
"updatedAt": "2014-02-12 03:34:51",
"latency": 100,
"jitter": {
"min": 30,
"max": 50
},
"trafficLoss": 0.1
},
{
"_id": "0xbeefbeef",
"name": "qos profile name",
"description": "qos profile description",
"createdAt": "2014-02-12 03:34:51",
"updatedAt": "2014-02-12 03:34:51",
"latency": 150,
"jitter": {
"min": 15,
"max": 25
},
"trafficLoss": 0.5
},
]
}
To retrieve information about a QoS profile, an application submits an HTTP GET request to the URL that represents the QoS profile resource.
/qos/:id
, for example, /qos/0xdeadbeef
to retrieve information about a QoS profile with ID 0xdeadbeef.
GET
The response header includes the following information:
Field | Description |
---|---|
Content-Type | The content type and character encoding of the response. |
Content-Length | The length of the retrieved content. |
The response body contains the following elements in JSON format:
Element | Description |
---|---|
name | A string value that identifies the QoS profile. |
description | A string value describing the QoS profile. |
latency | A integer value that specifies latency in milliseconds. |
jitter | A JSON containing "min" and "max" keys that specify jitter min/max integers in milliseconds. |
trafficLoss | A decimal value that specifies traffic loss as a percentage(eg 0.01 == 1%) |
createdAt | A timestamp when the profile was created. |
updatedAt | A timestamp when the profile was last updated. |
Status Code | Description |
---|---|
200-299 | The request was successful. The QoS profile information is in the response body. |
400 | Bad request. Typically returned if required information was not provided as input. |
404 | Not found. The resource was not found. |
500-599 | Server error. |
{
"_id": "0xdeadbeef",
"name": "qos profile name",
"description": "qos profile description",
"createdAt": "2014-02-12 03:34:51",
"updatedAt": "2014-02-12 03:34:51",
"latency": 100,
"jitter": {
"min": 30,
"max": 50
},
"trafficLoss": 0.1
}
An application can create a QoS profile by issuing an HTTP POST request to the URL of the QoS profile resource.
/qos/
POST
The request header includes the following information:
Field | Description |
---|---|
Content-Type | The content type and character encoding of the response. |
Content-Length | The length of the retrieved content. |
JSON input that contains a QoS profile representation with the following elements:
Element | Description |
---|---|
name | A string value that identifies the QoS profile. |
description | (optional) A string value describing the QoS profile. |
latency | A integer value that specifies latency in milliseconds. |
jitter | A JSON containing "min" and "max" keys that specify jitter min/max integers in milliseconds. |
trafficLoss | A decimal value that specifies traffic loss as a percentage(eg 0.01 == 1%) |
{
"name": "qos profile name",
"description": "qos profile description",
"latency": 100,
"jitter": {
"min": 30,
"max": 50
},
"trafficLoss": 0.1
}
The response header includes the following information:
Field | Description |
---|---|
Content-Type | The content type and character encoding of the response. |
Content-Length | The length of the content. |
Location | The location of the newly created QoS profile. |
Status Code | Description |
---|---|
200-299 | The request was successful. The QoS profile was successfully created. |
400 | Bad request. Typically returned if required information was not provided as input. |
500-599 | Server error. |
HTTP/1.1 201 Created
Content-Type: application/octet-stream; charset=UTF-8
Content-Length: 0
Date: Wed, 14 Dec 2014 19:35:02 GMT
Location: http://api.heliosburn.com/qos/0xdeadbeef
Access-Control-Allow-Origin: *
Server: Noelios-Restlet-Engine/1.1.5
An application can update a QoS profile by issuing an HTTP PUT request to the URL of the containing QoS profile resource. In addition, the app needs to provide as input, JSON that identifies the new attribute values for the QoS profile. Upon receiving the PUT request, the HeliosBurn service examines the input and updates any of the attributes that have been modified.
/qos/:id
, for example, /qos/0xdeadbeef
to update the QoS profile with ID 0xdeadbeef.
PUT
The request header includes the following information:
Field | Description |
---|---|
Content-Type | The content type and character encoding of the response. |
Content-Length | The length of the retrieved content. |
JSON input that contains a QoS profile representation with the elements to be modified:
Element | Description |
---|---|
name | A string value that identifies the QoS profile. |
description | A string value describing the QoS profile. |
latency | A integer value that specifies latency in milliseconds. |
jitter | A JSON containing "min" and "max" keys that specify jitter min/max integers in milliseconds. |
trafficLoss | A decimal value that specifies traffic loss as a percentage(eg 0.01 == 1%) |
{
"name": "qos profile name",
"description": "qos profile description",
"latency": 100,
"jitter": {
"min": 30,
"max": 50
},
"trafficLoss": 0.1
}
The response header includes the following information:
Field | Description |
---|---|
Content-Type | The content type and character encoding of the response. |
Content-Length | The length of the content. |
Status Code | Description |
---|---|
200-299 | The request was successful. The QoS profile was successfully updated. |
400 | Bad request. Typically returned if required information was not provided as input. |
404 | Not found. The resource was not found. |
500-599 | Server error. |
HTTP/1.1 200 OK
Content-Type: application/octet-stream; charset=UTF-8
Content-Length: 0
Date: Wed, 14 Dec 2014 19:35:02 GMT
Access-Control-Allow-Origin: *
Server: Noelios-Restlet-Engine/1.1.5
An application can delete a QoS profile by issuing an HTTP DELETE request to the URL of the containing QoS profile resource.
/qos/:id
, for example, /qos/0xdeadbeef
to delete the QoS profile with ID 0xdeadbeef.
DELETE
The request header includes the following information:
Field | Description |
---|---|
Content-Type | The content type and character encoding of the response. |
Content-Length | The length of the retrieved content. |
The response header includes the following information:
Field | Description |
---|---|
Content-Type | The content type and character encoding of the response. |
Content-Length | The length of the content. |
Status Code | Description |
---|---|
200-299 | The request was successful. The QoS profile was successfully deleted. |
400 | Bad request. Typically returned if required information was not provided as input. |
404 | Not found. The resource was not found. |
500-599 | Server error. |
HTTP/1.1 200 OK
Content-Type: application/octet-stream; charset=UTF-8
Content-Length: 0
Date: Wed, 14 Dec 2014 19:35:02 GMT
Access-Control-Allow-Origin: *
Server: Noelios-Restlet-Engine/1.1.5