Hi Arpan,
This is follow on from your original threadREST API for CA APM open alerts (APM SaaS for DXI)
Your APM SaaS/DXI account is already fully functional which is why you can access the dashboard etc
In APM SaaS/DXI your access to the EM is via your main account url https://....apm.cloud.ca.com
Per my response in your original thread this is what you need to do:
1. The DXI documentation for API Reference is not yet updated correctly to show SQL REST API:
API Reference - CA Digital Experience Insights Application Performance Management - CA Technologies Documentation . So in the meantime please use the on premise documentation:
SQL REST API - CA Application Performance Management - 10.7 - CA Technologies Documentation
For the API URL "http://<EM Host>:8081" just use your DXI URL https://...apm.cloud.ca.com
You will first need to generate a Public API Token on the Security section of your DXI APM UI (https://...apm.cloud.ca.com/apm/appmap/ApmServer/#/security)
2. I have tested this in-house and it works successfully e.g. a curl test on Linux to get the schema
export TOKEN=5829ba53-a9a6-424f-8276-2ba160d32260
curl -Lk -H "Authorization: Bearer $TOKEN" -H "Accept: application/json" -H "Content-Type: application/json" https://......apm.cloud.ca.com/apm/appmap/apmData/schema
{"tables":[{"name":"metric_data","columns":[{"name":"source_name","type":"string","whereCapabilities":["=","<",">","<=",">=","<>","!=","BETWEEN","LIKE"]},{"name":"agent_host","type":"string","whereCapabilities":["=","<",">","<=",">=","<>","!=","BETWEEN","LIKE"]},{"name":"agent_process","type":"string","whereCapabilities":["=","<",">","<=",">=","<>","!=","BETWEEN","LIKE"]},{"name":"agent_name","type":"string","whereCapabilities":["=","<",">","<=",">=","<>","!=","BETWEEN","LIKE"]},{"name":"domain_name","type":"string","whereCapabilities":["=","<",">","<=",">=","<>","!=","BETWEEN","LIKE"]},{"name":"metric_path","type":"string","whereCapabilities":["=","<",">","<=",">=","<>","!=","BETWEEN","LIKE"]},{"name":"metric_attribute","type":"string","whereCapabilities":["=","<",">","<=",">=","<>","!=","BETWEEN","LIKE"]},{"name":"attribute_type","type":"long","whereCapabilities":["=","<",">","<=",">=","<>","!=","BETWEEN"]},{"name":"frequency","type":"long","whereCapabilities":["=","<",">","<=",">=","<>","!=","BETWEEN"]},{"name":"ts","type":"timestamp","whereCapabilities":["=","<",">","<=",">=","<>","!=","BETWEEN"]},{"name":"min_value","type":"long","whereCapabilities":["=","<",">","<=",">=","<>","!=","BETWEEN"]},{"name":"max_value","type":"long","whereCapabilities":["=","<",">","<=",">=","<>","!=","BETWEEN"]},{"name":"value_count","type":"long","whereCapabilities":["=","<",">","<=",">=","<>","!=","BETWEEN"]},{"name":"agg_value","type":"long","whereCapabilities":["=","<",">","<=",">=","<>","!=","BETWEEN"]}]},{"name":"metrics","columns":[{"name":"source_name","type":"string","whereCapabilities":["=","<",">","<=",">=","<>","!=","BETWEEN","LIKE"]},{"name":"agent_host","type":"string","whereCapabilities":["=","<",">","<=",">=","<>","!=","BETWEEN","LIKE"]},{"name":"agent_process","type":"string","whereCapabilities":["=","<",">","<=",">=","<>","!=","BETWEEN","LIKE"]},{"name":"agent_name","type":"string","whereCapabilities":["=","<",">","<=",">=","<>","!=","BETWEEN","LIKE"]},{"name":"domain_name","type":"string","whereCapabilities":["=","<",">","<=",">=","<>","!=","BETWEEN","LIKE"]},{"name":"metric_path","type":"string","whereCapabilities":["=","<",">","<=",">=","<>","!=","BETWEEN","LIKE"]},{"name":"metric_attribute","type":"string","whereCapabilities":["=","<",">","<=",">=","<>","!=","BETWEEN","LIKE"]},{"name":"attribute_type","type":"long","whereCapabilities":["=","<",">","<=",">=","<>","!=","BETWEEN"]},{"name":"first_seen","type":"timestamp","whereCapabilities":["=","<",">","<=",">=","<>","!=","BETWEEN"]},{"name":"last_seen","type":"timestamp","whereCapabilities":["=","<",">","<=",">=","<>","!=","BETWEEN"]}]},{"name":"sources","columns":[{"name":"source_name","type":"string","whereCapabilities":["=","<",">","<=",">=","<>","!=","BETWEEN","LIKE"]},{"name":"status","type":"string","whereCapabilities":["=","<",">","<=",">=","<>","!=","BETWEEN","LIKE"]},{"name":"type","type":"string","whereCapabilities":["=","<",">","<=",">=","<>","!=","BETWEEN","LIKE"]}]}]}
3. For the query to get the alerts you can use one of the other example queries (#8 & #9) for the metric_data table with metric_path where clause set to access the alerts. From Mike's advice in your your first thread this should be: "SuperDomain|Custom Metric Host|Custom Metric Process|Custom Metric Agent|Alerts|{MM name}|{Alert name}")
The APMSQL Cookbook also provides useful information on how to build queries with the API because it also uses it (APMSQL Server is not yet available on DXI APM)
APMSQL Cookbook - CA Application Performance Management - 10.7 - CA Technologies Documentation
Hope that helps.
Guenter_Grossberger might have other best practice advice to add for SQL REST API usage to DXI.
Thanks
Lynn