Add new endpoint for single action (#1316)

* Add new endpoint for single action
* Adding the new endpoint to the documentation
+ reverse the representation mode to FULL

Signed-off-by: Stanislav Trailov <stanislav.trailov@bosch.io>
This commit is contained in:
Stanislav Trailov
2023-02-06 14:13:58 +02:00
committed by GitHub
parent a64c2bc28e
commit 64bc0417b1
5 changed files with 137 additions and 12 deletions

View File

@@ -14,6 +14,7 @@ import org.springframework.hateoas.MediaTypes;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
@@ -54,4 +55,14 @@ public interface MgmtActionRestApi {
@RequestParam(value = MgmtRestConstants.REQUEST_PARAMETER_SEARCH, required = false) String rsqlParam,
@RequestParam(value = MgmtRestConstants.REQUEST_PARAMETER_REPRESENTATION_MODE, defaultValue = MgmtRestConstants.REQUEST_PARAMETER_REPRESENTATION_MODE_DEFAULT) String representationModeParam);
/**
* Handles the GET request of retrieving a specific Action by <code>actionId</code>
*
* @param actionId
*
* @return the action
*/
@GetMapping(value = "/{actionId}", produces = { MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
ResponseEntity<MgmtAction> getAction(
@PathVariable("actionId") Long actionId);
}