Get Decision Definitions
Queries for decision definitions that fulfill given parameters. Parameters may be the properties of decision definitions, such as the name, key or version. The size of the result set can be retrieved by using the Get Decision Definition Count method.
Method
GET /decision-definition
Parameters
Query Parameters
Name | Description |
---|---|
decisionDefinitionId | Filter by decision definition id. |
decisionDefinitionIdIn | Filter by decision definition ids. |
name | Filter by decision definition name. |
nameLike | Filter by decision definition names that the parameter is a substring of. |
deploymentId | Filter by the deployment the id belongs to. |
key | Filter by decision definition key, i.e., the id in the DMN 1.0 XML. Exact match. |
keyLike | Filter by decision definition keys that the parameter is a substring of. |
category | Filter by decision definition category. Exact match. |
categoryLike | Filter by decision definition categories that the parameter is a substring of. |
version | Filter by decision definition version. |
latestVersion | Only include those decision definitions that are latest versions. Value may only be true , as false is the default behavior. |
resourceName | Filter by the name of the decision definition resource. Exact match. |
resourceNameLike | Filter by names of those decision definition resources that the parameter is a substring of. |
decisionRequirementsDefinitionId | Filter by the id of the decision requirements definition this decision definition belongs to. |
decisionRequirementsDefinitionKey | Filter by the key of the decision requirements definition this decision definition belongs to. |
withoutDecisionRequirementsDefinition | Only include decision definitions which does not belongs to any decision requirements definition. Value may only be true , as false is the default behavior. |
tenantIdIn | Filter by a comma-separated list of tenant ids. A decision definition must have one of the given tenant ids. |
withoutTenantId | Only include decision definitions which belong to no tenant. Value may only be true , as false is the default behavior. |
includeDecisionDefinitionsWithoutTenantId | Include decision definitions which belong to no tenant. Can be used in combination with tenantIdIn . Value may only be true , as false is the default behavior. |
sortBy | Sort the results lexicographically by a given criterion. Valid values are
category , key , id , name , version , deploymentId and tenantId .
Must be used in conjunction with the sortOrder parameter. |
sortOrder | Sort the results in a given order. Values may be asc for ascending order or desc for descending order.
Must be used in conjunction with the sortBy parameter. |
firstResult | Pagination of results. Specifies the index of the first result to return. |
maxResults | Pagination of results. Specifies the maximum number of results to return. Will return less results if there are no more results left. |
Result
A JSON array of decision definition objects. Each decision definition object has the following properties:
Name | Value | Description |
---|---|---|
id | String | The id of the decision definition. |
key | String | The key of the decision definition, i.e., the id of the DMN 1.0 XML decision definition. |
category | String | The category of the decision definition. |
name | String | The name of the decision definition. |
version | Number | The version of the decision definition that the engine assigned to it. |
resource | String | The file name of the decision definition. |
deploymentId | String | The deployment id of the decision definition. |
decisionRequirementsDefinitionId | String | The id of the decision requirements definition this decision definition belongs to. |
decisionRequirementsDefinitionKey | String | The key of the decision requirements definition this decision definition belongs to. |
tenantId | String | The tenant id of the decision definition. |
historyTimeToLive | Number | History time to live value of the decision definition. Is used within History cleanup. |
Response codes
Code | Media type | Description |
---|---|---|
200 | application/json | Request successful. |
400 | application/json |
Returned if some of the query parameters are invalid, for example if a sortOrder parameter is supplied, but no sortBy .
See the Introduction for the error response format.
|
Example
Request
GET /decision-definition?key=dish-decision&sortBy=category&sortOrder=asc
Response
[
{
"id": "dish-decision:1:c633e8a8-41b7-11e6-b0ef-00aa004d0001",
"key": "dish-decision",
"category": "http://camunda.org/schema/1.0/dmn",
"name": "Dish Decision",
"version": 1,
"resource": "drd-dish-decision.dmn",
"deploymentId": "c627175e-41b7-11e6-b0ef-00aa004d0001",
"decisionRequirementsDefinitionId":"dish:1:c633c195-41b7-11e6-b0ef-00aa004d0001",
"decisionRequirementsDefinitionKey":"dish",
"tenantId": null,
"historyTimeToLive": 5
}
]