API Specification master - sonata-nfv/tng-sla-mgmt GitHub Wiki
There is a Swagger version of this page with a more readable and structured format, as well as a server to perform some tests at. Visit the Swagger Documentation from here.
SLA Templates
| Action |
HTTP Method |
Endpoint |
| Create a new SLA Template |
POST |
curl -X POST -H "Content-type:application/x-www-form-urlencoded" -d "nsd_uuid=<>&guaranteeId=<>&templateName=<>&expireDate=<>&provider_name=<>&service_licence_type=<>&allowed_service_instances=<>&service_licence_expiration_date=<>&service_licence_period=<>&provider_name=<>&dflavour_name=<>" http://localhost:8080/tng-sla-mgmt/api/slas/v1/templates |
| Get all existing SLA Templates |
GET |
curl -H "Content-type:application/json" http://localhost:8080/tng-sla-mgmt/api/slas/v1/templates/ |
| Get specific SLA Template based on uuid |
GET |
curl -H "Content-type:application/json" http://localhost:8080/tng-sla-mgmt/api/slas/v1/templates/{sla_uuid} |
| Delete a SLA Template |
DELETE |
curl -X DELETE http://localhost:8080/tng-sla-mgmt/api/slas/v1/templates/{sla_uuid} |
SLA Agreements
| Action |
HTTP Method |
Endpoint |
| Get all existing Agreements |
GET |
curl -H "Content-type:application/json" http://localhost:8080/tng-sla-mgmt/api/slas/v1/agreements/ |
| Get specific Agreement details based on uuid |
GET |
curl -H "Content-type:application/json" http://localhost:8080/tng-sla-mgmt/api/slas/v1/agreements/{sla_uuid}/{nsi_uuid} |
| Get Agreements per (instantiated) NS |
GET |
curl -H "Content-type:application/json" http://localhost:8080/tng-sla-mgmt/api/slas/v1/agreements/service/{nsi_uuid} |
| Get Agreements per logged-in user |
GET |
curl -H "Content-type:application/json" http://localhost:8080/tng-sla-mgmt/api/slas/v1/agreements/customer |
| Get Agreement guarantee terms |
GET |
curl -H "Content-type:application/json" http://localhost:8080/tng-sla-mgmt/api/slas/v1/agreements/guarantee-terms/{sla_uuid} |
| Delete a SLA Agreement |
DELETE |
curl -X DELETE http://localhost:8080/tng-sla-mgmt/api/slas/v1/agreements/{nsi_uuid} |
| Manually create a SLA Agreement |
POST |
curl -X POST -H "Content-type:application/x-www-form-urlencoded" -d "ns_uuid=<>&ns_name=<>&sla_uuid=<>&sla_name=<>&sla_status=<>&cust_email=<>&cust_username=<>&inst_status=<>&correlation_id=<>" http://localhost:8080/tng-sla-mgmt/api/slas/v1/agreements/create |
SLA Violations
| Action |
HTTP Method |
Endpoint |
| Get all violations |
GET |
curl -H "Content-type:application/json" http://localhost:8080/tng-sla-mgmt/api/slas/v1/violations/ |
| Get a specific violation |
GET |
curl -H "Content-type:application/json" http://localhost:8080/tng-sla-mgmt/api/slas/v1/violations/{nsi_uuid}/{sla_uuid} |
| Get Percentage of SLA Agreements vs. Violations (in the last d days - optional) |
GET |
curl -H "Content-type:application/json" http://localhost:8080/tng-sla-mgmt/api/slas/v1/violations/violationspercentage?d-<> |
Licensing
| Action |
HTTP Method |
Endpoint |
| Get all Licenses |
GET |
curl -H "Content-type:application/json" http://localhost:8080/tng-sla-mgmt/api/slas/v1/licenses/ |
| Delete a License |
DELETE |
curl -X DELETE "Content-type:application/x-www-form-urlencoded" -d "sla_uuid=<>&cust_username=<>&ns_uuid=<>" http://localhost:8080/tng-sla-mgmt/api/slas/v1/licenses/} |
| Check if instantiation is allowed based on license status |
GET |
curl -H "Content-type:application/json" http://localhost:8080/tng-sla-mgmt/api/slas/v1/licenses/status/{sla_uuid}/{ns_uuid} |
| API for buying a private license |
POST |
curl -X POST -H "Content-type:application/x-www-form-urlencoded" -d "ns_uuid=<>&sla_uuid=<>" http://localhost:8080/tng-sla-mgmt/api/slas/v1/licenses/buy |
| Check if instantiation is allowed based on license status |
GET |
curl -H "Content-type:application/json" http://localhost:8080/tng-sla-mgmt/api/slas/v1/licenses/status/{sla_uuid}/{ns_uuid} |
| Get Nº Licenses Utilized |
GET |
curl -H "Content-type:application/json" http://localhost:8080/tng-sla-mgmt/api/slas/v1/licenses/utilized |
| Get Nº Licenses Acquired |
GET |
curl -H "Content-type:application/json" http://localhost:8080/tng-sla-mgmt/api/slas/v1/licenses/acquired |
| Get Nº Licenses Expired |
GET |
curl -H "Content-type:application/json" http://localhost:8080/tng-sla-mgmt/api/slas/v1/licenses/expired |
SLA Management
| Action |
HTTP Method |
Endpoint |
| Access a predefined list of Service Guarantees (SLOs) |
GET |
curl -H "Content-type:application/json" http://localhost:8080/tng-sla-mgmt/api/slas/v1/mgmt/guaranteesList |
| Access a list with all the ns template correlations |
GET |
curl -H "Content-type:application/json" http://localhost:8080/tng-sla-mgmt/api/slas/v1/mgmt/services/templates/ |
| Access a list with NS that have associated templates |
GET |
curl -H "Content-type:application/json" http://localhost:8080/tng-sla-mgmt/api/slas/v1/mgmt/services/templates/true |
| Access a list with NS that do not have associated templates yet |
GET |
curl -H "Content-type:application/json" http://localhost:8080/tng-sla-mgmt/api/slas/v1/mgmt/services/templates/false |
| Access a list with NS that have associated agreements |
GET |
curl -H "Content-type:application/json" http://localhost:8080/tng-sla-mgmt/api/slas/v1/mgmt/services/agreements/true |
| Access a list with NS that do not have associated agreements yet |
GET |
curl -H "Content-type:application/json" http://localhost:8080/tng-sla-mgmt/api/slas/v1/mgmt/services/agreements/false |
| Delete cust-ns-sla correlation based on sla uuid |
DELETE |
curl -X DELETE http://localhost:8080/tng-sla-mgmt/api/slas/v1/mgmt/agreements/{sla_uuid} |
| Access a list with available deployment flavours for a NS |
GET |
curl -H "Content-type:application/json" http://localhost:8080/tng-sla-mgmt/api/slas/v1/mgmt/deploymentflavours/{nsd_uuid} |
| Access deployment flavours information for specific NS and SLA |
GET |
curl -H "Content-type:application/json" http://localhost:8080/tng-sla-mgmt/api/slas/v1/mgmt/deploymentflavours/{nsd_uuid}/{sla_uuid} |
SLA Manager health check
| Action |
HTTP Method |
Endpoint |
| Check each micro-service’s availability/health |
GET |
curl -H "Content-type:application/json" http://localhost:8080/tng-sla-mgmt/api/slas/v1/ping |
Expected returned data for all the mentioned endpoint is:
HTTP code 200 (Ok)
HTTP code 201 (Created)
HTTP code 400 (Bad Request)
HTTP code 404 (Not Found)