Skip to content

Commit

Permalink
Merge pull request #77 from OpsMx/OP-4616
Browse files Browse the repository at this point in the history
Added query params
  • Loading branch information
sriharshakancharla authored Dec 23, 2020
2 parents accfcca + 2a3f83d commit 8a86fed
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,16 +52,19 @@ class OpsmxPlatformController {
@ApiOperation(value = "Endpoint for platform rest services")
@RequestMapping(value = "/{version}/{type}", method = RequestMethod.GET)
Object getPlatformResponse1(@PathVariable("version") String version,
@PathVariable("type") String type) {
return opsmxPlatformService.getPlatformResponse1(version, type)
@PathVariable("type") String type,
@RequestParam(value = "datasourceType", required = false) String datasourceType,
@RequestParam(value = "accountName", required = false) String accountName) {
return opsmxPlatformService.getPlatformResponse1(version, type, datasourceType, accountName)
}

@ApiOperation(value = "Endpoint for platform rest services")
@RequestMapping(value = "/{version}/{type}/{source}", method = RequestMethod.GET)
Object getPlatformResponse(@PathVariable("version") String version,
@PathVariable("type") String type,
@PathVariable("source") String source) {
return opsmxPlatformService.getPlatformResponse(version, type, source)
@PathVariable("source") String source,
@RequestParam(value = "source1", required = false) String source1) {
return opsmxPlatformService.getPlatformResponse(version, type, source, source1)
}

@ApiOperation(value = "Endpoint for platform rest services")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,10 @@ class OpsmxVisibilityController {
@ApiOperation(value = "Endpoint for visibility rest services")
@RequestMapping(value = "/{version}/{type}/{source}", method = RequestMethod.GET)
Object getVisibilityResponse(@PathVariable("version") String version,
@PathVariable("type") String type,
@PathVariable("source") String source) {
return opsmxVisibilityService.getVisibilityResponse(version, type, source)
@PathVariable("type") String type,
@PathVariable("source") String source,
@RequestParam(value = "source1", required = false) String source1) {
return opsmxVisibilityService.getVisibilityResponse(version, type, source, source1)
}

@ApiOperation(value = "Endpoint for visibility rest services")
Expand Down Expand Up @@ -148,9 +149,9 @@ class OpsmxVisibilityController {
Object deleteVisibilityResponse4(@PathVariable("version") String version,
@PathVariable("type") String type,
@PathVariable("source") String source,
@PathVariable("source1") String source1) {

return opsmxVisibilityService.deleteVisibilityResponse4(version, type, source, source1)
@PathVariable("source1") String source1,
@RequestParam(value = "source2", required = false) String source2) {
return opsmxVisibilityService.deleteVisibilityResponse4(version, type, source, source1, source2)
}

@ApiOperation(value = "Endpoint for visibility rest services")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,15 @@ interface OpsmxPlatformService {

@GET("/platformservice/{version}/{type}")
Object getPlatformResponse1(@Path('version') String version,
@Path('type') String type)
@Path('type') String type,
@Query("datasourceType") String datasourceType,
@Query("accountName") String accountName)

@GET("/platformservice/{version}/{type}/{source}")
Object getPlatformResponse(@Path('version') String version,
@Path('type') String type,
@Path('source') String source)
@Path('source') String source,
@Query("source1") String source1)

@GET("/platformservice/{version}/{type}/{source}/{source1}")
Object getPlatformResponse4(@Path('version') String version,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ interface OpsmxVisibilityService {
@GET("/visibilityservice/{version}/{type}/{source}")
Object getVisibilityResponse(@Path('version') String version,
@Path('type') String type,
@Path('source') String source)
@Path('source') String source,
@Query("source1") String source1)

@GET("/visibilityservice/{version}/{type}/{source}/{source1}")
Object getVisibilityResponse4(@Path('version') String version,
Expand Down Expand Up @@ -86,7 +87,8 @@ interface OpsmxVisibilityService {
Object deleteVisibilityResponse4(@Path('version') String version,
@Path('type') String type,
@Path('source') String source,
@Path('source1') String source1)
@Path('source1') String source1,
@Query("source2") String source2)

@DELETE("/visibilityservice/{version}/{type}/{source}/{source1}/{source2}")
Object deleteVisibilityResponse5(@Path('version') String version,
Expand Down

0 comments on commit 8a86fed

Please sign in to comment.