• Home
  • Dynatrace API
  • Configuration
  • Services
  • Custom services
  • GET a rule

Custom services API - GET a custom service rule

Gets parameters of the specified custom service rule.

The request produces an application/json payload.

GETManagedDynatrace for Governmenthttps://{your-domain}/e/{your-environment-id}/api/config/v1/service/customServices/{technology}/{id}
SaaShttps://{your-environment-id}.live.dynatrace.com/api/config/v1/service/customServices/{technology}/{id}
Environment ActiveGatehttps://{your-activegate-domain}/e/{your-environment-id}/api/config/v1/service/customServices/{technology}/{id}

Authentication

To execute this request, you need an access token with ReadConfig scope.

To learn how to obtain and use it, see Tokens and authentication.

Parameters

ParameterTypeDescriptionInRequired
technologystring

Technology of the custom service you're inquiring.

The element can hold these values
  • dotNet
  • go
  • java
  • nodeJS
  • php
pathrequired
idstring

The ID of the custom service you're inquiring.

pathrequired
includeProcessGroupReferencesboolean

Flag to include process group references to the response.

Process group references aren't compatible across environments.

false is used if the value is not set.

queryoptional

Response

Response codes

CodeTypeDescription
200CustomService

Success

Response body objects

The CustomService object

ElementTypeDescription
metadataConfigurationMetadata

Metadata useful for debugging

idstring

The ID of the custom service.

namestring

The name of the custom service, displayed in the UI.

orderstring

The order string. Sorting custom services alphabetically by their order string determines their relative ordering.

Typically this is managed by Dynatrace internally and will not be present in GET responses.

enabledboolean

Custom service enabled/disabled.

rulesDetectionRule[]

The list of rules defining the custom service.

queueEntryPointboolean

The queue entry point flag.

Set to true for custom messaging services.

queueEntryPointTypestring

The queue entry point type..

The element can hold these values
  • IBM_MQ
  • JMS
  • KAFKA
  • MSMQ
  • RABBIT_MQ
processGroupsstring[]

The list of process groups the custom service should belong to.

The ConfigurationMetadata object

Metadata useful for debugging

ElementTypeDescription
configurationVersionsinteger[]

A sorted list of the version numbers of the configuration.

currentConfigurationVersionsstring[]

A sorted list of version numbers of the configuration.

clusterVersionstring

Dynatrace version.

The DetectionRule object

ElementTypeDescription
idstring

The ID of the detection rule.

enabledboolean

Rule enabled/disabled.

fileNamestring

The PHP file containing the class or methods to instrument.

Required for PHP custom service.

Not applicable to Java and .NET.

fileNameMatcherstring

Matcher applying to the file name. Default value is ENDS_WITH (if applicable).

The element can hold these values
  • ENDS_WITH
  • EQUALS
  • STARTS_WITH
classNamestring

The fully qualified class or interface to instrument.

Required for Java and .NET custom services.

Not applicable to PHP.

matcherstring

Matcher applying to the class name. STARTS_WITH can only be used if there is at least one annotation defined. Default value is EQUALS.

The element can hold these values
  • ENDS_WITH
  • EQUALS
  • STARTS_WITH
methodRulesMethodRule[]

List of methods to instrument.

annotationsstring[]

Additional annotations filter of the rule.

Only classes where all listed annotations are available in the class itself or any of its superclasses are instrumented.

Not applicable to PHP.

The MethodRule object

ElementTypeDescription
idstring

The ID of the method rule.

methodNamestring

The method to instrument.

argumentTypesstring[]

Fully qualified types of argument the method expects.

returnTypestring

Fully qualified type the method returns.

visibilitystring

The visibility of the method rule.

The element can hold these values
  • INTERNAL
  • PACKAGE_PROTECTED
  • PRIVATE
  • PROTECTED
  • PUBLIC
modifiersstring[]

The modifiers of the method rule.

The element can hold these values
  • ABSTRACT
  • EXTERN
  • FINAL
  • NATIVE
  • STATIC

Response body JSON model

json
{ "name": "CustomService", "enabled": true, "rules": [ { "enabled": true, "className": "com.your.company.ClassName", "methodRules": [ { "methodName": "AMethod", "argumentTypes": [ "java.lang.String" ], "returnType": "void" } ] } ], "queueEntryPoint": false }
Related topics
  • Define custom services

    Define entry points (a method, class, or interface) for custom services that don't use standard protocols.