seansy-archy - I’m trying to use the Thoughtspo...

I’m trying to use the Thoughtspot API to download a PDF for a chart answer, it says the PDF option is not possible.
curl -X POST \
--url 'https://archy.thoughtspot.cloud/api/rest/2.0/report/answer' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <token>' \
--data-raw '{
"file_format": "PDF",
"session_identifier": "69fe6b50-a53a-4077-a6d4-83475639b638",
"generation_number": 2
}'
curl -X POST \
--url 'https://archy.thoughtspot.cloud/api/rest/2.0/report/answer' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <token>' \
--data-raw '{
"file_format": "PDF",
"session_identifier": "69fe6b50-a53a-4077-a6d4-83475639b638",
"generation_number": 2
}'
Returns the error
Only PNG/CSV file formats are allowed
Only PNG/CSV file formats are allowed
The docs say requesting a PDF is permissible via the REST api
8 Replies
shikharTS
shikharTS5d ago
When you do this via UI, even then it does not allow PDF downloads on unsaved answers
shikharTS
shikharTS5d ago
No description
seansy-archy
seansy-archyOP5d ago
interesting, ok Based on the API documentation, this seems like a bug.
shikharTS
shikharTS5d ago
Yes, will get it corrected.
seansy-archy
seansy-archyOP5d ago
Do you mean the docs will be corrected or PDFs will be accessible for unsaved answers?
shikharTS
shikharTS5d ago
I think the docs will be corrected. This is something which even the TS application does not support..
seansy-archy
seansy-archyOP5d ago
So when I trigger to download the same edited answer (columns removed) through the UI, PDF is still available. If I use the REST API for the same session it fails, saying "only CSV/PNG formats are suppored", even though the modal doesn't include png in this case...
No description
shikharTS
shikharTS4d ago
Can you give metadata_identifier as well here?

Did you find this page helpful?