Package com.skava.marketplace.web
Class WebhooksAppSubscriptionController
java.lang.Object
com.skava.marketplace.web.WebhooksAppSubscriptionController
@RestController
@RequestMapping("/webhooksApp")
@Validated
public class WebhooksAppSubscriptionController
extends Object
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<BulkUpdateWebhooksResponse>
bulkPatchUpdateWebhook
(String locale, String versionId, String authToken, String storeId, String appId, String appVersion, @Valid BulkPatchUpdateWebhookRequest bulkPatchUpdateWebhookRequest) org.springframework.http.ResponseEntity<WebhookStoreAppsResponse>
createWebhookStoreApp
(String authToken, String versionId, String locale, @Valid WebhookStoreAppsRequest webhookStoreAppsRequest) org.springframework.http.ResponseEntity<GetListOfUniqueWebhookNameResponse>
getAllEventsWebhooks
(String authToken, String versionId, String locale) org.springframework.http.ResponseEntity<GetWebhookStoreAppsResponse>
getAllwebhooks
(String authToken, String versionId, String webhookName, Boolean includeAll, String locale, @Min(value=1L,message="{param.page.min}") Integer page, @Min(value=1L,message="{param.size.min}") @Max(value=50L,message="{param.size.max}") Integer size) org.springframework.http.ResponseEntity<GetWebhookStoreAppsResponse>
getWebhookStoreApp
(String storeId, String authToken, String versionId, String filters, String locale, @jakarta.validation.constraints.Min(value=1L, message="{param.page.min}") int page, @jakarta.validation.constraints.Min(value=1L, message="{param.size.min}"),@jakarta.validation.constraints.Max(value=50L, message="{param.size.max}") int size) org.springframework.http.ResponseEntity<GetWebhookStoreAppsResponse>
getWebhookStoreAppByCollectionID
(String serviceCollectionId, String authToken, String versionId, String serviceName, String webhookName, String locale, @Min(value=1L,message="{param.page.min}") Integer page, @Min(value=1L,message="{param.size.min}") @Max(value=50L,message="{param.size.max}") Integer size, boolean isAppMasterRequired, String appId, String appVersion, String storeId) GET API to find Webhooks details by CollectionIDorg.springframework.http.ResponseEntity<WebhookStoreAppsResponse>
patchUpdateWebhookStoreApp
(String subscriptionId, String authToken, String versionId, String locale, @Valid PatchUpdateWebhookStoreAppRequest patchUpdateWebhookStoreAppRequest) org.springframework.http.ResponseEntity<WebhookStoreAppsResponse>
updateWebhookStoreApp
(String subscriptionId, String authToken, String versionId, String locale, @Valid WebhookStoreAppsRequest webhookStoreAppsRequest)
-
Constructor Details
-
WebhooksAppSubscriptionController
public WebhooksAppSubscriptionController()
-
-
Method Details
-
getAllwebhooks
@ResponseStatus(OK) @Audit @PreAuthorize("hasPrivilege(\'marketplace/view/webhooks\')") @GetMapping public org.springframework.http.ResponseEntity<GetWebhookStoreAppsResponse> getAllwebhooks(@RequestHeader(value="x-auth-token",required=true) String authToken, @RequestHeader(value="x-version",required=false,defaultValue="8.19.7") String versionId, @RequestHeader(value="webhookName",required=false) String webhookName, @RequestHeader(value="includeAll",required=false,defaultValue="false") Boolean includeAll, @RequestParam(value="locale",required=false,defaultValue="en_US") @IgnoreAudit String locale, @RequestParam(value="page",required=false,defaultValue="1") @Min(value=1L,message="{param.page.min}") @Min(value=1L,message="{param.page.min}") Integer page, @RequestParam(value="size",required=false,defaultValue="10") @Min(value=1L,message="{param.size.min}") @Max(value=50L,message="{param.size.max}") @Min(value=1L,message="{param.size.min}") @Max(value=50L,message="{param.size.max}") Integer size) -
getAllEventsWebhooks
@ResponseStatus(OK) @Audit @PreAuthorize("hasPrivilege(\'marketplace/view/webhooks\')") @GetMapping("/getEvents") public org.springframework.http.ResponseEntity<GetListOfUniqueWebhookNameResponse> getAllEventsWebhooks(@RequestHeader(value="x-auth-token",required=true) String authToken, @RequestHeader(value="x-version",required=false,defaultValue="8.19.7") String versionId, @RequestParam(value="locale",required=false,defaultValue="en_US") @IgnoreAudit String locale) -
getWebhookStoreApp
@ResponseStatus(OK) @Audit @PreAuthorize("hasPrivilege(\'marketplace/view/webhooks\')") @GetMapping("/store/{storeId}") public org.springframework.http.ResponseEntity<GetWebhookStoreAppsResponse> getWebhookStoreApp(@PathVariable(value="storeId",required=true) String storeId, @RequestHeader(value="x-auth-token",required=true) String authToken, @RequestHeader(value="x-version",required=false,defaultValue="8.19.7") String versionId, @RequestParam(value="filters",required=false) String filters, @RequestParam(value="locale",required=false,defaultValue="en_US") @IgnoreAudit String locale, @RequestParam(value="page",required=false,defaultValue="1") @Min(value=1L,message="{param.page.min}") @jakarta.validation.constraints.Min(value=1L, message="{param.page.min}") int page, @RequestParam(value="size",required=false,defaultValue="10") @Min(value=1L,message="{param.size.min}") @Max(value=50L,message="{param.size.max}") @jakarta.validation.constraints.Min(value=1L, message="{param.size.min}"),@jakarta.validation.constraints.Max(value=50L, message="{param.size.max}") int size) -
createWebhookStoreApp
@PreAuthorize("hasPrivilege(\'marketplace/create/webhooks\')") @PostMapping("") public org.springframework.http.ResponseEntity<WebhookStoreAppsResponse> createWebhookStoreApp(@RequestHeader(value="x-auth-token",required=true) String authToken, @RequestHeader(value="x-version",required=false,defaultValue="8.19.7") String versionId, @RequestParam(value="locale",required=false,defaultValue="en_US") @IgnoreAudit String locale, @Valid @RequestBody(required=true) @Valid WebhookStoreAppsRequest webhookStoreAppsRequest) -
updateWebhookStoreApp
@PreAuthorize("hasPrivilege(\'marketplace/update/webhooks\')") @PutMapping("/{subscriptionId}") public org.springframework.http.ResponseEntity<WebhookStoreAppsResponse> updateWebhookStoreApp(@PathVariable(value="subscriptionId",required=true) String subscriptionId, @RequestHeader(value="x-auth-token",required=true) String authToken, @RequestHeader(value="x-version",required=false,defaultValue="8.19.7") String versionId, @RequestParam(value="locale",required=false,defaultValue="en_US") @IgnoreAudit String locale, @Valid @RequestBody(required=true) @Valid WebhookStoreAppsRequest webhookStoreAppsRequest) -
patchUpdateWebhookStoreApp
@PreAuthorize("hasPrivilege(\'marketplace/update/webhooks\')") @PatchMapping("/{subscriptionId}") public org.springframework.http.ResponseEntity<WebhookStoreAppsResponse> patchUpdateWebhookStoreApp(@PathVariable(value="subscriptionId",required=true) String subscriptionId, @RequestHeader(value="x-auth-token",required=true) String authToken, @RequestHeader(value="x-version",required=false,defaultValue="8.19.7") String versionId, @RequestParam(value="locale",required=false,defaultValue="en_US") @IgnoreAudit String locale, @Valid @RequestBody(required=true) @Valid PatchUpdateWebhookStoreAppRequest patchUpdateWebhookStoreAppRequest) -
getWebhookStoreAppByCollectionID
@ResponseStatus(OK) @Audit @PreAuthorize("hasPrivilege(\'marketplace/view/webhooks\')") @GetMapping("/serviceCollection/{serviceCollectionId}") public org.springframework.http.ResponseEntity<GetWebhookStoreAppsResponse> getWebhookStoreAppByCollectionID(@PathVariable(value="serviceCollectionId",required=true) String serviceCollectionId, @RequestHeader(value="x-auth-token",required=true) String authToken, @RequestHeader(value="x-version",required=false,defaultValue="8.19.7") String versionId, @RequestHeader(value="serviceName",required=false) String serviceName, @RequestHeader(value="webhookName",required=false) String webhookName, @RequestParam(value="locale",required=false,defaultValue="en_US") @IgnoreAudit String locale, @RequestParam(value="page",required=false,defaultValue="1") @Min(value=1L,message="{param.page.min}") @Min(value=1L,message="{param.page.min}") Integer page, @RequestParam(value="size",required=false,defaultValue="10") @Min(value=1L,message="{param.size.min}") @Max(value=50L,message="{param.size.max}") @Min(value=1L,message="{param.size.min}") @Max(value=50L,message="{param.size.max}") Integer size, @RequestHeader(value="isAppMasterRequired",required=false,defaultValue="false") boolean isAppMasterRequired, @RequestHeader(value="appId",required=false) String appId, @RequestHeader(value="x-appVersion",required=false) String appVersion, @RequestHeader(value="storeId",required=false) String storeId) GET API to find Webhooks details by CollectionID- Parameters:
serviceCollectionId
- Holds a valid collection identifier of this microservice. The requested operation will be performed on this collection identifier. A collection is the topmost entity of a microservice under which all the other entities/resources reside. Each collection represents an instance of the microservice with the configured properties.authToken
- aString
object. This field holds a valid authorization token generated using the Authorization microservice for an user. Auth token (JWT format) represents claims containing roles and privileges of the user accessing this API. JSON Web Token (JWT) is an open standard (RFC 7519) that defines a compact and self-contained way for securely transmitting information between parties as a JSON object. Since the token is a required field for this API it has to be generated before hand by invoking the /auth/sessions API provided by Authorization microservice. The output is three Base64 strings separated by dots that can be easily passed in HTML and HTTP environments, while being more compact when compared to XML-based standards such as SAML. Thus generated token has to be passed to this service and the request will be processed only if the following conditions are met:- Token validation against the secret key
- Expiry time should be in the future
- Necessary privileges are available for the user to perform the action on the subjected resource
versionId
- It hold the value of version number of API. Using this parameter we can access the different version of the API. It is currently unused.serviceName
- Name of the microservicewebhookName
- Holds a valid webhookNamelocale
- aString
object. API Response and error messages will be responded in the locale mentioned in this parameter. Locale needs to be mentioned in Java standard locale format.page
- page numbersize
- page size- Returns:
- Returns List of WebhookStoreApps.
-
bulkPatchUpdateWebhook
@PreAuthorize("hasPrivilege(\'marketplace/update/webhooks\')") @PatchMapping("/bulkUpdate/{storeId}") public org.springframework.http.ResponseEntity<BulkUpdateWebhooksResponse> bulkPatchUpdateWebhook(@RequestParam(value="locale",required=false,defaultValue="en_US") @IgnoreAudit String locale, @RequestHeader(value="x-version",required=false,defaultValue="8.19.7") String versionId, @RequestHeader(value="x-auth-token",required=true) String authToken, @PathVariable(value="storeId",required=true) String storeId, @RequestParam(value="appId",required=false) String appId, @RequestHeader(value="x-appVersion",required=false,defaultValue="8.19.7") String appVersion, @Valid @RequestBody(required=true) @Valid BulkPatchUpdateWebhookRequest bulkPatchUpdateWebhookRequest)
-