Rich text fields are not sent in responses (html_text/html_notes)


#1

It’s October 22nd and we are still not receiving html_text/html_notes fields in our API requests, with or without Asana-Enable: new_rich_text (afaik this is no longer necessary after October 15th)
What could be the cause?
We tried Tasks -> html_notes & Stories -> html_text - fields are not present in the reponse.


#2

You might need to specify the fields in the opt_fields option.
e.g.: GET /projects/612875373556956/tasks?opt_fields=html_notes&limit=10

Bastien - Asana Certified Pro
Delegate tasks to a virtual assistant :computer:


#3

Thanks a lot, that did the trick.
It would be to have this in documentation since this is, imho, very counter-intuitive.
Also when I use “/stories/story-id?opt_fields=html_text”, I only receive html_text and no other fields. It would be nice to send it by default instead of ‘text’ field - will this be the behavior after Dec-17-2018? (https://asana.com/developers/documentation/getting-started/deprecations)


#4

Yes, @Bastien_Siebman is correct: rich text is not returned by default from the API. The header only controls whether it’s in the new or old format, not whether it’s present in the API response. We can, however, update our docs to make this clearer!

We don’t plan on including rich text fields by default because we want to encourage developers to ask only for the data they need. In particular, rich text can be expensive because of the computation required to parse our internal text format, resolve all the links to Asana objects, generate the metadata, and assemble it all into an HTML string.

Also, the behavior you observed with opt_fields is correct—when using the output options you will only receive the data specified by the opt_fields parameter.