Binary files retrieval🔗
Retrieving binaries associated with Events🔗
Some event types may have associated binaries (for example, a CV document). If the event has an associated binary, then the binary file's UUID is communicated in the payload section. Binaries are not included in the event itself to keep the payload data size small. The binary file's UUID is used to retrieve it from a dedicated endpoint protected by OAuth 2.0 (see Authentication docs).
All events (with and without binaries) are pushed via the webhook, and processed asynchronously by the consumer. If the consumer wants to use the binary file associated with the event, it can be retrieved from the binary retrieval endpoint {domain}/events/v1/binaries/{id}
, domain and credentials will be provided by Textkernel.
{domain}/events/v1/binaries/{id}
GET /events/v1/binaries/{id}
Method | Description |
---|---|
GET | Retrieve the binary files associated to a given ID (obtained from an event) |
- We offer optional compression, when including the header:
Accept-Encoding: gzip
. Compression will be applied to MIME types: 'text/html', 'text/xml', 'text/plain', 'application/json', 'application/xml'.
Request GET🔗
curl -X GET '{domain}/events/v1/binaries/{id}' -H 'Authorization: Bearer {token}'
Response GET🔗
A successful (HTTP 200) response contains:
- Binary file
Content-Disposition
: Contains type 'attachment' and optional filename where name is binary id. Example: attachment; filename="6239a8cd-2f65-4d8c-9cd2-82ba3c2235e4.pdf"Content-Type
: Contains media type if known, otherwiseapplication/octet-stream
or HTTP error, e.g. 404 Not Found.