ESG
Entities
GET
https://api.textreveal.com/v3/entities/{entity_id}/esg/summary/stream
Request
The response will not be in JSON format.
Response will contain the Content-Type: text/event-stream header.
Parameters
entity_id*uuidPermanent ID of the entity
Example: "753c48d6-23c8-5fb0-9230-b099898452b5"translatelanguage-code (enum)Language for the generated summary (ISO code or name, e.g. 'en', 'fr', 'french').
Values: "af", "afr", "afrikaans", "albanian", "am", "amh", "amharic", "ar", "ara", "arabic", "armenian", "az", "aze", "azerbaijani", "ben", "bengali", "bg", "bn", "bos", "bosnian", "bs", "bul", "bulgarian", "ca", "cat", "catalan", "chinese"...
Response
Using the event-stream, you can have errors in a 2xx status response. Check error example.
Error in JSON format can still be returned
event*string (enum)Values: "message", "error", "done"id*numberPosition of the message in the stream
datastringExample: "Hello "
Response
"event: message\nid: 1\ndata: {\"data\":\"Hello \"}\n\nevent: done\nid: 2\n"