Custom services API - PUT a custom service rule
PUT a custom service rule
Updates the specified custom service rule.
The request consumes and produces an application/json
payload.
PUT |
|
Parameters
Parameter | Type | Description | In | Required |
---|---|---|---|---|
technology | string |
Technology of the custom service to update. The technology element can hold these values. |
path | required |
id | string |
The ID of the custom service to update. The ID of the custom service in the body of the request must match this ID. |
path | required |
body | CustomService |
JSON body of the request containing updated definition of the custom service. If order is present, it will be used. |
body | optional |
The CustomService object
Element | Type | Description | Required |
---|---|---|---|
metadata | ConfigurationMetadata |
Metadata useful for debugging. |
optional |
id | string |
The ID of the custom service. |
optional |
name | string |
The name of the custom service, displayed in the UI. |
required |
order | string |
The order string. Sorting custom services alphabetically by their order string determines their relative ordering. Typically this is managed by DESK internally and will not be present in GET responses. |
optional |
enabled | boolean |
Custom service enabled/disabled. |
required |
rules | DetectionRule[] |
The list of rules defining the custom service. |
required |
queueEntryPoint | boolean |
The queue entry point flag. Set to |
required |
queueEntryPointType | string |
The queue entry point type.. The queueEntryPointType element can hold these values. |
optional |
processGroups | string[] |
The list of process groups the custom service should belong to. |
optional |
The DetectionRule object
Element | Type | Description | Required |
---|---|---|---|
id | string |
The ID of the detection rule. |
optional |
enabled | boolean |
Rule enabled/disabled. |
required |
fileName | string |
The PHP file containing the class or methods to instrument. Required for PHP custom service. Not applicable to Java and .NET. |
optional |
fileNameMatcher | string |
Matcher applying to the file name. Default value is |
optional |
className | string |
The fully qualified class or interface to instrument. Required for Java and .NET custom services. Not applicable to PHP. |
optional |
matcher | string |
Matcher applying to the class name. |
optional |
methodRules | MethodRule[] |
List of methods to instrument. |
required |
annotations | string[] |
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. |
optional |
The MethodRule object
Element | Type | Description | Required |
---|---|---|---|
id | string |
The ID of the method rule. |
optional |
methodName | string |
The method to instrument. |
required |
argumentTypes | string[] |
Fully qualified types of argument the method expects. |
optional |
returnType | string |
Fully qualified type the method returns. |
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 |
This is a model of the request body, showing the possible elements. It has to be adjusted for usage in an actual request. See the Example expandable section for working sample request.
{
"name": "CustomService",
"enabled": true,
"rules": [
{
"enabled": true,
"className": "com.your.company.ClassName",
"methodRules": [
{
"methodName": "AMethod",
"argumentTypes": [
"java.lang.String"
],
"returnType": "void"
}
]
}
],
"queueEntryPoint": false
}
Possible values
Possible values for the queueEntryPointType element in the CustomService object:
- IBM_MQ
- JMS
- KAFKA
- MSMQ
- RABBIT_MQ
Possible values for the matcher element in the DetectionRule object:
- ENDS_WITH
- EQUALS
- STARTS_WITH
Possible values for the fileNameMatcher element in the DetectionRule object:
- ENDS_WITH
- EQUALS
- STARTS_WITH
Possible values for the technology element:
- dotNet
- go
- java
- php
Response codes
Code | Description |
---|---|
201 | Success. Custom service has been created. Response contains the new service's ID and name. |
204 | Success. Custom service has been updated. Response doesn't have a body. |
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
{snippet name='DESK-api/validate-payload.md'}}
The request consumes an application/json
payload.
POST |
|
Response codes
Code | Description |
---|---|
204 | Validated. The submitted configuration is valid. Response does not have a body. |
400 | Failed. The input is invalid. |