Service detection rules API - POST a rule

The request consumes and produces an application/json payload.

This request is an early adopter release and may be changed in non compatible way.

POST
  • Managed https://{your-domain}/e/{your-environment-id}/api/config/v1/service/detectionRules/FULL_WEB_SERVICE
  • SaaS https://{your-environment-id}.live.dexp.ae/api/config/v1/service/detectionRules/FULL_WEB_SERVICE

Parameters

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

Parameter Type Description In Required
position string

The position of the new rule:

  • APPEND: at the end of the rule list.
  • PREPEND: on top of the rule list.
The position element can hold these values.
query optional
body FullWebServiceRule

The JSON body of the request containing parameters of the new service detection rule.

You must not specify the ID of the rule!

The order field is ignored in this request. To enforce a particular order use the PUT /ruleBasedServiceDetection/FULL_WEB_SERVICE/reorder request.

body optional

The FullWebServiceRule object

The service detection rule of the FULL_WEB_SERVICE type.

Possible values for FRAMEWORK attribute type:

  • JAX_WS_RI
  • AXIS
  • CXF
  • JBOSS
  • WEBSPHERE
  • SPRING
  • PROGRESS
  • HESSIAN
  • WEBMETHODS
  • JERSEY
  • RESTLET
  • RESTEASY
  • WINK
  • TIBCO
  • WEBLOGIC
Element Type Description Required
type string optional
metadata ConfigurationMetadata

Metadata useful for debugging.

optional
id string

The ID of the service detection rule.

optional
order string

The order of the rule in the rules list.

The rules are evaluated from top to bottom. The first matching rule applies.

optional
name string

The name of the rule.

required
description string

A short description of the rule.

optional
enabled boolean

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

required
conditions ConditionsFullWebServiceAttributeTypeDto[]

A list of conditions of the rule.

If several conditions are specified, the AND logic applies.

optional
detectAsWebRequestService boolean

Detect the matching requests as a web request service. If true the matching request will be detected as a web request service only. If the resulting web request service is to be changed, a new rule for that web request service needs to be specified. Defaults to false.

optional
webServiceName WebServiceName

How to handle the detected name of the web service.

optional
webServiceNameSpace WebServiceNameSpace

How to handle the detected name space of the web service.

optional
applicationId ApplicationId

How to handle the detected ID of the application.

optional
contextRoot ContextRoot

How to handle the detected context root of the service URL.

optional
serverName ServerName

How to handle the detected server name of the service URL.

optional

The ServerName object

The contribution to the service ID calculation from the detected server name.

You have two mutually exclusive options:

  • Override the detected value with a specified static value. Specify the new value in the valueOverride field.
  • Dynamically transform the detected value. Specify the transformation parameters in the transformations field.
Element Type Description Required
valueOverride string

The value to be used instead of the detected value.

optional
transformations TransformationBase[]

Transformations to be applied to the detected value.

optional

The ContextRoot object

The contribution to the service ID calculation from the detected context root.

The context root is the first segment of the request URL after server name. For example, in the www.dexp.ae/support/help/extend-DESK/DESK-api/ URL the context root is support.

You have two options:

  • Keep a part of the detected URL. Specify the number of segments to be kept in the segmentsToCopyFromUrlPath field.
  • Dynamically transform the detected URL. Specify the transformation parameters in the transformations field.

You can use one or both options. If you use both, the transformation applies to the modified URL.

Element Type Description Required
segmentsToCopyFromUrlPath integer

The number of segments of the URL to be kept.

The URL is divided by slashes (/), the indexing starts with 1 at context root.

For example, if you specify 2 for the www.dexp.ae/support/help/DESK-api/ URL, the value of support/help is used.

optional
transformations ContextRootTransformation[]

Transformations to be applied to the detected value.

optional

The ContextRootTransformation object

Configuration of transformation of the detected value.

If several transformations are specified, they are handled sequentially from top to bottom. Each transformation is applied to the result of the preceding transformation. For example, the second transformation is applied to the result of the first transformation.

The actual set of fields depends on the type of the transformation.

Element Type Description Required
type string

Defines the actual set of fields depending on the value:

BEFORE -> BeforeTransformation REPLACE_BETWEEN -> ReplaceBetweenTransformation REMOVE_NUMBERS -> RemoveNumbersTransformation REMOVE_CREDIT_CARDS -> RemoveCreditCardNumbersTransformation REMOVE_IBANS -> RemoveIBANsTransformation REMOVE_IPS -> RemoveIPsTransformation

The type element can hold these values.
required

The ApplicationId object

The contribution to the service ID calculation from the detected application ID.

You have two mutually exclusive options:

  • Override the detected value with a specified static value. Specify the new value in the valueOverride field.
  • Dynamically transform the detected value. Specify the transformation parameters in the transformations field.
Element Type Description Required
valueOverride string

The value to be used instead of the detected value.

optional
transformations TransformationBase[]

Transformations to be applied to the detected value.

optional

The WebServiceNameSpace object

The contribution to the service ID calculation from the detected web service name space.

You have two mutually exclusive options:

  • Override the detected value with a specified static value. Specify the new value in the valueOverride field.
  • Dynamically transform the detected value. Specify the transformation parameters in the transformations field.
Element Type Description Required
valueOverride string

The value to be used instead of the detected value.

optional
transformations TransformationBase[]

Transformations to be applied to the detected value.

optional

The WebServiceName object

The contribution to the service ID calculation from the detected web service name.

You have two mutually exclusive options:

  • Override the detected value with a specified static value. Specify the new value in the valueOverride field.
  • Dynamically transform the detected value. Specify the transformation parameters in the transformations field.
Element Type Description Required
valueOverride string

The value to be used instead of the detected value.

optional
transformations TransformationBase[]

Transformations to be applied to the detected value.

optional

The TransformationBase object

Configuration of transformation of the detected value.

If several transformations are specified, they are handled sequentially from top to bottom. Each transformation is applied to the result of the preceding transformation. For example, the second transformation is applied to the result of the first transformation.

The actual set of fields depends on the type of the transformation.

Element Type Description Required
type string

Defines the actual set of fields depending on the value:

BEFORE -> BeforeTransformation AFTER -> AfterTransformation BETWEEN -> BetweenTransformation REPLACE_BETWEEN -> ReplaceBetweenTransformation REMOVE_NUMBERS -> RemoveNumbersTransformation REMOVE_CREDIT_CARDS -> RemoveCreditCardNumbersTransformation REMOVE_IBANS -> RemoveIBANsTransformation REMOVE_IPS -> RemoveIPsTransformation SPLIT_SELECT -> SplitSelectTransformation TAKE_SEGMENTS -> TakeSegmentsTransformation

The type element can hold these values.
required

The ConditionsFullWebServiceAttributeTypeDto object

A condition of the service detection rule.

Element Type Description Required
attributeType string

The type of the attribute to be checked.

The attributeType element can hold these values.
required
compareOperations CompareOperation[]

A list of conditions for the rule.

If several conditions are specified, the AND logic applies.

optional

The CompareOperation object

The condition of the rule.

The actual set of fields depends on the type of the condition.

Element Type Description Required
type string

Defines the actual set of fields depending on the value:

EQUALS -> EqualsCompareOperation STRING_CONTAINS -> StringContainsCompareOperation STARTS_WITH -> StartsWithCompareOperation ENDS_WITH -> EndsWithCompareOperation EXISTS -> ExistsCompareOperation IP_IN_RANGE -> IpInRangeCompareOperation LESS_THAN -> LessThanCompareOperation GREATER_THAN -> GreaterThanCompareOperation INT_EQUALS -> IntEqualsCompareOperation STRING_EQUALS -> StringEqualsCompareOperation

The type element can hold these values.
required

The ConfigurationMetadata object

Metadata useful for debugging

Element Type Description Required
configurationVersions integer[]

A Sorted list of the version numbers of the configuration.

optional
clusterVersion string

DESK server version.

optional

Possible values

Possible values for the type element in the ContextRootTransformation object:

  • BEFORE
  • REPLACE_BETWEEN
  • REMOVE_NUMBERS
  • REMOVE_CREDIT_CARDS
  • REMOVE_IBANS
  • REMOVE_IPS

Possible values for the type element in the TransformationBase object:

  • BEFORE
  • AFTER
  • BETWEEN
  • REPLACE_BETWEEN
  • REMOVE_NUMBERS
  • REMOVE_CREDIT_CARDS
  • REMOVE_IBANS
  • REMOVE_IPS
  • SPLIT_SELECT
  • TAKE_SEGMENTS

Possible values for the type element in the CompareOperation object:

  • EQUALS
  • STRING_CONTAINS
  • STARTS_WITH
  • ENDS_WITH
  • EXISTS
  • IP_IN_RANGE
  • LESS_THAN
  • GREATER_THAN
  • INT_EQUALS
  • STRING_EQUALS

Possible values for the attributeType element in the ConditionsFullWebServiceAttributeTypeDto object:

  • APPLICATION_ID
  • CONTEXT_ROOT
  • FRAMEWORK
  • IS_SOAP_SERVICE
  • SERVER_NAME
  • URL_HOST_NAME
  • URL_PATH
  • WEBSERVICE_METHOD
  • WEBSERVICE_NAME
  • WEBSERVICE_NAMESPACE

Possible values for the position element:

  • APPEND
  • PREPEND

Response codes

Code Description
201 Success. The new service detection rule has been created. The response contains short representation of the rule, including the ID.
400 Failed. The input is invalid.

Response format

The EntityShortRepresentation object

The short representation of a DESK entity.

Element Type Description
id string

The ID of the DESK entity.

name string

The name of the DESK entity.

description string

A short description of the DESK entity.

Validate payload

We recommend that you validate the payload before submitting it with an actual request. A response code of 204 indicates a valid payload.

The request consumes an application/json payload.

This request is an early adopter release and may be changed in non compatible way.

POST
  • Managed https://{your-domain}/e/{your-environment-id}/api/config/v1/service/detectionRules/FULL_WEB_SERVICE/validator
  • SaaS https://{your-environment-id}.live.dexp.ae/api/config/v1/service/detectionRules/FULL_WEB_SERVICE/validator

Response codes

Code Description
204 Validated. The service detection rule is valid. Response doesn't have a body.
400 Failed. The input is invalid.