diff options
author | Simon Brandhof <simon.brandhof@sonarsource.com> | 2016-11-10 20:23:27 +0100 |
---|---|---|
committer | Simon Brandhof <simon.brandhof@sonarsource.com> | 2016-11-14 12:18:51 +0100 |
commit | 564fca44405012a51c4b2ae01e3732e71c70ccff (patch) | |
tree | f07b3b07dedf7a4ddd11f03de5dc4a92c4130275 /sonar-ws | |
parent | d66e57cb020b8ad33f376c721167ef708f76e398 (diff) | |
download | sonarqube-564fca44405012a51c4b2ae01e3732e71c70ccff.tar.gz sonarqube-564fca44405012a51c4b2ae01e3732e71c70ccff.zip |
SONAR-8353 add WS api/webhooks/delivery
Diffstat (limited to 'sonar-ws')
-rw-r--r-- | sonar-ws/src/main/java/org/sonarqube/ws/client/webhook/WebhooksService.java | 9 | ||||
-rw-r--r-- | sonar-ws/src/main/protobuf/ws-webhooks.proto | 7 |
2 files changed, 16 insertions, 0 deletions
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/webhook/WebhooksService.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/webhook/WebhooksService.java index 67ee10aaf57..77cfa1eec94 100644 --- a/sonar-ws/src/main/java/org/sonarqube/ws/client/webhook/WebhooksService.java +++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/webhook/WebhooksService.java @@ -24,12 +24,21 @@ import org.sonarqube.ws.client.BaseService; import org.sonarqube.ws.client.GetRequest; import org.sonarqube.ws.client.WsConnector; +/** + * @since 6.2 + */ public class WebhooksService extends BaseService { public WebhooksService(WsConnector wsConnector) { super(wsConnector, "api/webhooks"); } + public Webhooks.DeliveryWsResponse delivery(String deliveryId) { + GetRequest httpRequest = new GetRequest(path("delivery")) + .setParam("deliveryId", deliveryId); + return call(httpRequest, Webhooks.DeliveryWsResponse.parser()); + } + /** * @throws org.sonarqube.ws.client.HttpException if HTTP status code is not 2xx. */ diff --git a/sonar-ws/src/main/protobuf/ws-webhooks.proto b/sonar-ws/src/main/protobuf/ws-webhooks.proto index 4ef519c3b9b..a7ef3a9ab2b 100644 --- a/sonar-ws/src/main/protobuf/ws-webhooks.proto +++ b/sonar-ws/src/main/protobuf/ws-webhooks.proto @@ -29,6 +29,11 @@ message DeliveriesWsResponse { repeated Delivery deliveries = 1; } +// WS api/webhooks/delivery +message DeliveryWsResponse { + optional Delivery delivery = 1; +} + message Delivery { optional string id = 1; optional string componentKey = 2; @@ -39,4 +44,6 @@ message Delivery { optional bool success = 7; optional int32 httpStatus = 8; optional int32 durationMs = 9; + optional string payload = 10; + optional string errorStacktrace = 11; } |