Get Case Definitions

Queries for case definitions that fulfill given parameters. Parameters may be the properties of case definitions, such as the name, key or version. The size of the result set can be retrieved by using the Get Case Definition Count method.

Method

GET /case-definition

Parameters

Query Parameters

Name Description
caseDefinitionId Filter by case definition id.
caseDefinitionIdIn Filter by case definition ids.
name Filter by case definition name.
nameLike Filter by case definition names that the parameter is a substring of.
deploymentId Filter by the deployment the id belongs to.
key Filter by case definition key, i.e., the id in the CMMN XML. Exact match.
keyLike Filter by case definition keys that the parameter is a substring of.
category Filter by case definition category. Exact match.
categoryLike Filter by case definition categories that the parameter is a substring of.
version Filter by case definition version.
latestVersion Only include those case definitions that are latest versions. Value may only be true, as false is the default behavior.
resourceName Filter by the name of the case definition resource. Exact match.
resourceNameLike Filter by names of those case definition resources that the parameter is a substring of.
tenantIdIn Filter by a comma-separated list of tenant ids. A case definition must have one of the given tenant ids.
withoutTenantId Only include case definitions which belong to no tenant. Value may only be true, as false is the default behavior.
includeCaseDefinitionsWithoutTenantId Include case 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 case definition objects. Each case definition object has the following properties:

Name Value Description
id String The id of the case definition.
key String The key of the case definition, i.e., the id of the CMMN XML case definition.
category String The category of the case definition.
name String The name of the case definition.
version Number The version of the case definition that the engine assigned to it.
resource String The file name of the case definition.
deploymentId String The deployment id of the case definition.
tenantId String The tenant id of the case definition.

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 /case-definition?keyLike=Key&sortBy=category&sortOrder=asc

Response

[
  {
    "id":"aCaseDefinitionId",
    "key":"aKey",
    "category":"aCategory",
    "name":"aName",
    "version":2,
    "resource":"aResourceName",
    "deploymentId":"aDeploymentId",
    "tenantId":null
  }
]

On this Page: