Package io.camunda.optimize.rest
Class DefinitionRestService
java.lang.Object
io.camunda.optimize.rest.DefinitionRestService
@Validated
@RestController
@RequestMapping("/api/definition")
public class DefinitionRestService
extends Object
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDefinitionRestService(DefinitionService definitionService, CollectionScopeService collectionScopeService, SessionService sessionService) -
Method Summary
Modifier and TypeMethodDescriptiongetDefinition(DefinitionType type, String key, jakarta.servlet.http.HttpServletRequest request) getDefinitionKeys(DefinitionType type, String collectionId, jakarta.servlet.http.HttpServletRequest request) getDefinitions(DefinitionType type, boolean includeXml, jakarta.servlet.http.HttpServletRequest request) getDefinitions(jakarta.servlet.http.HttpServletRequest request) getDefinitionsGroupedByTenant(jakarta.servlet.http.HttpServletRequest request) getDefinitionTenantsForMultipleKeys(DefinitionType type, @Valid MultiDefinitionTenantsRequestDto request, jakarta.servlet.http.HttpServletRequest servletRequest) getDefinitionVersions(DefinitionType type, String key, String collectionId, jakarta.servlet.http.HttpServletRequest request) org.springframework.http.ResponseEntity<String> getDefinitionXml(DefinitionType type, String key, String version, String tenantId, jakarta.servlet.http.HttpServletRequest request) Get the definition xml to a given definition of the specified type with the given key and version.
-
Field Details
-
DEFINITION_PATH
- See Also:
-
-
Constructor Details
-
DefinitionRestService
public DefinitionRestService(DefinitionService definitionService, CollectionScopeService collectionScopeService, SessionService sessionService)
-
-
Method Details
-
getDefinitions
@GetMapping public List<DefinitionResponseDto> getDefinitions(jakarta.servlet.http.HttpServletRequest request) -
getDefinitions
@GetMapping("/{type}") public List<DefinitionOptimizeResponseDto> getDefinitions(@PathVariable("type") DefinitionType type, @RequestParam(name="includeXml",required=false) boolean includeXml, jakarta.servlet.http.HttpServletRequest request) -
getDefinitionTenantsForMultipleKeys
@PostMapping("/{type}/_resolveTenantsForVersions") public List<DefinitionWithTenantsResponseDto> getDefinitionTenantsForMultipleKeys(@PathVariable("type") DefinitionType type, @Valid @RequestBody @Valid MultiDefinitionTenantsRequestDto request, jakarta.servlet.http.HttpServletRequest servletRequest) -
getDefinition
@GetMapping("/{type}/{key}") public DefinitionResponseDto getDefinition(@PathVariable("type") DefinitionType type, @PathVariable("key") String key, jakarta.servlet.http.HttpServletRequest request) -
getDefinitionVersions
@GetMapping("/{type}/{key}/versions") public List<DefinitionVersionResponseDto> getDefinitionVersions(@PathVariable("type") DefinitionType type, @PathVariable("key") String key, @RequestParam(value="filterByCollectionScope",required=false) String collectionId, jakarta.servlet.http.HttpServletRequest request) -
getDefinitionKeys
@GetMapping("/{type}/keys") public List<DefinitionKeyResponseDto> getDefinitionKeys(@PathVariable(name="type") DefinitionType type, @RequestParam(name="filterByCollectionScope",required=false) String collectionId, jakarta.servlet.http.HttpServletRequest request) -
getDefinitionsGroupedByTenant
@GetMapping("/_groupByTenant") public List<TenantWithDefinitionsResponseDto> getDefinitionsGroupedByTenant(jakarta.servlet.http.HttpServletRequest request) -
getDefinitionXml
@GetMapping(path="/{type}/xml", produces="application/xml") public org.springframework.http.ResponseEntity<String> getDefinitionXml(@PathVariable("type") DefinitionType type, @RequestParam(name="key",required=false) String key, @RequestParam(name="version",required=false) String version, @RequestParam(name="tenantId",required=false) String tenantId, jakarta.servlet.http.HttpServletRequest request) Get the definition xml to a given definition of the specified type with the given key and version. If the version is set to "ALL", the xml of the latest version is returned.- Parameters:
type- The type of the definition (process or decision).key- The definition key of the desired definition xml.version- The definition version of the desired definition xml.- Returns:
- the definition xml requested or json error structure on failure
-