Package io.camunda.optimize.rest
Class CollectionRestService
java.lang.Object
io.camunda.optimize.rest.CollectionRestService
@Validated
@RestController
@RequestMapping("/api/collection")
public class CollectionRestService
extends Object
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCollectionRestService(SessionService sessionService, CollectionService collectionService, AuthorizedCollectionService authorizedCollectionService, CollectionRoleService collectionRoleService, CollectionScopeService collectionScopeService, CollectionEntityService collectionEntityService, ReportRestMapper reportRestMapper, CollectionRestMapper collectionRestMapper, AlertRestMapper alertRestMapper, EntityRestMapper entityRestMapper) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddRoles(String collectionId, @NotNull List<CollectionRoleRequestDto> rolesToAdd, jakarta.servlet.http.HttpServletRequest request) voidaddScopeEntries(String collectionId, @NotNull List<CollectionScopeEntryDto> scopeUpdates, jakarta.servlet.http.HttpServletRequest request) voidbulkDeleteCollectionScopes(String collectionId, @NotNull List<String> collectionScopeIds, jakarta.servlet.http.HttpServletRequest request) voidbulkRemoveCollectionRoles(String collectionId, @NotNull List<String> roleEntryIds, jakarta.servlet.http.HttpServletRequest request) booleancheckCollectionScopeConflicts(String collectionId, List<String> collectionScopeIds, jakarta.servlet.http.HttpServletRequest request) copyCollection(String collectionId, String newCollectionName, jakarta.servlet.http.HttpServletRequest request) createNewCollection(PartialCollectionDefinitionRequestDto partialCollectionDefinitionDto, jakarta.servlet.http.HttpServletRequest request) Creates a new collection.voiddeleteCollection(String collectionId, boolean force, jakarta.servlet.http.HttpServletRequest request) Delete the collection to the specified id.voiddeleteScopeEntry(String collectionId, String scopeEntryId, boolean force, jakarta.servlet.http.HttpServletRequest request) getCollection(String collectionId, jakarta.servlet.http.HttpServletRequest request) Retrieve the collection to the specified id.getEntities(String collectionId, String sortBy, SortOrder sortOrder, jakarta.servlet.http.HttpServletRequest request) getReports(String collectionId, jakarta.servlet.http.HttpServletRequest request) getScopeDeleteConflicts(String collectionId, String scopeEntryId, jakarta.servlet.http.HttpServletRequest request) voidremoveRole(String collectionId, String roleEntryId, jakarta.servlet.http.HttpServletRequest request) voidupdateCollectionPartial(String collectionId, @NotNull PartialCollectionDefinitionRequestDto updatedCollection, jakarta.servlet.http.HttpServletRequest request) Updates the name and/or configuration of a collectionvoidupdateRole(String collectionId, String roleEntryId, @NotNull CollectionRoleUpdateRequestDto roleUpdateDto, jakarta.servlet.http.HttpServletRequest request) voidupdateScopeEntry(String collectionId, @NotNull CollectionScopeEntryUpdateDto entryDto, String scopeEntryId, boolean force, jakarta.servlet.http.HttpServletRequest request)
-
Field Details
-
COLLECTION_PATH
- See Also:
-
-
Constructor Details
-
CollectionRestService
public CollectionRestService(SessionService sessionService, CollectionService collectionService, AuthorizedCollectionService authorizedCollectionService, CollectionRoleService collectionRoleService, CollectionScopeService collectionScopeService, CollectionEntityService collectionEntityService, ReportRestMapper reportRestMapper, CollectionRestMapper collectionRestMapper, AlertRestMapper alertRestMapper, EntityRestMapper entityRestMapper)
-
-
Method Details
-
createNewCollection
@PostMapping public IdResponseDto createNewCollection(@RequestBody PartialCollectionDefinitionRequestDto partialCollectionDefinitionDto, jakarta.servlet.http.HttpServletRequest request) Creates a new collection. -
getCollection
@GetMapping("/{id}") public AuthorizedCollectionDefinitionRestDto getCollection(@PathVariable("id") String collectionId, jakarta.servlet.http.HttpServletRequest request) Retrieve the collection to the specified id. -
updateCollectionPartial
@PutMapping("/{id}") public void updateCollectionPartial(@PathVariable("id") String collectionId, @NotNull @RequestBody @NotNull PartialCollectionDefinitionRequestDto updatedCollection, jakarta.servlet.http.HttpServletRequest request) Updates the name and/or configuration of a collection- Parameters:
collectionId- the id of the collectionupdatedCollection- collection that needs to be updated. Only the fields that are defined here are actually updated.
-
deleteCollection
@DeleteMapping("/{id}") public void deleteCollection(@PathVariable("id") String collectionId, @RequestParam(name="force",required=false) boolean force, jakarta.servlet.http.HttpServletRequest request) Delete the collection to the specified id. -
addScopeEntries
@PutMapping("/{id}/scope") public void addScopeEntries(@PathVariable("id") String collectionId, @NotNull @RequestBody @NotNull List<CollectionScopeEntryDto> scopeUpdates, jakarta.servlet.http.HttpServletRequest request) -
deleteScopeEntry
-
getScopeDeleteConflicts
@GetMapping("/{id}/scope/{scopeEntryId}/delete-conflicts") public ConflictResponseDto getScopeDeleteConflicts(@PathVariable("id") String collectionId, @PathVariable("scopeEntryId") String scopeEntryId, jakarta.servlet.http.HttpServletRequest request) -
updateScopeEntry
@PutMapping("/{id}/scope/{scopeEntryId}") public void updateScopeEntry(@PathVariable("id") String collectionId, @NotNull @NotNull CollectionScopeEntryUpdateDto entryDto, @PathVariable("scopeEntryId") String scopeEntryId, @RequestParam(name="force",required=false) boolean force, jakarta.servlet.http.HttpServletRequest request) -
getScopes
@GetMapping("/{id}/scope") public List<CollectionScopeEntryResponseDto> getScopes(@PathVariable("id") String collectionId, jakarta.servlet.http.HttpServletRequest request) -
getRoles
@GetMapping("/{id}/role") public List<CollectionRoleResponseDto> getRoles(@PathVariable("id") String collectionId, jakarta.servlet.http.HttpServletRequest request) -
addRoles
@PostMapping("/{id}/role") public void addRoles(@PathVariable("id") String collectionId, @NotNull @RequestBody @NotNull List<CollectionRoleRequestDto> rolesToAdd, jakarta.servlet.http.HttpServletRequest request) -
updateRole
@PutMapping("/{id}/role/{roleEntryId}") public void updateRole(@PathVariable("id") String collectionId, @PathVariable("roleEntryId") String roleEntryId, @NotNull @RequestBody @NotNull CollectionRoleUpdateRequestDto roleUpdateDto, jakarta.servlet.http.HttpServletRequest request) -
copyCollection
@PostMapping("/{id}/copy") public IdResponseDto copyCollection(@PathVariable("id") String collectionId, @RequestParam(name="name",required=false) String newCollectionName, jakarta.servlet.http.HttpServletRequest request) -
removeRole
-
getAlerts
@GetMapping("/{id}/alerts") public List<AlertDefinitionDto> getAlerts(@PathVariable("id") String collectionId, jakarta.servlet.http.HttpServletRequest request) -
getReports
@GetMapping("/{id}/reports") public List<AuthorizedReportDefinitionResponseDto> getReports(@PathVariable("id") String collectionId, jakarta.servlet.http.HttpServletRequest request) -
getEntities
@GetMapping("/{id}/entities") public List<EntityResponseDto> getEntities(@PathVariable("id") String collectionId, @RequestParam(name="sortBy",required=false) String sortBy, @RequestParam(name="sortOrder",required=false) SortOrder sortOrder, jakarta.servlet.http.HttpServletRequest request) -
checkCollectionScopeConflicts
-
bulkRemoveCollectionRoles
-
bulkDeleteCollectionScopes
-