Follow

Webhook

DiveCloud provides a Webhook implementation that can be used to detect the completion of a test and therefore the collection of test results.

 

The user needs to provide a URL to be called back once the execution is completed.

You first create a hook to register an event and resource by using the hook API.

For example: 

 curl -X POST -H 'Content-Type: application/json' -H 'x-api: abc' -d '{"event":"run_plan","resource_id":"1234","url":"http://www.hi.com"}' https://divecloud.nouvola.com/api/v1/hooks

registers a hook to receive a callback when the specified test plan has completed the execution. The callback url should have a scheme (but we add http if not).

The parameters passed to the callback are:

event: currently supports "run_plan"

resource_id: the ID of the test Plan you want to be called back for. Ex: 1234

url: your url for the callback. Ex: http://www.hi.com

The x-api header is your account API key: abc

On successful hook registration, the response is the following json:

 {"result":"success"}

The callback contains json data in the body, in the format of:

 {"event":"run_plan","resource_id":1234,"status":"emailed","outcome":"success", shareable_link:"https://divecloud.nouvola.com/tests/4991?key=d3f7a58bab489028cc687d421b11ce"

}

 

0 Comments

Please sign in to leave a comment.
Powered by Zendesk