Collections
...
Collections API
Collections
Webhook
3min
webhook when a collection has its notification webhook property set rainforest api will make an http post to this url when the collection completes and a new result set https //docs trajectdata com/rainforestapi/batches api/results/list is available note that if no webhook url is supplied in the collection's notification webhook property rainforest api will fallback to using the webhook url defined on your account profile https //app rainforestapi com/profile note that the webhook has a timeout of 5 seconds, your app should ingest the webhook http post within this timeout if your app takes longer than 5 seconds to respond the api will terminate the http post if a timeout does occur then we won't attempt to call the same webhook url for another 5 minutes, this applies to all collections that are using the same webhook url the body of the webhook post contains details of the collection along with download links for the result set note that the presence of the json and csv download links in the response json depends on whether the collection has the notification as json , notification as jsonlines and notification as csv properties set here's an example of the body of the webhook post { "request info" { "success" true, "type" "collection resultset completed" }, "collection" { "id" "9e867faa", "name" "my second collection" }, "result set" { "id" 4, "started at" "2020 01 01t00 00 00 000z", "ended at" "2020 01 01t00 00 10 000z", "requests completed" 1, "requests failed" 0, "download links" { "json" { "pages" \[ "https //results rainforestapi com/collection results 9e867faa 4 page 1 json" ], "all pages" "https //results rainforestapi com/collection results 9e867faa 4 all pages zip" }, "csv" { "pages" \[ "https //results rainforestapi com/collection results 9e867faa 4 page 1 246f6e2e561c90958384aa76e455e2bc95ad3a01 csv" ], "all pages" "https //results rainforestapi com/collection results 9e867faa 4 all pages 246f6e2e561c90958384aa76e455e2bc95ad3a01 csv" } } } } next steps list requests https //docs trajectdata com/rainforestapi/collections api/requests/list list result sets https //docs trajectdata com/rainforestapi/collections api/results/list resending a webhook https //docs trajectdata com/rainforestapi/collections api/results/resend webhook