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 are removed. If that results in a rule having no conditions, the entire rule is 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 of an auto-tag. It defines the conditions of tag usage and the tag value.

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.

Additionally you can specify a valueFormat in the tag rule. In that case the tag is used in the name:valueFormat format.

For example you can extend the Infrastructure tag to Infrastructure:Windows and Infrastructure:Linux.

rules AutoTagRule[]

The list of rules for tag usage.

When there are multiple rules, the OR logic applies.

The AutoTagRule object

A rule for the auto-tag.

Defines the conditions of tag usage.

Element Type Description
type string

Type of entities to which the rule applies.

enabled boolean

Tag rule is enabled (true) or disabled (false).

valueFormat string

The value of the auto-tag. If specified, the tag is used in the name:valueFormat format.

For example, you can extend the Infrastructure tag to Infrastructure:Windows and Infrastructure:Linux.

You can use the following placeholders here:

  • {AwsAutoScalingGroup:Name}
  • {AwsAvailabilityZone:Name}
  • {AwsElasticLoadBalancer:Name}
  • {AwsRelationalDatabaseService:DBName}
  • {AwsRelationalDatabaseService:Endpoint}
  • {AwsRelationalDatabaseService:Engine}
  • {AwsRelationalDatabaseService:InstanceClass}
  • {AwsRelationalDatabaseService:Name}
  • {AwsRelationalDatabaseService:Port}
  • {AzureRegion:Name}
  • {AzureScaleSet:Name}
  • {AzureVm:Name}
  • {CloudFoundryOrganization:Name}
  • {CustomDevice:DetectedName}
  • {CustomDevice:DnsName}
  • {CustomDevice:IpAddress}
  • {CustomDevice:Port}
  • {DockerContainerGroupInstance:ContainerName}
  • {DockerContainerGroupInstance:FullImageName}
  • {DockerContainerGroupInstance:ImageVersion}
  • {DockerContainerGroupInstance:StrippedImageName}
  • {ESXIHost:HardwareModel}
  • {ESXIHost:HardwareVendor}
  • {ESXIHost:Name}
  • {ESXIHost:ProductName}
  • {ESXIHost:ProductVersion}
  • {Ec2Instance:AmiId}
  • {Ec2Instance:BeanstalkEnvironmentName}
  • {Ec2Instance:InstanceId}
  • {Ec2Instance:InstanceType}
  • {Ec2Instance:LocalHostName}
  • {Ec2Instance:Name}
  • {Ec2Instance:PublicHostName}
  • {Ec2Instance:SecurityGroup}
  • {GoogleComputeInstance:Id}
  • {GoogleComputeInstance:IpAddresses}
  • {GoogleComputeInstance:MachineType}
  • {GoogleComputeInstance:Name}
  • {GoogleComputeInstance:ProjectId}
  • {GoogleComputeInstance:Project}
  • {Host:AWSNameTag}
  • {Host:AixLogicalCpuCount}
  • {Host:AzureHostName}
  • {Host:AzureSiteName}
  • {Host:BoshDeploymentId}
  • {Host:BoshInstanceId}
  • {Host:BoshInstanceName}
  • {Host:BoshName}
  • {Host:BoshStemcellVersion}
  • {Host:CpuCores}
  • {Host:DetectedName}
  • {Host:Environment:AppName}
  • {Host:Environment:BoshReleaseVersion}
  • {Host:Environment:Environment}
  • {Host:Environment:Link}
  • {Host:Environment:Organization}
  • {Host:Environment:Owner}
  • {Host:Environment:Support}
  • {Host:IpAddress}
  • {Host:LogicalCpuCores}
  • {Host:OneAgentCustomHostName}
  • {Host:OperatingSystemVersion}
  • {Host:PaasMemoryLimit}
  • {HostGroup:Name}
  • {KubernetesCluster:Name}
  • {KubernetesNode:DetectedName}
  • {OpenstackAvailabilityZone:Name}
  • {OpenstackZone:Name}
  • {OpenstackComputeNode:Name}
  • {OpenstackProject:Name}
  • {OpenstackVm:UnstanceType}
  • {OpenstackVm:Name}
  • {OpenstackVm:SecurityGroup}
  • {ProcessGroup:AmazonECRImageAccountId}
  • {ProcessGroup:AmazonECRImageRegion}
  • {ProcessGroup:AmazonECSCluster}
  • {ProcessGroup:AmazonECSContainerName}
  • {ProcessGroup:AmazonECSFamily}
  • {ProcessGroup:AmazonECSRevision}
  • {ProcessGroup:AmazonLambdaFunctionName}
  • {ProcessGroup:AmazonRegion}
  • {ProcessGroup:ApacheConfigPath}
  • {ProcessGroup:ApacheSparkMasterIpAddress}
  • {ProcessGroup:AspDotNetCoreApplicationPath}
  • {ProcessGroup:AspDotNetCoreApplicationPath}
  • {ProcessGroup:AzureHostName}
  • {ProcessGroup:AzureSiteName}
  • {ProcessGroup:CassandraClusterName}
  • {ProcessGroup:CatalinaBase}
  • {ProcessGroup:CatalinaHome}
  • {ProcessGroup:CloudFoundryAppId}
  • {ProcessGroup:CloudFoundryAppName}
  • {ProcessGroup:CloudFoundryInstanceIndex}
  • {ProcessGroup:CloudFoundrySpaceId}
  • {ProcessGroup:CloudFoundrySpaceName}
  • {ProcessGroup:ColdFusionJvmConfigFile}
  • {ProcessGroup:ColdFusionServiceName}
  • {ProcessGroup:CommandLineArgs}
  • {ProcessGroup:DetectedName}
  • {ProcessGroup:DotNetCommandPath}
  • {ProcessGroup:DotNetCommand}
  • {ProcessGroup:DotNetClusterId}
  • {ProcessGroup:DotNetNodeId}
  • {ProcessGroup:ElasticsearchClusterName}
  • {ProcessGroup:ElasticsearchNodeName}
  • {ProcessGroup:EquinoxConfigPath}
  • {ProcessGroup:ExeName}
  • {ProcessGroup:ExePath}
  • {ProcessGroup:GlassFishDomainName}
  • {ProcessGroup:GlassFishInstanceName}
  • {ProcessGroup:GoogleAppEngineInstance}
  • {ProcessGroup:GoogleAppEngineService}
  • {ProcessGroup:GoogleCloudProject}
  • {ProcessGroup:HybrisBinDirectory}
  • {ProcessGroup:HybrisConfigDirectory}
  • {ProcessGroup:HybrisConfigDirectory}
  • {ProcessGroup:HybrisDataDirectory}
  • {ProcessGroup:IBMCicsRegion}
  • {ProcessGroup:IBMCtgName}
  • {ProcessGroup:IBMImsConnectRegion}
  • {ProcessGroup:IBMImsControlRegion}
  • {ProcessGroup:IBMImsMessageProcessingRegion}
  • {ProcessGroup:IBMImsSoapGwName}
  • {ProcessGroup:IBMIntegrationNodeName}
  • {ProcessGroup:IBMIntegrationServerName}
  • {ProcessGroup:IISAppPool}
  • {ProcessGroup:IISRoleName}
  • {ProcessGroup:JbossHome}
  • {ProcessGroup:JbossMode}
  • {ProcessGroup:JbossServerName}
  • {ProcessGroup:JavaJarFile}
  • {ProcessGroup:JavaJarPath}
  • {ProcessGroup:JavaMainCLass}
  • {ProcessGroup:KubernetesBasePodName}
  • {ProcessGroup:KubernetesContainerName}
  • {ProcessGroup:KubernetesFullPodName}
  • {ProcessGroup:KubernetesNamespace}
  • {ProcessGroup:KubernetesPodUid}
  • {ProcessGroup:MssqlInstanceName}
  • {ProcessGroup:NodeJsAppBaseDirectory}
  • {ProcessGroup:NodeJsAppName}
  • {ProcessGroup:NodeJsScriptName}
  • {ProcessGroup:OracleSid}
  • {ProcessGroup:PHPScriptPath}
  • {ProcessGroup:PHPWorkingDirectory}
  • {ProcessGroup:Ports}
  • {ProcessGroup:RubyAppRootPath}
  • {ProcessGroup:RubyScriptPath}
  • {ProcessGroup:SoftwareAGInstallRoot}
  • {ProcessGroup:SoftwareAGProductPropertyName}
  • {ProcessGroup:SpringBootAppName}
  • {ProcessGroup:SpringBootProfileName}
  • {ProcessGroup:SpringBootStartupClass}
  • {ProcessGroup:TIBCOBusinessWorksAppNodeName}
  • {ProcessGroup:TIBCOBusinessWorksAppSpaceName}
  • {ProcessGroup:TIBCOBusinessWorksCeAppName}
  • {ProcessGroup:TIBCOBusinessWorksCeVersion}
  • {ProcessGroup:TIBCOBusinessWorksDomainName}
  • {ProcessGroup:TIBCOBusinessWorksEnginePropertyFilePath}
  • {ProcessGroup:TIBCOBusinessWorksEnginePropertyFile}
  • {ProcessGroup:TIBCOBusinessWorksHome}
  • {ProcessGroup:VarnishInstanceName}
  • {ProcessGroup:WebLogicClusterName}
  • {ProcessGroup:WebLogicDomainName}
  • {ProcessGroup:WebLogicHome}
  • {ProcessGroup:WebLogicName}
  • {ProcessGroup:WebSphereCellName}
  • {ProcessGroup:WebSphereClusterName}
  • {ProcessGroup:WebSphereNodeName}
  • {ProcessGroup:WebSphereServerName}
  • {ProcessGroup:ActorSystem}
  • {Service:STGServerName}
  • {Service:DatabaseHostName}
  • {Service:DatabaseName}
  • {Service:DatabaseVendor}
  • {Service:DetectedName}
  • {Service:EndpointPath}
  • {Service:EndpointPathGatewayUrl}
  • {Service:IIBApplicationName}
  • {Service:MessageListenerClassName}
  • {Service:Port}
  • {Service:PublicDomainName}
  • {Service:RemoteEndpoint}
  • {Service:RemoteName}
  • {Service:WebApplicationId}
  • {Service:WebContextRoot}
  • {Service:WebServerName}
  • {Service:WebServiceNamespace}
  • {Service:WebServiceName}
  • {VmwareDatacenter:Name}
  • {VmwareVm:Name}
propagationTypes string[]

How to apply the 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[]

A list of matching rules for the auto-tag.

The tag applies only when all conditions are fulfilled.

The EntityRuleEngineCondition object

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

Element Type Description
key ConditionKey

The key to identify the 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 field set and the list of possible values of the operator field depend on the type of the comparison.

Find the list of actual models in the description of the type field and check the description of the model you need.

Element Type Description
operator Enum

Operator of the comparision.

You can reverse it by setting negate to true.

value object

The value to compare to.

negate boolean

Reverses the comparison operator. For example it turns the begins 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 -> CloudTypeComparison AZURE_SKU -> AzureSkuComparision AZURE_COMPUTE_MODE -> AzureComputeModeComparison ENTITY_ID -> EntityIdComparison SIMPLE_TECH -> SimpleTechComparison SIMPLE_HOST_TECH -> SimpleHostTechComparison SERVICE_TOPOLOGY -> ServiceTopologyComparison DATABASE_TOPOLOGY -> DatabaseTopologyComparison OS_TYPE -> OsTypeComparison HYPERVISOR_TYPE -> HypervisorTypeComparision IP_ADDRESS -> IpAddressComparison OS_ARCHITECTURE -> OsArchitectureComparison BITNESS -> BitnessComparision APPLICATION_TYPE -> ApplicationTypeComparison MOBILE_PLATFORM -> MobilePlatformComparison CUSTOM_APPLICATION_TYPE -> CustomApplicationTypeComparison DCRUM_DECODER_TYPE -> DcrumDecoderComparison SYNTHETIC_ENGINE_TYPE -> SyntheticEngineTypeComparison TAG -> TagComparison

The Enum object

Element Type Description

The ConditionKey object

The key to identify the data we're matching.

Depending on the type of the key, the actual JSON may contain additional fields. Find the list in the description of the type field.

Element Type Description
attribute string

The attribute to be used for comparision.

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