Skip to content

Latest commit

 

History

History
1085 lines (743 loc) · 42.5 KB

File metadata and controls

1085 lines (743 loc) · 42.5 KB

instana_client.ApplicationAlertConfigurationApi

All URIs are relative to https://unit-tenant.instana.io

Method HTTP request Description
bulk_delete_application_alert_configs PUT /api/events/settings/application-alert-configs/bulk/delete Bulk Delete Application Smart Alert Configs
bulk_disable_application_alert_configs PUT /api/events/settings/application-alert-configs/bulk/disable Bulk Disable Application Smart Alert Configs
bulk_enable_application_alert_configs PUT /api/events/settings/application-alert-configs/bulk/enable Bulk Enable Application Smart Alert Configs
create_application_alert_config POST /api/events/settings/application-alert-configs Create Smart Alert Config
delete_application_alert_config DELETE /api/events/settings/application-alert-configs/{id} Delete Smart Alert Config
disable_application_alert_config PUT /api/events/settings/application-alert-configs/{id}/disable Disable Smart Alert Config
enable_application_alert_config PUT /api/events/settings/application-alert-configs/{id}/enable Enable Application Alert Config
find_all_active_application_alert_configs GET /api/events/settings/application-alert-configs Get all Smart Alert Configs
find_application_alert_config GET /api/events/settings/application-alert-configs/{id} Get Smart Alert Config
find_application_alert_config_versions GET /api/events/settings/application-alert-configs/{id}/versions Get Smart Alert Config Versions
restore_application_alert_config PUT /api/events/settings/application-alert-configs/{id}/restore/{created} Restore Smart Alert Config
update_application_alert_config POST /api/events/settings/application-alert-configs/{id} Update Smart Alert Config
update_application_historic_baseline POST /api/events/settings/application-alert-configs/{id}/update-baseline Recalculate Smart Alert Config Baseline

bulk_delete_application_alert_configs

bulk_delete_application_alert_configs(body)

Bulk Delete Application Smart Alert Configs

Deletes multiple application alert configurations. Creates new revisions for all specified alerts with deleted=true. All revisions share the same timestamp. Maximum 1000 IDs per request.

Example

  • Api Key Authentication (ApiKeyAuth):
import instana_client
from instana_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://unit-tenant.instana.io
# See configuration.py for a list of all supported configuration parameters.
configuration = instana_client.Configuration(
    host = "https://unit-tenant.instana.io"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: ApiKeyAuth
configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer'

# Enter a context with an instance of the API client
with instana_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = instana_client.ApplicationAlertConfigurationApi(api_client)
    body = ["alert-id-1","alert-id-2","alert-id-3"] # str | 

    try:
        # Bulk Delete Application Smart Alert Configs
        api_instance.bulk_delete_application_alert_configs(body)
    except Exception as e:
        print("Exception when calling ApplicationAlertConfigurationApi->bulk_delete_application_alert_configs: %s\n" % e)

Parameters

Name Type Description Notes
body str

Return type

void (empty response body)

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: Not defined

HTTP response details

Status code Description Response headers
204 Successful - no content to return. -
400 Bad request. -
403 Insufficient permissions or limited in access. -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

bulk_disable_application_alert_configs

bulk_disable_application_alert_configs(body)

Bulk Disable Application Smart Alert Configs

Disables multiple application alert configurations. Creates new revisions for all specified alerts with enabled=false. All revisions share the same timestamp. Maximum 1000 IDs per request.

Example

  • Api Key Authentication (ApiKeyAuth):
import instana_client
from instana_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://unit-tenant.instana.io
# See configuration.py for a list of all supported configuration parameters.
configuration = instana_client.Configuration(
    host = "https://unit-tenant.instana.io"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: ApiKeyAuth
configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer'

# Enter a context with an instance of the API client
with instana_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = instana_client.ApplicationAlertConfigurationApi(api_client)
    body = ["alert-id-1","alert-id-2","alert-id-3"] # str | 

    try:
        # Bulk Disable Application Smart Alert Configs
        api_instance.bulk_disable_application_alert_configs(body)
    except Exception as e:
        print("Exception when calling ApplicationAlertConfigurationApi->bulk_disable_application_alert_configs: %s\n" % e)

Parameters

Name Type Description Notes
body str

Return type

void (empty response body)

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: Not defined

HTTP response details

Status code Description Response headers
204 Successful - no content to return. -
400 Bad request. -
403 Insufficient permissions or limited in access. -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

bulk_enable_application_alert_configs

bulk_enable_application_alert_configs(body)

Bulk Enable Application Smart Alert Configs

Enables multiple application alert configurations. Creates new revisions for all specified alerts with enabled=true. All revisions share the same timestamp. Maximum 1000 IDs per request.

Example

  • Api Key Authentication (ApiKeyAuth):
import instana_client
from instana_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://unit-tenant.instana.io
# See configuration.py for a list of all supported configuration parameters.
configuration = instana_client.Configuration(
    host = "https://unit-tenant.instana.io"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: ApiKeyAuth
configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer'

# Enter a context with an instance of the API client
with instana_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = instana_client.ApplicationAlertConfigurationApi(api_client)
    body = ["alert-id-1","alert-id-2","alert-id-3"] # str | 

    try:
        # Bulk Enable Application Smart Alert Configs
        api_instance.bulk_enable_application_alert_configs(body)
    except Exception as e:
        print("Exception when calling ApplicationAlertConfigurationApi->bulk_enable_application_alert_configs: %s\n" % e)

Parameters

Name Type Description Notes
body str

Return type

void (empty response body)

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: Not defined

HTTP response details

Status code Description Response headers
204 Successful - no content to return. -
400 Bad request. -
403 Insufficient permissions or limited in access. -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

create_application_alert_config

ApplicationAlertConfigWithMetadata create_application_alert_config(application_alert_config)

Create Smart Alert Config

Creates a new Smart Alert Configuration. For more information on Application Alert Configuration please access the https://developer.ibm.com/apis/catalog/instana--instana-rest-api/Applications#application-alert-configuration.

Example

  • Api Key Authentication (ApiKeyAuth):
import instana_client
from instana_client.models.application_alert_config import ApplicationAlertConfig
from instana_client.models.application_alert_config_with_metadata import ApplicationAlertConfigWithMetadata
from instana_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://unit-tenant.instana.io
# See configuration.py for a list of all supported configuration parameters.
configuration = instana_client.Configuration(
    host = "https://unit-tenant.instana.io"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: ApiKeyAuth
configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer'

# Enter a context with an instance of the API client
with instana_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = instana_client.ApplicationAlertConfigurationApi(api_client)
    application_alert_config = {"name":"Calls are slower than usual","description":"Calls are slower or equal to the expectation based on latency (90th).","boundaryScope":"INBOUND","applicationId":"ZOi0te_ERE-mRm-9zsbwdg","applications":{"ZOi0te_ERE-mRm-9zsbwdg":{"applicationId":"ZOi0te_ERE-mRm-9zsbwdg","inclusive":true,"services":{}}},"severity":5,"triggering":false,"tagFilterExpression":{"type":"TAG_FILTER","name":"endpoint.name","stringValue":null,"numberValue":null,"booleanValue":null,"key":null,"value":null,"operator":"NOT_EMPTY","entity":"DESTINATION"},"includeInternal":false,"includeSynthetic":false,"rule":{"alertType":"slowness","aggregation":"P90","metricName":"latency"},"threshold":{"type":"historicBaseline","operator":">=","seasonality":"DAILY","baseline":[[0,1,3],[600000,1,3]],"deviationFactor":3,"lastUpdated":0},"alertChannelIds":[],"granularity":600000,"timeThreshold":{"type":"violationsInSequence","timeWindow":600000},"evaluationType":"PER_AP","customPayloadFields":[]} # ApplicationAlertConfig | 

    try:
        # Create Smart Alert Config
        api_response = api_instance.create_application_alert_config(application_alert_config)
        print("The response of ApplicationAlertConfigurationApi->create_application_alert_config:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling ApplicationAlertConfigurationApi->create_application_alert_config: %s\n" % e)

Parameters

Name Type Description Notes
application_alert_config ApplicationAlertConfig

Return type

ApplicationAlertConfigWithMetadata

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 OK -
400 Bad request. -
403 Insufficient permissions or limited in access. -
422 Unprocessable request - missing/invalid data. -
428 Baseline calculation failed due to insufficient data. -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

delete_application_alert_config

delete_application_alert_config(id)

Delete Smart Alert Config

Deletes an Smart Alert Configuration. For more information on Application Alert Configuration please access the https://developer.ibm.com/apis/catalog/instana--instana-rest-api/Applications#application-alert-configuration.

Example

  • Api Key Authentication (ApiKeyAuth):
import instana_client
from instana_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://unit-tenant.instana.io
# See configuration.py for a list of all supported configuration parameters.
configuration = instana_client.Configuration(
    host = "https://unit-tenant.instana.io"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: ApiKeyAuth
configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer'

# Enter a context with an instance of the API client
with instana_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = instana_client.ApplicationAlertConfigurationApi(api_client)
    id = 'DKp0JArJRAiQIav9CoKSWQ' # str | ID of a specific Smart Alert Configuration to delete.

    try:
        # Delete Smart Alert Config
        api_instance.delete_application_alert_config(id)
    except Exception as e:
        print("Exception when calling ApplicationAlertConfigurationApi->delete_application_alert_config: %s\n" % e)

Parameters

Name Type Description Notes
id str ID of a specific Smart Alert Configuration to delete.

Return type

void (empty response body)

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

HTTP response details

Status code Description Response headers
204 Successful - no content to return. -
403 Insufficient permissions or limited in access. -
404 Resource not found. -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

disable_application_alert_config

disable_application_alert_config(id, body=body)

Disable Smart Alert Config

Disables an Smart Alert Configuration. For more information on Application Alert Configuration please access the https://developer.ibm.com/apis/catalog/instana--instana-rest-api/Applications#application-alert-configuration.

Example

  • Api Key Authentication (ApiKeyAuth):
import instana_client
from instana_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://unit-tenant.instana.io
# See configuration.py for a list of all supported configuration parameters.
configuration = instana_client.Configuration(
    host = "https://unit-tenant.instana.io"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: ApiKeyAuth
configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer'

# Enter a context with an instance of the API client
with instana_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = instana_client.ApplicationAlertConfigurationApi(api_client)
    id = 'DKp0JArJRAiQIav9CoKSWQ' # str | ID of a specific Smart Alert Configuration to disable.
    body = 'body_example' # str |  (optional)

    try:
        # Disable Smart Alert Config
        api_instance.disable_application_alert_config(id, body=body)
    except Exception as e:
        print("Exception when calling ApplicationAlertConfigurationApi->disable_application_alert_config: %s\n" % e)

Parameters

Name Type Description Notes
id str ID of a specific Smart Alert Configuration to disable.
body str [optional]

Return type

void (empty response body)

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: Not defined

HTTP response details

Status code Description Response headers
204 Successful - no content to return. -
403 Insufficient permissions or limited in access. -
404 Resource not found. -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

enable_application_alert_config

enable_application_alert_config(id, body=body)

Enable Application Alert Config

Enables an Smart Alert Configuration. For more information on Application Alert Configuration please access the https://developer.ibm.com/apis/catalog/instana--instana-rest-api/Applications#application-alert-configuration.

Example

  • Api Key Authentication (ApiKeyAuth):
import instana_client
from instana_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://unit-tenant.instana.io
# See configuration.py for a list of all supported configuration parameters.
configuration = instana_client.Configuration(
    host = "https://unit-tenant.instana.io"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: ApiKeyAuth
configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer'

# Enter a context with an instance of the API client
with instana_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = instana_client.ApplicationAlertConfigurationApi(api_client)
    id = 'DKp0JArJRAiQIav9CoKSWQ' # str | ID of a specific Smart Alert Configuration to enable.
    body = 'body_example' # str |  (optional)

    try:
        # Enable Application Alert Config
        api_instance.enable_application_alert_config(id, body=body)
    except Exception as e:
        print("Exception when calling ApplicationAlertConfigurationApi->enable_application_alert_config: %s\n" % e)

Parameters

Name Type Description Notes
id str ID of a specific Smart Alert Configuration to enable.
body str [optional]

Return type

void (empty response body)

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: Not defined

HTTP response details

Status code Description Response headers
204 Successful - no content to return. -
403 Insufficient permissions or limited in access. -
404 Resource not found. -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

find_all_active_application_alert_configs

List[ApplicationAlertConfigWithMetadata] find_all_active_application_alert_configs(application_id, alert_ids=alert_ids)

Get all Smart Alert Configs

Gets all the Smart Alert Configurations pertaining to a specific application. Configurations are sorted by creation date in descending order. For more information on Application Alert Configuration please access the https://developer.ibm.com/apis/catalog/instana--instana-rest-api/Applications#application-alert-configuration.

Example

  • Api Key Authentication (ApiKeyAuth):
import instana_client
from instana_client.models.application_alert_config_with_metadata import ApplicationAlertConfigWithMetadata
from instana_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://unit-tenant.instana.io
# See configuration.py for a list of all supported configuration parameters.
configuration = instana_client.Configuration(
    host = "https://unit-tenant.instana.io"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: ApiKeyAuth
configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer'

# Enter a context with an instance of the API client
with instana_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = instana_client.ApplicationAlertConfigurationApi(api_client)
    application_id = 'IYS1XOEcTNiT1eOD8pxgXg' # str | The ID of a specific Application.
    alert_ids = ['IYS1XOEcTNiT1eOD8pxgXg'] # List[str] | A list of Smart Alert Configuration IDs. This allows fetching of a specific set of Configurations. This query can be repeated to use multiple IDs. (optional)

    try:
        # Get all Smart Alert Configs
        api_response = api_instance.find_all_active_application_alert_configs(application_id, alert_ids=alert_ids)
        print("The response of ApplicationAlertConfigurationApi->find_all_active_application_alert_configs:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling ApplicationAlertConfigurationApi->find_all_active_application_alert_configs: %s\n" % e)

Parameters

Name Type Description Notes
application_id str The ID of a specific Application.
alert_ids List[str] A list of Smart Alert Configuration IDs. This allows fetching of a specific set of Configurations. This query can be repeated to use multiple IDs. [optional]

Return type

List[ApplicationAlertConfigWithMetadata]

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 OK -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

find_application_alert_config

ApplicationAlertConfigWithMetadata find_application_alert_config(id, valid_on=valid_on)

Get Smart Alert Config

Gets a specific Smart Alert Configuration. This may return a deleted Configuration. For more information on Application Alert Configuration please access the https://developer.ibm.com/apis/catalog/instana--instana-rest-api/Applications#application-alert-configuration.

Example

  • Api Key Authentication (ApiKeyAuth):
import instana_client
from instana_client.models.application_alert_config_with_metadata import ApplicationAlertConfigWithMetadata
from instana_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://unit-tenant.instana.io
# See configuration.py for a list of all supported configuration parameters.
configuration = instana_client.Configuration(
    host = "https://unit-tenant.instana.io"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: ApiKeyAuth
configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer'

# Enter a context with an instance of the API client
with instana_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = instana_client.ApplicationAlertConfigurationApi(api_client)
    id = 'DKp0JArJRAiQIav9CoKSWQ' # str | ID of a specific Smart Alert Configuration to retrieve.
    valid_on = 1706617456952 # int | A Unix timestamp representing a specific time the Configuration was active. If no timestamp is provided, the latest active version will be retrieved.  (optional)

    try:
        # Get Smart Alert Config
        api_response = api_instance.find_application_alert_config(id, valid_on=valid_on)
        print("The response of ApplicationAlertConfigurationApi->find_application_alert_config:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling ApplicationAlertConfigurationApi->find_application_alert_config: %s\n" % e)

Parameters

Name Type Description Notes
id str ID of a specific Smart Alert Configuration to retrieve.
valid_on int A Unix timestamp representing a specific time the Configuration was active. If no timestamp is provided, the latest active version will be retrieved. [optional]

Return type

ApplicationAlertConfigWithMetadata

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 OK -
403 Insufficient permissions or limited in access. -
404 Resource not found. -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

find_application_alert_config_versions

List[ConfigVersion] find_application_alert_config_versions(id)

Get Smart Alert Config Versions

Gets all versions of an Smart Alert Configuration. This may return deleted Configurations. Configurations are sorted by creation date in descending order. For more information on Application Alert Configuration please access the https://developer.ibm.com/apis/catalog/instana--instana-rest-api/Applications#application-alert-configuration.

Example

  • Api Key Authentication (ApiKeyAuth):
import instana_client
from instana_client.models.config_version import ConfigVersion
from instana_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://unit-tenant.instana.io
# See configuration.py for a list of all supported configuration parameters.
configuration = instana_client.Configuration(
    host = "https://unit-tenant.instana.io"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: ApiKeyAuth
configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer'

# Enter a context with an instance of the API client
with instana_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = instana_client.ApplicationAlertConfigurationApi(api_client)
    id = 'DKp0JArJRAiQIav9CoKSWQ' # str | ID of a specific Smart Alert Configuration to retrieve.

    try:
        # Get Smart Alert Config Versions
        api_response = api_instance.find_application_alert_config_versions(id)
        print("The response of ApplicationAlertConfigurationApi->find_application_alert_config_versions:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling ApplicationAlertConfigurationApi->find_application_alert_config_versions: %s\n" % e)

Parameters

Name Type Description Notes
id str ID of a specific Smart Alert Configuration to retrieve.

Return type

List[ConfigVersion]

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 OK -
403 Insufficient permissions or limited in access. -
404 Resource not found. -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

restore_application_alert_config

restore_application_alert_config(id, created, body=body)

Restore Smart Alert Config

Restores a deleted Smart Alert Configuration. For more information on Application Alert Configuration please access the https://developer.ibm.com/apis/catalog/instana--instana-rest-api/Applications#application-alert-configuration.

Example

  • Api Key Authentication (ApiKeyAuth):
import instana_client
from instana_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://unit-tenant.instana.io
# See configuration.py for a list of all supported configuration parameters.
configuration = instana_client.Configuration(
    host = "https://unit-tenant.instana.io"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: ApiKeyAuth
configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer'

# Enter a context with an instance of the API client
with instana_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = instana_client.ApplicationAlertConfigurationApi(api_client)
    id = 'DKp0JArJRAiQIav9CoKSWQ' # str | ID of a specific Smart Alert Configuration to restore.
    created = 1707726529124 # int | Unix timestamp representing the creation time of a specific Smart Alert Configuration.
    body = 'body_example' # str |  (optional)

    try:
        # Restore Smart Alert Config
        api_instance.restore_application_alert_config(id, created, body=body)
    except Exception as e:
        print("Exception when calling ApplicationAlertConfigurationApi->restore_application_alert_config: %s\n" % e)

Parameters

Name Type Description Notes
id str ID of a specific Smart Alert Configuration to restore.
created int Unix timestamp representing the creation time of a specific Smart Alert Configuration.
body str [optional]

Return type

void (empty response body)

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: Not defined

HTTP response details

Status code Description Response headers
204 Successful - no content to return. -
403 Insufficient permissions or limited in access. -
404 Resource not found. -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

update_application_alert_config

ApplicationAlertConfigWithMetadata update_application_alert_config(id, application_alert_config)

Update Smart Alert Config

Updates an existing Smart Alert Configuration. For more information on Application Alert Configuration please access the https://developer.ibm.com/apis/catalog/instana--instana-rest-api/Applications#application-alert-configuration.

Example

  • Api Key Authentication (ApiKeyAuth):
import instana_client
from instana_client.models.application_alert_config import ApplicationAlertConfig
from instana_client.models.application_alert_config_with_metadata import ApplicationAlertConfigWithMetadata
from instana_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://unit-tenant.instana.io
# See configuration.py for a list of all supported configuration parameters.
configuration = instana_client.Configuration(
    host = "https://unit-tenant.instana.io"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: ApiKeyAuth
configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer'

# Enter a context with an instance of the API client
with instana_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = instana_client.ApplicationAlertConfigurationApi(api_client)
    id = 'DKp0JArJRAiQIav9CoKSWQ' # str | ID of a specific Smart Alert Configuration to update.
    application_alert_config = {"name":"Calls are slower than usual","description":"Calls are slower or equal to the expectation based on latency (90th).","boundaryScope":"INBOUND","applicationId":"ZOi0te_ERE-mRm-9zsbwdg","applications":{"ZOi0te_ERE-mRm-9zsbwdg":{"applicationId":"ZOi0te_ERE-mRm-9zsbwdg","inclusive":true,"services":{}}},"severity":5,"triggering":false,"tagFilterExpression":{"type":"TAG_FILTER","name":"endpoint.name","stringValue":null,"numberValue":null,"booleanValue":null,"key":null,"value":null,"operator":"NOT_EMPTY","entity":"DESTINATION"},"includeInternal":false,"includeSynthetic":false,"rule":{"alertType":"slowness","aggregation":"P90","metricName":"latency"},"threshold":{"type":"historicBaseline","operator":">=","seasonality":"DAILY","baseline":[[0,1,3],[600000,1,3]],"deviationFactor":3,"lastUpdated":0},"alertChannelIds":[],"granularity":600000,"timeThreshold":{"type":"violationsInSequence","timeWindow":600000},"evaluationType":"PER_AP","customPayloadFields":[]} # ApplicationAlertConfig | 

    try:
        # Update Smart Alert Config
        api_response = api_instance.update_application_alert_config(id, application_alert_config)
        print("The response of ApplicationAlertConfigurationApi->update_application_alert_config:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling ApplicationAlertConfigurationApi->update_application_alert_config: %s\n" % e)

Parameters

Name Type Description Notes
id str ID of a specific Smart Alert Configuration to update.
application_alert_config ApplicationAlertConfig

Return type

ApplicationAlertConfigWithMetadata

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 OK -
204 Smart Alert Configuration did not change. -
400 Bad request. -
403 Insufficient permissions or limited in access. -
422 Unprocessable request - missing/invalid data. -
428 Baseline calculation failed due to insufficient data. -
500 Bad request. -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

update_application_historic_baseline

update_application_historic_baseline(id, body=body)

Recalculate Smart Alert Config Baseline

Recalculates and updates the historic baseline (static seasonal threshold) of a Configuration. The LastUpdated field of the Configuration is changed to the current time. For more information on Application Alert Configuration please access the https://developer.ibm.com/apis/catalog/instana--instana-rest-api/Applications#application-alert-configuration.

Example

  • Api Key Authentication (ApiKeyAuth):
import instana_client
from instana_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://unit-tenant.instana.io
# See configuration.py for a list of all supported configuration parameters.
configuration = instana_client.Configuration(
    host = "https://unit-tenant.instana.io"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: ApiKeyAuth
configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer'

# Enter a context with an instance of the API client
with instana_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = instana_client.ApplicationAlertConfigurationApi(api_client)
    id = 'DKp0JArJRAiQIav9CoKSWQ' # str | ID of a specific Smart Alert Configuration to recalculate.
    body = 'body_example' # str |  (optional)

    try:
        # Recalculate Smart Alert Config Baseline
        api_instance.update_application_historic_baseline(id, body=body)
    except Exception as e:
        print("Exception when calling ApplicationAlertConfigurationApi->update_application_historic_baseline: %s\n" % e)

Parameters

Name Type Description Notes
id str ID of a specific Smart Alert Configuration to recalculate.
body str [optional]

Return type

void (empty response body)

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: Not defined

HTTP response details

Status code Description Response headers
200 Smart Alert Configuration baseline successfully recalculated and updated. -
204 Baseline recalculation completed with no changes needed. -
400 Invalid configuration type or configuration is read-only. -
403 Insufficient permissions or limited in access. -
404 Resource not found. -
428 Baseline calculation failed due to insufficient data. -

[Back to top] [Back to API list] [Back to Model list] [Back to README]