Skip to Content
DocumentationSync-vs-Async

Sync or Async

You can choose between synchonous and asynchonous processing when enriching data.

Synchonous Processing

Synchonous processing is suitable for a small number of pipes and input objects. If the processing takes too long your request will time out.

Synchonous processing is easier than asynchonous processing since you do not have to deal with polling.

To make a synchonous request use the https://api.pipe0.com/v1/run/sync endpoint.

sync-request.sh
curl -X POST "https://api.pipe0.com/v1/run/sync" \ -H "Authorization: Bearer $API_KEY" \ -d '{ "pipes": [ { "pipeId": "PeopleGetWorkEmailWaterfall@1" }, ], "input": [ { "name": "John Doe", "companyWebsiteURL": "https://pipe0.com" } ] }'

Asynchonous Processing

Use asynchonous processing when you want to enrich larger datasets.

To process async, create a task by sending a POST request to the https://api.pipe0.com/v1/run endpoint.

async-request.sh
curl -X POST "https://api.pipe0.com/v1/run" \ -H "Authorization: Bearer $API_KEY" \ -d '{ "pipes": [ { "pipeId": "PeopleGetWorkEmailWaterfall@1" }, ], "input": [ { "name": "John Doe", "companyWebsiteURL": "https://pipe0.com" } ] }'

The response contains an id property. Use the id (taskId) to make a GET request to the https://api.pipe0.com/v1/check/:taskId endpoint. Both endpoint return a Pipeline Response.

check.sh
curl -X GET "https://api.pipe0.com/v1/check/$TASK_ID" \ -H "Authorization: Bearer $API_KEY"
Last updated on