Automatically applied tags API - GET an auto-tag

Gets parameters of the specified automatically applied tag.

The request produces an application/json payload.

GET
  • Managed https://{your-domain}/e/{your-environment-id}/api/config/v1/autoTags/{id}
  • SaaS https://{your-environment-id}.live.dynatrace.com/api/config/v1/autoTags/{id}

Parameters

Parameter Type Description In Required
id string

The ID of the required auto tag.

path required
includeProcessGroupReferences boolean

Flag to include process group references to the response.

Process group references aren't compatible across environments. When this flag is set to false, conditions with process group references will be removed. If that leads to a rule having no conditions, the entire rule will be removed.

query optional

Response format

Refer to JSON models to find all JSON models that depend on the type of the model.

The AutoTag object

Configuration for an auto tag. It defines the tag value and conditions of its usage.

Element Type Description
metadata ConfigurationMetadata

Metadata useful for debugging.

id string

The ID of the auto tag.

name string

The name of the auto tag, which is applied to entities.

If a valueFormat is specified, the tag is presented in the key:value format, where key is the tag's name. In that case the format of the tag is name:valueFormat.

rules AutoTagRule[]

The list of rules for tag usage.

Each rule is evaluated independently of all other rules.

The AutoTagRule object

An auto tag rule defines the conditions of the tag usage. Each rule is evaluated independently of all other rules.

Element Type Description
type string

Type of entities to which the auto tag applies.

enabled boolean

Tag rule enabled/disabled.

valueFormat string

Format of the tag value. If specified, the tag is presented in the key:value format, where key is the tag's name. In that case the format of the tag is name:valueFormat.

propagationTypes string[]

How to apply tag to underlying entities:

SERVICE_TO_PROCESS_GROUP_LIKE: Apply to underlying process groups of matching services. SERVICE_TO_HOST_LIKE: Apply to underlying hosts of matching services.

PROCESS_GROUP_TO_HOST: Apply to underlying hosts of matching process groups. PROCESS_GROUP_TO_SERVICE: Apply to all services provided by the process groups.

HOST_TO_PROCESS_GROUP_INSTANCE: Apply to processes running on matching hosts.

conditions EntityRuleEngineCondition[]

Matching rules of the auto tag. The tag applies only if all conditions are fulfilled.

The EntityRuleEngineCondition object

A condition defines how to execute matching logic for an entity.

Element Type Description
key ConditionKey

Type-specific key to identify which data we're matching.

comparisonInfo ComparisonBasic

Defines how the matching is actually performed: what and how are we comparing.

The ComparisonBasic object

Defines how the matching is actually performed: what and how are we comparing. The actual set of fields depends on the type of the comparison.

Element Type Description
operator Enum

Operator of the comparision. You can reverse it by setting negate to true.

value object

Holds the value to compare to.

negate boolean

Reverse the comparison operator. For example it turns the begin with into does not begin with.

type string

Defines the actual set of fields depending on the value:

STRING -> StringComparison INTEGER -> IntegerComparison SERVICE_TYPE -> ServiceTypeComparison PAAS_TYPE -> PaasTypeComparison CLOUD_TYPE -> CloudTypeComparision AZURE_SKU -> AzureSkuComparision AZURE_COMPUTE_MODE -> AzureComputeModeComparision ENTITY_ID -> EntityIdComparision SIMPLE_TECH -> SimpleTechComparison SIMPLE_HOST_TECH -> SimpleHostTechComparison SERVICE_TOPOLOGY -> ServiceTopologyComparison DATABASE_TOPOLOGY -> DatabaseTopologyComparision OS_TYPE -> OsTypeComparison HYPERVISOR_TYPE -> HypervisorTypeComparision IP_ADDRESS -> IpAddressComparison OS_ARCHITECTURE -> OsArchitectureComparison BITNESS -> BitnessComparision APPLICATION_TYPE -> ApplicationTypeComparison MOBILE_PLATFORM -> MobilePlatformComparison CUSTOM_APPLICATION_TYPE -> CustomApplicationTypeComparision DCRUM_DECODER_TYPE -> DcrumDecoderComparision SYNTHETIC_ENGINE_TYPE -> SyntheticEngineTypeComparison TAG -> TagComparison

The Enum object

Element Type Description

The ConditionKey object

Type-specific key to identify the data for which we want to match against.

This is the base version of the key, depending on the type, the actual JSON may contain additional fields.

Element Type Description
attribute string

The attribute to use for comparison.

type string

Defines the actual set of fields depending on the value:

PROCESS_CUSTOM_METADATA_KEY -> CustomProcessMetadataConditionKey HOST_CUSTOM_METADATA_KEY -> CustomHostMetadataConditionKey PROCESS_PREDEFINED_METADATA_KEY -> ProcessMetadataConditionKey STRING -> StringConditionKey

The ConfigurationMetadata object

Metadata useful for debugging

Element Type Description
configurationVersions integer[]

A Sorted list of the version numbers of the configuration.

clusterVersion string

Dynatrace server version.

Example

In this example, the request inquires about the properties of the Infrastructure - Linux" auto-tag, which has the ID 7c82c170-b380-4fa7-992a-453f3e73047b.

The configuration has the following settings:

GET example

The API token is passed in the Authorization header.

Curl

curl -X GET \
  https://mySampleEnv.live.dynatrace.com/api/config/v1/autoTags/7c82c170-b380-4fa7-992a-453f3e73047b \
  -H 'Authorization: Api-token abcdefjhij1234567890'

Request URL

https://mySampleEnv.live.dynatrace.com/api/config/v1/autoTags/7c82c170-b380-4fa7-992a-453f3e73047b

Response body

{
  "metadata": {
    "configurationVersions": [
      7
    ],
    "clusterVersion": "1.176.0.20190808-181828"
  },
  "id": "7c82c170-b380-4fa7-992a-453f3e73047b",
  "name": "Infrastructure - Linux",
  "rules": [
    {
      "type": "HOST",
      "enabled": true,
      "valueFormat": "prodLinux",
      "propagationTypes": [],
      "conditions": [
        {
          "key": {
            "attribute": "HOST_OS_TYPE"
          },
          "comparisonInfo": {
            "type": "OS_TYPE",
            "operator": "EQUALS",
            "value": "LINUX",
            "negate": false
          }
        },
        {
          "key": {
            "attribute": "HOST_NAME"
          },
          "comparisonInfo": {
            "type": "STRING",
            "operator": "BEGINS_WITH",
            "value": "PreProd",
            "negate": true,
            "caseSensitive": true
          }
        }
      ]
    }
  ]
}

Response code

200