GET /projects/:project response data missing current_status.html_text

projects

#1

The doc at https://asana.com/developers/api-reference/projects says it returns current_status as in https://asana.com/developers/api-reference/project_statuses which lists both text and html_text properties, but using the Explorer tab at https://asana.com/developers/api-reference/projects (and my app) it only returns the text property.

Oddly, I could have sworn I did see it enumerated along with the other properties when I inspected the project.current_status object a couple times after it was causing an undefined error for me and I was really perplexed as a result; now I don’t see it at all as part of the object. Maybe an intermittent bug?

Thanks,

Larry


#2

Sorry to bug (bumping to @Matt_Bramlage, @Joe_Trollo), but an Asana2Go user reported this and I was hoping to fix it, or at least report back whether I’d be able to fix it sometime. The consequence is that I output a project status paragraph with an @name reference as a link (w/o any name) instead of @name as expected.

Thanks!


#3

Hi @lpb, we haven’t made any changes to project statuses recently, and I’m able to retrieve the current_status.html_text successfully from the API. Not all fields included in our documentation are returned by default, and you will need to use opt_fields to get the ones you want. In particular, html_text and other rich text fields are often omitted because generating that text adds latency to the request, and we want to make sure that the only requests that slow down because of rich text are the requests that actually need it.


#4

Thanks, @Joe_Trollo, it’s working now!

Actually, I failed to state correctly what I was actually trying to do, which was GET /tasks/:task (not GET /project) so it was a little more involved. This opt_expand was what I needed:

GET /tasks/:task?opt_expand=projects,projects.current_status,projects.current_status.html_text

I’d not had to use one like that before so was perplexed. Thanks for pointing me in the right direction!