Network Classes Of Service¶
Note
The end points have been updated from networkclassofservice to networkclassofservices to respect APIO naming conventions. The old end points are kept in APIO code for backward compatibility but are no more documented
Assign a list of Network Classes Of Service to a Group¶
-
POST
/api/v1/tenants/
(string: tenant_id)/groups/
(string: group_id)/networkclassofservices/
¶ Assign a list of Network Classes Of Service to a Group.
Example request:
POST /api/v1/tenants/footenant/groups/foogroup/networkclassofservices/fooNcos/ HTTP/1.1 Host: example.com Content-Type: "application/json" { "networkClassOfServices": [ { "name": "0", "default": true, "assignToAllUsers": false }, { "name": "4", "default": false, "assignToAllUsers": true } ] }
- Request JSON Object:
networkClassOfServices (array) – a list of network classes of service objects as defined as Group & Tenant network class of service in list attributes.
Example response:
HTTP/1.1 201 CREATED Content-Type: "application/json" {}
- Status Codes:
201 Created – no error. Note that adding a NOCS already assigned to the group will not generate an error
400 Bad Request – bad request due to invalid parameters
List Network Classes Of Service assigned to a Group¶
-
GET
/api/v1/tenants/
(string: tenant_id)/groups/
(string: group_id)/networkclassofservices/
¶ List all the Network Classes Of Service assigned to a Group.
Example request:
GET /api/v1/tenants/footenant/groups/foogroup/networkclassofservices/ HTTP/1.1 Host: example.com
Example response:
HTTP/1.1 200 OK Content-Type: "application/json" { "networkClassOfServices": [ { "name": "0", "description": "", "default": false }, { "name": "1", "description": "Test NCOS", "default": true } ] }
- Response JSON Object:
networkClassOfServices (array) – a list of network classes of service objects as defined as Group & Tenant network class of service in list attributes.
- Status Codes:
200 OK – no error
Get a Network Class Of Service assigned to a Group¶
-
GET
/api/v1/tenants/
(string: tenant_id)/groups/
(string: group_id)/networkclassofservices/
(string: instance_name)/
¶ Get a Network Class Of Service instance assigned to a Group.
Example request:
GET /api/v1/tenants/footenant/groups/foogroup/networkclassofservices/fooNcos/ HTTP/1.1 Host: example.com
Example response:
HTTP/1.1 200 OK Content-Type: "application/json" { "name": "0", "description": "", "default": false }
- Response JSON Object:
name (string) – as defined as Group & Tenant network class of service in list attributes.
description (string) – as defined as Group & Tenant network class of service in list attributes.
boolean (default) – as defined as Group & Tenant network class of service in list attributes.
- Status Codes:
200 OK – no error
404 Not Found – network class of service not assigned to the group
Modify the default Network Class Of Service assigned to a Group¶
-
PUT
/api/v1/tenants/
(string: tenant_id)/groups/
(string: group_id)/networkclassofservices/
(string: instance_name)/
¶ This API can be used to promote a NCOS as the default one and/or to assign it to all Users of the Group.
PUT /api/v1/tenants/footenant/groups/foogroup/networkclassofservices/fooNcos/ HTTP/1.1 Host: example.com Content-Type: "application/json" { "assignToAllUsers": true }
- Request JSON Object:
assignToAllUsers (boolean) – as defined as Group & Tenant network class of service in list attributes.
default (boolean) – as defined as Group & Tenant network class of service in list attributes.
Example response:
HTTP/1.1 200 OK Content-Type: "application/json" {}
- Status Codes:
200 OK – no error
400 Bad Request – bad request due to invalid parameters or unassigned network class of service
Remove a Network Class Of Service from a Group¶
-
DELETE
/api/v1/tenants/
(string: tenant_id)/groups/
(string: group_id)/networkclassofservices/
(string: instance_name)/
¶ Remove a Network Class Of Service from a Group.
Example request:
DELETE /api/v1/tenants/footenant/groups/foogroup/networkclassofservices/fooNcos/ HTTP/1.1 Host: example.com Content-Type: "application/json" { "defaultNetworkClassOfService": "0" }
- Request JSON Object:
defaultNetworkClassOfService (string) – (Optional) the name of the network class of service to be set as default (if the actual default is in the delete list, you can set a new default).
Example response:
HTTP/1.1 200 OK Content-Type: "application/json" {}
- Status Codes:
200 OK – no error. Note that trying to delete a NCOS that is not assigned to the group will not generate an error
Remove a list of Network Classes Of Service from a Group¶
-
DELETE
/api/v1/tenants/
(string: tenant_id)/groups/
(string: group_id)/networkclassofservices/
¶ Remove a list of Network Classes Of Service from a Group.
Example request:
DELETE /api/v1/tenants/footenant/groups/foogroup/networkclassofservices/fooNcos/ HTTP/1.1 Host: example.com Content-Type: "application/json" { "networkClassOfServices": [ { "name": "0" }, { "name": "4" } ] "defaultNetworkClassOfService": "0" }
- Request JSON Object:
networkClassOfServices (array) – a list of network classes of service objects as defined as Group & Tenant network class of service in list attributes.
defaultNetworkClassOfService (string) – (Optional) the name of the network class of service to be set as default (if the actual default is in the delete list, you can set a new default).
Example response:
HTTP/1.1 200 OK Content-Type: "application/json" {}
- Status Codes:
200 OK – no error
400 Bad Request – bad request due to invalid parameters