Network Classes Of Service

Assign a list of Network Classes Of Service to a Tenant

POST /api/v1/tenants/(string: tenant_id)/networkclassofservices/

Assign a list of Network Classes Of Service to a Tenant.

Example request:

POST /api/v1/tenants/footenant/networkclassofservices/fooNcos/ HTTP/1.1
Host: example.com
Content-Type: "application/json"

{
   "networkClassOfServices":
   [
   {
          "name": "0",
          "default": true,
          "assignToAllUsers": false,
          "assignToAllGroups": false
   },
   {
          "name": "4",
          "default": false,
          "assignToAllUsers": true,
          "assignToAllGroups": true
   }
   ]
}
Request JSON Object:

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 tenant will not generate an error

  • 400 Bad Request – bad request due to invalid parameters

List Network Classes Of Service assigned to a Tenant

GET /api/v1/tenants/(string: tenant_id)/networkclassofservices/

List all the Network Classes Of Service assigned to a Tenant.

Example request:

GET /api/v1/tenants/footenant/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:
Status Codes:

Get a Network Class Of Service assigned to a Tenant

GET /api/v1/tenants/(string: tenant_id)/networkclassofservices/(string: instance_name)/

Get a Network Class Of Service instance assigned to a Tenant.

Example request:

GET /api/v1/tenants/footenant/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:
Status Codes:

Modify the default Network Class Of Service assigned to a Tenant

PUT /api/v1/tenants/(string: tenant_id)/networkclassofservices/(string: instance_name)/

Modify the default Network Class Of Service assigned to a Tenant.

Example request:

PUT /api/v1/tenants/footenant/networkclassofservices/fooNcos/ HTTP/1.1
Host: example.com

or

PUT /api/v1/tenants/footenant/networkclassofservices/fooNcos/ HTTP/1.1
Host: example.com
Content-Type: "application/json"

{
   "assignToAllUsers": true,
   "assignToAllGroups": true
}
Request JSON Object:

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 Tenant

DELETE /api/v1/tenants/(string: tenant_id)/networkclassofservices/(string: instance_name)/

Remove a Network Class Of Service from a Tenant.

Example request:

DELETE /api/v1/tenants/footenant/networkclassofservices/fooNcos/ HTTP/1.1
Host: example.com
Content-Type: "application/json"

{
   "default": "0"
}
Request JSON Object:
  • default (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 tenant will not generate an error

Remove a list of Network Classes Of Service from a Tenant

DELETE /api/v1/tenants/(string: tenant_id)/networkclassofservices/

Remove a list of Network Classes Of Service from a Tenant.

Example request:

DELETE /api/v1/tenants/footenant/networkclassofservices/fooNcos/ HTTP/1.1
Host: example.com
Content-Type: "application/json"

{
   "networkClassOfServices":
   [
   {
                  "name": "0"
   },
   {
                  "name": "4"
   }
   ]
   "default": "7"
}
Request JSON Object:
  • networkClassOfServices (array) – a list of network classes of service objects to be removed, as defined as Group & Tenant network class of service in list attributes.

  • default (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:

Note

The end points have been updated from networkclassofservice to networkclassofservices (with a s) to respect APIO naming conventions. The old end points are kept in APIO code for backward compatibility but are no more documented