Telco Cloud Service Assurance

Telco Cloud Service Assurance

Introduction

This document describes the REST API for Telco Cloud Service Assurance platform is a scalable & distributed platform aimed at Telcos (and other network infrastructure operators) for topology discovery & near-real-time monitoring of both physical & virtual infrastructure components (NICs, VMs, VNF & CNF, etc.) providing root-cause analyses (RCA) for issues (failures, attacks, performance bottlenecks, etc.) and supporting complex KPI metrics based reporting among other capabilities.

At its core, Telco Cloud Service Assurance platform is a data processing platform (data collection, processing, analysis & reporting). It is designed around a common shared message bus to ingest incoming data from varied data sources, pass it through configurable data pipelines & finally persist it to storage from where it can be queried via UI/API.

Getting started with Telco Cloud Service Assurance REST APIs

To get you started quickly, let's dive into the necessary steps to enable you to begin using APIs.

Request authentication

Obtain access token by using below api

 curl --location --request POST 'https://< hostname:port>/auth/realms/NGINX/protocol/openid-connect/token'
  --header 'Content-Type: application/x-www-form-urlencoded'
  --data-urlencode 'client_id=nginx'
  --data-urlencode 'grant_type=password'
  --data-urlencode 'client_secret=480cd12a-fe8e-4398-88da-1ec120289d18'
  --data-urlencode 'scope=openid'
  --data-urlencode 'username=username'
  --data-urlencode 'password=password'

Where

1 username is the user to authenticate
2 password is the password to authenticate
3 hostname:port is Telco Cloud Service Assurance host and port

Example Response:

{
    "access_token": "eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICIyVlFrLWh6Zy1uRUN1eDFvR0p6M3dNa3ZPSkRqVjRNb29aZWk2RHJORWhjIn0.eyJleHAiOjE2NDg5MDM1MTMsImlhdCI6MTY0ODkwMzM5MywianRpIjoiMTZiMDA4YzEtZDE5MC00NzRlLWFhNWYtNzk0YjU5YjNhMDE0IiwiaXNzIjoiaHR0cDovL2tleWNsb2Frc2VydmVyOjgwODAvYXV0aC9yZWFsbXMvTkdJTlgiLCJhdWQiOiJhY2NvdW50Iiwic3ViIjoiYjA4YTM5ZGEtYzMyNi00ZDdmLThlNDQtMzcxMmQ4ODI1MTdjIiwidHlwIjoiQmVhcmVyIiwiYXpwIj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qX3jtXiHBXtHbPPuqH_W29ym23V_5nHbGoLNLWg",
    "expires_in": 120,
    "refresh_expires_in": 3600,
    "refresh_token": "eyJhbGciOiJIUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICIyMTZlMjJjYy03ZGQ3LTRhYTgtYjlhMS04NWY3OGQ2NzhjMzYifQ.eyJleHAiOjE2NDg5MDY5OTMsImlhdCI6MTY0ODkwMzM5MywianRpIjoiNmQ5YWVhNDMtZTkyMS00YWJhLWJkZGMtZWQxM2Y0ZGFhZDVkIiwiaXNzIjoiaHR0cDovL2tleWNsb2Frc2VydmVyOjgwODAvYXV0aC9yZWFsbXMvTkdJTlgiLCJhdWQiOiJodHRwOi8va2V5Y2xvYWtzZXJ2ZXI6ODA4MC9hdXRoL3JlYWxtcy9OR0lOWCIsInN1YiI6ImIwOGEzOWRhLWMzMjYtNGQ3Zi04ZTQ0LTM3MTJkODgyNTE3YyIsInR5cCI6IlJlZnJlc2giLCJhenAiOiJuZ2lueCIsInNlc3Npb25fc3RhdGUiOiJiM2QzZjdkMS0wZDk1LTQwYzMtOTc5NS0wNWY2MzQxZTI4M2UiLCJzY29wZSI6InByb2ZpbGUgZW1haWwiLCJzaWQiOiJiM2QzZjdkMS0wZDk1LTQwYzMtOTc5NS0wNWY2MzQxZTI4M2UifQ.mIw1SGNJn7T9eyt30REZOGYntz3WIMIdLAC-giiXhgk",
    "token_type": "Bearer",
    "id_token": null,
    "not-before-policy": 1582326156,
    "session_state": "b3d3f7d1-0d95-40c3-9795-05f6341e283e",
    "scope": "profile email"
}

Note down the access_token from response, to use it in the API calls

Call your first API using access token

Add access token in Authorization request header

--header 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICIyVlFrLWh6Zy1uRUN1eDFvR0p6M3dNa3ZPSkRqVjRNb29aZWk2RHJORWhjIn0.eyJleHAiOjE2NDg5MDM1MTMsImlhdCI6MTY0ODkwMzM5MywianRpIjoiMTZiMDA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HeXgV3R67Gpk9kO_5d0dKR3OKqURHCIr89rONvOZSsN3cV_NaMDYFonopv_gHDdmD0YNj2A9ZAHwZEO14DdACZPshSb-9zFobadfVh69oe7wIXtgkI_42pUzVId2B7BGfFyJnUtHFrsCFuIhNzgRZfkl7kK50qzeG9zHGS61UfTyy-3R0iPMaCm_q9V1E-x7leCI70Bvv4EzMbEl5E1vj1OW5iiCa-9xIwOSAcYUqX3jtXiHBXtHbPPuqH_W29ym23V_5nHbGoLNLWg'

You are ready to call your first api

For example:

curl --location --request POST 'https://<;hostname:port>/dcc/v1/connectors'
--header 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJBbG12NGthdXNScEN3RTdoUkhEMzNJcEs1UC14NjJYN19DNmRzZ2FTNmlNIn0.eyJleHAiOjE2NDg0ODk4NjksImlhdCI6MTY0ODQ4OTc0OSwianRpIjoiZDg5YTIxYzUtZWFiYS00MTA4LWE5ZDUtMmQ5MmJmMGNjZWUxIiwiaXNzIjoiaHR0cHM6Ly8xMC4xOTguOTUuMTA0OjMwMDAyL2F1dGgvcmVhbG1zL05HSU5YIiwiYXVkIjoiYWNjb3VudCIsInN1YiI6ImIwOGEzOWRhLWMzMjYtNGQ3Zi04ZTQ0LTM3MTJkODgyNTE3YyIsInR5cCI6IkJlYXJlciIsImF6cCI6Im5naW54Iiwic2Vzc2lvbl9zdGF0ZSI6IjUwMzQ0ZjJkLTNhMWYtNDQzYy04YWJhLWU5OGI5ZjZkMTRhNyIsImFjciI6IjEiLCJhbGxvd2VkLW9yaWdpbnMiOlsiIl0sInJlYWxtX2FjY2VzcyI6eyJyb2xlcyI6WyJFbnRlcnByaXNlIEFkbWluaXN0cmF0b3IiLCJvZmZsaW5lX2FjY2VzcyIsInVtYV9hdXRob3JpemF0aW9uIl19LCJyZXNvdXJjZV9hY2Nlc3MiOnsiYWNjb3VudCI6eyJyb2xlcyI6WyJtYW5hZ2UtYWNjb3VudCIsIm1hbmFnZS1hY2NvdW50LWxpbmtzIiwidmlldy1wcm9maWxlIl19fSwic2NvcGUiOiJvcGVuaWQgcHJvZmlsZSBlbWFpbCIsInNpZCI6IjUwMzQ0ZjJkLTNhMWYtNDQzYy04YWJhLWU5OGI5ZjZkMTRhNyIsImVtYWlsX3ZlcmlmaWVkIjpmYWxzZSwicm9sZXMiOlsiRW50ZXJwcmlzZSBBZG1pbmlzdHJhdG9yIiwib2ZmbGluZV9hY2Nlc3MiLCJ1bWFfYXV0aG9yaXphdGlvbiJdLCJuYW1lIjoiYWRtaW4gTkdJTlgiLCJncm91cHMiOlsiRW50ZXJwcmlzZSBBZG1pbmlzdHJhdG9yIl0sInByZWZlcnJlZF91c2VybmFtZSI6ImFkbWluIiwiZ2l2ZW5fbmFtZSI6ImFkbWluIiwiZmFtaWx5X25hbWUiOiJOR0lOWCJ9.jpdb994X8e0kxw4s6B6XevCd_uPRbsiW9AT-iLdwzkzPPumvbv2aMuDqmRDAA6sWNwFIO0HXNkxW8YUMX2NTMhpHxljO1jRcDbk2UtU_7ZNnKx4RJeqbWMk0yf8XNxjED1V2j8lRixJNPee-MRxz2sG90aIlHzrZJN4uJFv_rgGmXVaM5Yij3sCCO9V3EIRriLC0FloAsLBiYV8OlTtuSLJ1gU_rQf8uK0F5IVd92fkEhsDD53SXliaFwDFs4Mwq77xgU1qwcO_8r1hq79IVYBTuoicwS5-1MQ0IXVhtjAILLvUcrIs_rwtnLHt8SN0qy54rMqiKeT31QKthKNfokw'

Example Response:

{
  "asd": {
    "block_object_id": "kafka-connector",
    "container_id": "",
    "image_name": "KafkaMirrorMaker2",
    "image_version": "",
    "status": "Failed",
    "display_name": "asd",
    "node_ip": null,
    "instance_id": "asd"
  }
}

Getting new access token using refresh token

It is important to note that access tokens are usually short-lived and often expired after only minutes. The additional refresh token that was return by the "/token" API allows the application to obtain a new access token after it expires.

Obtain new access token using "refresh" token

curl --location --request POST 'https://<;hostname:port>/auth/realms/NGINX/protocol/openid-connect/token'
  --header 'Content-Type: application/x-www-form-urlencoded'
  --data-urlencode 'grant_type=refresh_token'
  --data-urlencode 'refresh_token=<refresh_token>'
  --data-urlencode 'client_id=nginx' \
  --data-urlencode 'scope=openid' \
  --data-urlencode 'client_secret=480cd12a-fe8e-4398-88da-1ec120289d18'

Example Response:

{
    "access_token": "eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICIyVlFrLWh6Zy1uRUN1eDFvR0p6M3dNa3ZPSkRqVjRNb29aZWk2RHJORWhjIn0.eyJleHAiOjE2NDg5MDM1MTMsImlhdCI6MTY0ODkwMzM5MywianRpIjoiMTZiMDA4YzEtZDE5MC00NzRlLWFhNWYtNzk0YjU5YjNhMDE0IiwiaXNzIjoiaHR0cDovL2tleWNsb2Frc2VydmVyOjgwODAvYXV0aC9yZWFsbXMvTkdJTlgiLCJhdWQiOiJhY2NvdW50Iiwic3ViIjoiYjA4YTM5ZGEtYzMyNi00ZDdmLThlNDQtMzcxMmQ4ODI1MTdjIiwidHlwIjoiQmVhcmVyIiwiYXpwIjoibmdpbngiLCJzZXNzaW9uX3N0YXRlIjoiYjNkM2Y3ZDEtMGQ5NS00MGMzLTk3OTUtMDVmNjM0MWUyODNlIiwiYWNyIjoiMSIsImFsbG93ZWQtb3JpZ2lucyI6WyIiXSwicmVhbG1fYWNjZXNzIjp7InJvbGVzIjpbIkVudGVycHJpc2UgQWRtaW5pc3RyYXRvciIsIm9mZmxpbmVfYWNjZXNzIiwidW1hX2F1dGhvcml6YXRpb24iXX0sInJlc291cmNlX2FjY2VzcyI6eyJhY2NvdW50Ijp7InJvbGVzIjpbIm1hbmFnZS1hY2NvdW50IiwibWFuYWdlLWFjY291bnQtbGlua3MiLCJ2aWV3LXByb2ZpbGUiXX19LCJzY29wZSI6InByb2ZpbGUgZW1haWwiLCJzaWQiOiJiM2QzZjdkMS0wZDk1LTQwYzMtOTc5NS0wNWY2MzQxZTI4M2UiLCJlbWFpbF92ZXJpZmllZCI6ZmFs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IsInR5cCI6IlJlZnJlc2giLCJhenAiOiJuZ2lueCIsInNlc3Npb25fc3RhdGUiOiJiM2QzZjdkMS0wZDk1LTQwYzMtOTc5NS0wNWY2MzQxZTI4M2UiLCJzY29wZSI6InByb2ZpbGUgZW1haWwiLCJzaWQiOiJiM2QzZjdkMS0wZDk1LTQwYzMtOTc5NS0wNWY2MzQxZTI4M2UifQ.mIw1SGNJn7T9eyt30REZOGYntz3WIMIdLAC-giiXhgk",
    "token_type": "Bearer",
    "id_token": null,
    "not-before-policy": 1582326156,
    "session_state": "b3d3f7d1-0d95-40c3-9795-05f6341e283e",
    "scope": "profile email"
}