Tackle Container Advisor (TCA) v1.0.0
Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.
These are the REST calls you can make to the TCA to get assessment and planning details.
Base URL: http://localhost:8000
APIs
Standardize
Returns standard names and versions of all entities detected in the technology_summary of the app
Code samples
# You can also use wget
curl -X POST /standardize \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'X-Fields: string' \
-H 'accesstoken: API_KEY'
POST /standardize HTTP/1.1
Content-Type: application/json
Accept: application/json
X-Fields: string
const inputBody = '[
{
"application_name": "string",
"application_description": "string",
"technology_summary": "string"
}
]';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'X-Fields':'string',
'accesstoken':'API_KEY'
};
fetch('/standardize',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Fields' => 'string',
'accesstoken' => 'API_KEY'
}
result = RestClient.post '/standardize',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Fields': 'string',
'accesstoken': 'API_KEY'
}
r = requests.post('/standardize', headers = headers)
print(r.json())
<?php
require 'vendor/autoload.php';
$headers = array(
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Fields' => 'string',
'accesstoken' => 'API_KEY',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('POST','/standardize', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("/standardize");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
"X-Fields": []string{"string"},
"accesstoken": []string{"API_KEY"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "/standardize", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /standardize
Body parameter
[
{
"application_name": "string",
"application_description": "string",
"technology_summary": "string"
}
]
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
X-Fields | header | string(mask) | false | An optional fields mask |
body | body | Input | true | none |
Example responses
200 Response
{
"status": 0,
"message": "string",
"standardized_apps": [
{
"Name": "string",
"Desc": "string",
"Cmpt": "string",
"OS": "string",
"Lang": "string",
"App Server": "string",
"Dependent Apps": "string",
"Runtime": "string",
"Libs": "string",
"Reason": "string",
"KG Version": "string"
}
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Success | Standardization_Output |
201 | Created | Standardization Completed successfully! | None |
400 | Bad Request | Input data format doesn't match the format expected by TCA | None |
401 | Unauthorized | Unauthorized, missing or invalid access token | None |
500 | Internal Server Error | Internal Server Error, missing or wrong config of RBAC access token validation url | None |
Containerize
Returns the container recommendations for the input app(s)
Code samples
# You can also use wget
curl -X POST /containerize \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'X-Fields: string' \
-H 'accesstoken: API_KEY'
POST /containerize HTTP/1.1
Content-Type: application/json
Accept: application/json
X-Fields: string
const inputBody = '[
{
"Name": "string",
"Desc": "string",
"Cmpt": "string",
"OS": "string",
"Lang": "string",
"App Server": "string",
"Dependent Apps": "string",
"Runtime": "string",
"Libs": "string",
"Reason": "string",
"KG Version": "string"
}
]';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'X-Fields':'string',
'accesstoken':'API_KEY'
};
fetch('/containerize',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Fields' => 'string',
'accesstoken' => 'API_KEY'
}
result = RestClient.post '/containerize',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Fields': 'string',
'accesstoken': 'API_KEY'
}
r = requests.post('/containerize', headers = headers)
print(r.json())
<?php
require 'vendor/autoload.php';
$headers = array(
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Fields' => 'string',
'accesstoken' => 'API_KEY',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('POST','/containerize', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("/containerize");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
"X-Fields": []string{"string"},
"accesstoken": []string{"API_KEY"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "/containerize", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /containerize
Body parameter
[
{
"Name": "string",
"Desc": "string",
"Cmpt": "string",
"OS": "string",
"Lang": "string",
"App Server": "string",
"Dependent Apps": "string",
"Runtime": "string",
"Libs": "string",
"Reason": "string",
"KG Version": "string"
}
]
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
X-Fields | header | string(mask) | false | An optional fields mask |
body | body | Standardization | true | none |
catalog | query | string | false | catalog of container images: dockerhub, openshift or operator |
Enumerated Values
Parameter | Value |
---|---|
catalog | dockerhub |
catalog | openshift |
catalog | operator |
Example responses
200 Response
{
"status": 0,
"message": "string",
"containerization": [
{
"Name": "string",
"Desc": "string",
"Cmpt": "string",
"Valid": true,
"Ref Dockers": [
{
"name": "string",
"status": "string",
"url": "string"
}
],
"Confidence": 0,
"Reason": "string",
"Recommend": "string"
}
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Success | Containerization_Output |
201 | Created | Container recommendation generated! | None |
400 | Bad Request | Input data format doesn't match the format expected by TCA | None |
401 | Unauthorized | Unauthorized, missing or invalid access token | None |
500 | Internal Server Error | Internal Server Error, missing or wrong config of RBAC access token validation url | None |
Clustering
Returns grouping of apps based on technology stack similarity
Code samples
# You can also use wget
curl -X POST /clustering \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'X-Fields: string' \
-H 'accesstoken: API_KEY'
POST /clustering HTTP/1.1
Content-Type: application/json
Accept: application/json
X-Fields: string
const inputBody = '[
{
"Name": "string",
"Desc": "string",
"Cmpt": "string",
"OS": "string",
"Lang": "string",
"App Server": "string",
"Dependent Apps": "string",
"Runtime": "string",
"Libs": "string",
"Reason": "string",
"KG Version": "string"
}
]';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'X-Fields':'string',
'accesstoken':'API_KEY'
};
fetch('/clustering',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Fields' => 'string',
'accesstoken' => 'API_KEY'
}
result = RestClient.post '/clustering',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Fields': 'string',
'accesstoken': 'API_KEY'
}
r = requests.post('/clustering', headers = headers)
print(r.json())
<?php
require 'vendor/autoload.php';
$headers = array(
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Fields' => 'string',
'accesstoken' => 'API_KEY',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('POST','/clustering', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("/clustering");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
"X-Fields": []string{"string"},
"accesstoken": []string{"API_KEY"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "/clustering", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /clustering
Body parameter
[
{
"Name": "string",
"Desc": "string",
"Cmpt": "string",
"OS": "string",
"Lang": "string",
"App Server": "string",
"Dependent Apps": "string",
"Runtime": "string",
"Libs": "string",
"Reason": "string",
"KG Version": "string"
}
]
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
X-Fields | header | string(mask) | false | An optional fields mask |
body | body | Standardization | true | none |
Example responses
200 Response
{
"status": 0,
"message": "string",
"clusters": [
{
"id": 0,
"name": "string",
"type": "string",
"tech_stack": [
"string"
],
"num_elements": 0,
"apps": [
{
"Name": "string",
"Desc": "string",
"Cmpt": "string",
"OS": "string",
"Lang": "string",
"App Server": "string",
"Dependent Apps": "string",
"Runtime": "string",
"Libs": "string",
"Reason": "string",
"KG Version": "string"
}
]
}
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Success | Clustering_Output |
201 | Created | Clustering Completed successfully! | None |
400 | Bad Request | Input data format doesn't match the format expected by TCA | None |
401 | Unauthorized | Unauthorized, missing or invalid access token | None |
500 | Internal Server Error | Internal Server Error, missing or wrong config of RBAC access token validation url | None |
Healthcheck
Healthcheck api is monitor all the api requests and responses
Code samples
# You can also use wget
curl -X GET /health_check
GET /health_check HTTP/1.1
fetch('/health_check',
{
method: 'GET'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
result = RestClient.get '/health_check',
params: {
}
p JSON.parse(result)
import requests
r = requests.get('/health_check')
print(r.json())
<?php
require 'vendor/autoload.php';
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','/health_check', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("/health_check");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "/health_check", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /health_check
Terminate the service if any issue encountered in api request processing
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | HTTP OK | None |
400 | Bad Request | HTTP Bad Request | None |
500 | Internal Server Error | HTTP Internal Server Error | None |
Schemas
Input
{
"application_name": "string",
"application_description": "string",
"technology_summary": "string"
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
application_name | string | true | none | Name of the application |
application_description | string | false | none | Description of the application |
technology_summary | string | false | none | Technology information for the application |
Standardization
{
"Name": "string",
"Desc": "string",
"Cmpt": "string",
"OS": "string",
"Lang": "string",
"App Server": "string",
"Dependent Apps": "string",
"Runtime": "string",
"Libs": "string",
"Reason": "string",
"KG Version": "string"
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
Name | string | true | none | Name of the application |
Desc | string | true | none | Description of the application |
Cmpt | string | true | none | Component/Deployment Unit of the application |
OS | string | false | none | Operating system |
Lang | string | false | none | Programming language |
App Server | string | false | none | Application server |
Dependent Apps | string | false | none | Database and software |
Runtime | string | false | none | Runtime |
Libs | string | false | none | Additional libraries |
Reason | string | false | none | Reason for assessment |
KG Version | string | false | none | KG Version |
Containerization
{
"Name": "string",
"Desc": "string",
"Cmpt": "string",
"Valid": true,
"Ref Dockers": [
{
"name": "string",
"status": "string",
"url": "string"
}
],
"Confidence": 0,
"Reason": "string",
"Recommend": "string"
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
Name | string | true | none | Name of the application |
Desc | string | true | none | Description of the application |
Cmpt | string | true | none | Component/Deployment Unit of the application |
Valid | boolean | true | none | Is the containerization assessment valid? |
Ref Dockers | [Container] | false | none | An array of candidate container images / operators |
Confidence | number | false | none | Confidence of the assessment |
Reason | string | false | none | Reason for assessment |
Recommend | string | false | none | Recommended disposition |
Container
{
"name": "string",
"status": "string",
"url": "string"
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
name | string | false | none | none |
status | string | false | none | none |
url | string | false | none | none |
Clustering
{
"id": 0,
"name": "string",
"type": "string",
"tech_stack": [
"string"
],
"num_elements": 0,
"apps": [
{
"Name": "string",
"Desc": "string",
"Cmpt": "string",
"OS": "string",
"Lang": "string",
"App Server": "string",
"Dependent Apps": "string",
"Runtime": "string",
"Libs": "string",
"Reason": "string",
"KG Version": "string"
}
]
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
id | integer | true | none | Cluster ID |
name | string | true | none | Cluster name |
type | string | true | none | Cluster type |
tech_stack | [string] | true | none | List of tech stack elements |
num_elements | integer | true | none | Number of elements |
apps | [Standardization] | true | none | An array of applications |
Standardization_Output
{
"status": 0,
"message": "string",
"standardized_apps": [
{
"Name": "string",
"Desc": "string",
"Cmpt": "string",
"OS": "string",
"Lang": "string",
"App Server": "string",
"Dependent Apps": "string",
"Runtime": "string",
"Libs": "string",
"Reason": "string",
"KG Version": "string"
}
]
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
status | integer | true | none | Status of the call |
message | string | true | none | Status message |
standardized_apps | [Standardization] | true | none | An array of entity standardization for application workload |
Containerization_Output
{
"status": 0,
"message": "string",
"containerization": [
{
"Name": "string",
"Desc": "string",
"Cmpt": "string",
"Valid": true,
"Ref Dockers": [
{
"name": "string",
"status": "string",
"url": "string"
}
],
"Confidence": 0,
"Reason": "string",
"Recommend": "string"
}
]
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
status | integer | true | none | Status of the call |
message | string | true | none | Status message |
containerization | [Containerization] | true | none | An array of containerization planning for application workload |
Clustering_Output
{
"status": 0,
"message": "string",
"clusters": [
{
"id": 0,
"name": "string",
"type": "string",
"tech_stack": [
"string"
],
"num_elements": 0,
"apps": [
{
"Name": "string",
"Desc": "string",
"Cmpt": "string",
"OS": "string",
"Lang": "string",
"App Server": "string",
"Dependent Apps": "string",
"Runtime": "string",
"Libs": "string",
"Reason": "string",
"KG Version": "string"
}
]
}
]
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
status | integer | true | none | Status of the call |
message | string | true | none | Status message |
clusters | [Clustering] | true | none | An array of containerization clustering for application workload |