Get Started
The Cisco Observability Platform exposes various APIs for customizing and extending its features.
Base URI
Every API request begins with this base URI:
Copyhttps://{tenant-name}.observe.appdynamics.com/troubleshooting/v1beta/cogeng
Authentication
The Cisco Observability Platform Anomaly Detection Configuration API uses Open Authentication 2.0 (OAuth2) token-based authentication. Refer to Cisco Observability Platform Authentication for details on how to generate an OAuth token.
AppDynamics API requests adhere to a standard OAuth2 request format. You need a Service Principal and a valid JSON Web Token (JWT) to use this API. Service Principals are identities, represented as code, used by created applications, services, and automation tools to access specific resources. See Cisco Observability Platform Authentication.
HTTP Methods Allowed for Different User Roles
The users can use the following HTTP request methods for the API based on their Cisco Observability Platform Tenant roles:
Role | HTTP Methods Allowed |
---|---|
Configuration Manager | GET, PATCH, POST, PUT, and DELETE |
Troubleshooter | GET, PATCH, POST, PUT, and DELETE |
Observer | GET |
For more information about the Cisco Observability Platform Tenant Roles, see Assign Roles for Cisco Observability Platform Tenants.
Sample Codes
Perform Anomaly Detection Configuration Batch Operations
Resource URL
POST https://{tenant-name}.observe.appdynamics.com/troubleshooting/v1beta/cogeng/adConfigBatch
Sample Request
Copycurl --location --request POST 'https://{tenant-name}.observe.appdynamics.com/troubleshooting/v1beta/cogeng/adConfigBatch
' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer eyJhbGciOiJFUzI1NiIsImtpZCI6IjM0OTExMDYzNDY5NjY1MTQzMjA4NDMzOTk4MjUwNTY0NDg4OTEyIiwidHlwIjoiSldUIn0' \
--data-raw '{
"items": [
{
"operation": "PATCH",
"resource": "/adConfig/31vgC5nZSGIqGgkJtbiw",
"item": {
"name": "Sample AD Configuration",
"enabled": true,
"modelSensitivity": "LOW"
}
},
{
"operation": "DELETE",
"resource": "/adConfig/31vgC5nZSGIqGgkJtbiw"
}
]
}'
Sample Output for 207 (Success) Response
Copy{
"items": [
{
"operation": "PATCH",
"resource": "/adConfig/31vgC5nZSGIqGgkJtbiw",
"item": {
"name": "Sample AD Configuration",
"enabled": true,
"modelSensitivity": "LOW"
}
},
{
"operation": "DELETE",
"resource": "/adConfig/31vgC5nZSGIqGgkJtbiw"
}
],
"total": 2
}
Retrieve All Anomaly Detection Configurations for a Given Tenant
Resource URL
GET https://{tenant-name}.observe.appdynamics.com/troubleshooting/v1beta/cogeng/adConfig?max=1
Sample Request
Copycurl --location --request GET 'https://{tenant-name}.observe.appdynamics.com/troubleshooting/v1beta/cogeng/adConfig?max=1' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer eyJhbGciOiJFUzI1NiIsImtpZCI6IjM0OTExMDYzNDY5NjY1MTQzMjA4NDMzOTk4MjUwNTY0NDg4OTEyIiwidHlwIjoiSldUIn0'
Sample Output for 200 (Success) Response
Copy{
"items": [{
"id": "31vgC5nZSGIqGgkJtbiw",
"updatedAt": "2022-08-29T11:54:08.890Z",
"createdAt": "2022-08-29T11:54:08.890Z",
"name": "Sample AD Configuration",
"enabled": true,
"domain": "APM",
"entityTypes": [
"apm:service"
],
"includeObjectFilter": "entities(apm:service)[attributes(\"service.name\") = 'service1']",
"excludeObjectFilter": "entities(apm:service)[attributes(\"service.name\") = 'service2']",
"modelSensitivity": "LOW"
}],
"total": 1
}
Define a Single Anomaly Detection Configuration
Resource URL
POST https://{tenant-name}.observe.appdynamics.com/troubleshooting/v1beta/cogeng/adConfig
Sample Request (filter by attributes)
Copycurl --location --request POST 'https://{tenant-name}.observe.appdynamics.com/troubleshooting/v1beta/cogeng/adConfig
' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer eyJhbGciOiJFUzI1NiIsImtpZCI6IjM0OTExMDYzNDY5NjY1MTQzMjA4NDMzOTk4MjUwNTY0NDg4OTEyIiwidHlwIjoiSldUIn0' \
--data-raw '{
"name": "Sample AD Configuration",
"enabled": true,
"domain": "APM",
"entityTypes": [
"apm:service"
],
"includeObjectFilter": "entities(apm:service)[attributes(\"service.name\") = 'service1']",
"excludeObjectFilter": "entities(apm:service)[attributes(\"service.name\") = 'service2']",
"modelSensitivity": "LOW"
}'
Sample Output for 201 (Success) Response
Copy{
"id": "31vgC5nZSGIqGgkJtbiw",
"updatedAt": "2022-08-24T09:34:49.024Z",
"createdAt": "2022-08-24T09:34:49.024Z",
"name": "Sample AD Configuration",
"enabled": true,
"domain": "APM",
"entityTypes": [
"apm:service"
],
"includeObjectFilter": "entities(apm:service)[attributes(\"service.name\") = 'service1']",
"excludeObjectFilter": "entities(apm:service)[attributes(\"service.name\") = 'service2']",
"modelSensitivity": "LOW"
}
Sample Request (filter by tags)
Copycurl --location --request POST 'https://{tenant-name}.observe.appdynamics.com/troubleshooting/v1beta/cogeng/adConfig
' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer eyJhbGciOiJFUzI1NiIsImtpZCI6IjM0OTExMDYzNDY5NjY1MTQzMjA4NDMzOTk4MjUwNTY0NDg4OTEyIiwidHlwIjoiSldUIn0' \
--data-raw '{
"name": "Sample AD Configuration",
"enabled": true,
"domain": "APM",
"entityTypes": [
"apm:service"
],
"includeObjectFilter": "entities(apm:service)[tags('namespace') = 'cloudkartqe1']",
"excludeObjectFilter": "entities(apm:service)[tags('namespace') = 'cloudkartqe2']",
"modelSensitivity": "LOW"
}'
Sample Output for 201 (Success) Response
Copy{
"id": "31vgC5nZSGIqGgkJtbiw",
"updatedAt": "2022-08-24T09:34:49.024Z",
"createdAt": "2022-08-24T09:34:49.024Z",
"name": "Sample AD Configuration",
"enabled": true,
"domain": "APM",
"entityTypes": [
"apm:service"
],
"includeObjectFilter": "entities(apm:service)[tags('namespace') = 'cloudkartqe1']",
"excludeObjectFilter": "entities(apm:service)[tags('namespace') = 'cloudkartqe2']",
"modelSensitivity": "LOW"
}
Retrieve Anomaly Detection Configuration That Matches a Given ID
Resource URL
GET https://{tenant-name}.observe.appdynamics.com/troubleshooting/v1beta/cogeng/adConfig/{id}
Sample Request
Copycurl --location --request GET 'https://{tenant-name}.observe.appdynamics.com/troubleshooting/v1beta/cogeng/adConfig/494496e9-9521-433e-bea0-2b5c73cf421c' \
--header 'Content-Type: application/json' \
--header 'Authorization: eyJhbGciOiJFUzI1NiIsImtpZCI6IjM0OTExMDYzNDY5NjY1MTQzMjA4NDMzOTk4MjUwNTY0NDg4OTEyIiwidHlwIjoiSldUIn0'
Sample Output for 200 (Success) Response
Copy{
"id": "494496e9-9521-433e-bea0-2b5c73cf421c",
"updatedAt": "2022-08-25T07:22:20.632Z",
"createdAt": "2022-08-25T07:22:20.632Z",
"name": "Sample AD Configuration",
"enabled": true,
"domain": "APM",
"entityTypes": [
"apm:service"
],
"includeObjectFilter": "entities(apm:service)[attributes(\"service.name\") = 'service1']",
"excludeObjectFilter": "entities(apm:service)[attributes(\"service.name\") = 'service2']",
"modelSensitivity": "LOW"
}'
Update an Anomaly Detection Configuration That Matches a Given ID
Resource URL
PUT https://{tenant-name}.observe.appdynamics.com/troubleshooting/v1beta/cogeng/adConfig/{id}
Sample Request
Copycurl --location --request PUT 'https://{tenant-name}.observe.appdynamics.com/troubleshooting/v1beta/cogeng/adConfig/31vgC5nZSGIqGgkJtbiw' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer eyJhbGciOiJFUzI1NiIsImtpZCI6IjM0OTExMDYzNDY5NjY1MTQzMjA4NDMzOTk4MjUwNTY0NDg4OTEyIiwidHlwIjoiSldUIn0' \
--data-raw '{
"name": "Sample AD Configuration",
"enabled": true,
"domain": "APM",
"entityTypes": [
"apm:service"
],
"includeObjectFilter": "entities(apm:service)[attributes(\"service.name\") = 'service1']",
"excludeObjectFilter": "entities(apm:service)[attributes(\"service.name\") = 'service2']",
"modelSensitivity": "LOW",
}'
Sample Output for 200 (Success) Response
Copy{
"id": "31vgC5nZSGIqGgkJtbiw",
"updatedAt": "2022-08-24T09:43:46.015Z",
"createdAt": "2022-08-24T09:43:46.015Z",
"name": "Sample AD Configuration",
"enabled": true,
"domain": "APM",
"entityTypes": [
"apm:service"
],
"includeObjectFilter": "entities(apm:service)[attributes(\"service.name\") = 'service1']",
"excludeObjectFilter": "entities(apm:service)[attributes(\"service.name\") = 'service2']",
"modelSensitivity": "LOW"
}
Patch an Anomaly Detection Configuration That Matches a Given ID
Resource URL
PATCH https://{tenant-name}.observe.appdynamics.com/troubleshooting/v1beta/cogeng/adConfig/{id}
Sample Request
Copy
curl --location --request PATCH 'https://{tenant-name}.observe.appdynamics.com/troubleshooting/v1beta/cogeng/adConfig/31vgC5nZSGIqGgkJtbiw' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer eyJhbGciOiJFUzI1NiIsImtpZCI6IjM0OTExMDYzNDY5NjY1MTQzMjA4NDMzOTk4MjUwNTY0NDg4OTEyIiwidHlwIjoiSldUIn0' \
--data-raw '{
"name": "Sample AD Configuration",
"enabled": true,
"modelSensitivity": "LOW"
}'
Sample Output for 200 (Success) Response
Copy{
"id": "31vgC5nZSGIqGgkJtbiw",
"updatedAt": "2022-08-24T09:46:36.484Z",
"createdAt": "2022-08-24T09:46:36.484Z",
"name": "Sample AD Configuration",
"enabled": true,
"domain": "APM",
"entityTypes": [
"apm:service"
],
"includeObjectFilter": "entities(apm:service)[attributes(\"service.name\") = 'service1']",
"excludeObjectFilter": "entities(apm:service)[attributes(\"service.name\") = 'service2']",
"modelSensitivity": "LOW",
}
Configure Anomaly Detection with High Sensitivity
Resource URL
POST https://{tenant-name}.observe.appdynamics.com/troubleshooting/v1beta/cogeng/adConfig
Sample Request
Copy
curl --location --request POST ‘https://{tenant-name}.observe.appdynamics.com/troubleshooting/v1beta/cogeng/adConfig' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer eyJhbGciOiJFUzI1NiIsImtpZCI6IjM0OTExMDYzNDY5NjY1MTQzMjA4NDMzOTk4MjUwNTY0NDg4OTEyIiwidHlwIjoiSldUIn0' \
--data-raw '{
"name": "Sample AD Configuration for Service",
"enabled": true,
"domain": "APM",
"entityTypes": [
"apm:service"
],
"includeObjectFilter": null,
"excludeObjectFilter": null,
"modelSensitivity": "HIGH"
}'
Configure Anomaly Detection with Medium Sensitivity
Resource URL
POST https://{tenant-name}.observe.appdynamics.com/troubleshooting/v1beta/cogeng/adConfig
Sample Request
Copy
curl --location --request POST ‘https://{tenant-name}.observe.appdynamics.com/troubleshooting/v1beta/cogeng/adConfig' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer eyJhbGciOiJFUzI1NiIsImtpZCI6IjM0OTExMDYzNDY5NjY1MTQzMjA4NDMzOTk4MjUwNTY0NDg4OTEyIiwidHlwIjoiSldUIn0' \
--data-raw '{
"name": "Sample AD Configuration for Service Instance",
"enabled": true,
"domain": "APM",
"entityTypes": [
"apm:service_instance"
],
"includeObjectFilter": null,
"excludeObjectFilter": null,
"modelSensitivity": "MEDIUM"
}'
Configure Anomaly Detection with Low Sensitivity
Resource URL
POST https://{tenant-name}.observe.appdynamics.com/troubleshooting/v1beta/cogeng/adConfig
Sample Request
Copycurl --location --request POST ‘https://{tenant-name}.observe.appdynamics.com/troubleshooting/v1beta/cogeng/adConfig' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer eyJhbGciOiJFUzI1NiIsImtpZCI6IjM0OTExMDYzNDY5NjY1MTQzMjA4NDMzOTk4MjUwNTY0NDg4OTEyIiwidHlwIjoiSldUIn0' \
--data-raw '{
"name": "Sample AD Configuration for Service Instance",
"enabled": true,
"domain": "APM",
"entityTypes": [
"apm:service_instance"
],
"includeObjectFilter": null,
"excludeObjectFilter": "entities(k8s:namespace)[attributes("apm.service_instance.name") = 'valhalla']",
"modelSensitivity": "LOW"
}'
Test Anomaly Detection
Resource URL
POST https://{tenant-name}.observe.appdynamics.com/troubleshooting/v1beta/cogeng/adConfig
Sample Request
Copycurl --location --request POST ‘https://{tenant-name}.observe.appdynamics.com/troubleshooting/v1beta/cogeng/adConfig' \
--header 'Authorization: Bearer eyJhbGciOiJFUzI1NiIsImtpZCI6IjM0OTExMDYzNDY5NjY1MTQzMjA4NDMzOTk4MjUwNTY0NDg4OTEyIiwidHlwIjoiSldUIn0'
--header 'Content-Type: application/json'
--data-raw '{
"name": "AdConfig-1",
"enabled": true,
"domain": "apm",
"entityTypes": [
"apm:service_instance"
],
"modelSensitivity": "TEST"
}'