I am building a visual frontend for clients to show tasks in Asana and I need to be able to separate stories on a task by some kind of "flag" that would determine if the story is public/private
The idea was to use the "Pinned" status to determine if if it is public/private, but that doesn't seem to appear in the API.
Alternatively I was considering "hearting" but I am not sure how to heart in Asana?
Is this possible?
You are correct that neither pinned
nor hearted
fields are included in the payload for stories.
However, in order to achieve your goal of programmatically marking a story with some custom flag for a client to later read you could leverage Custom External Data.
Custom external data allows your application to store a string ID and blob of unicode-safe serialized data such as JSON or YAML. Currently, custom external data is only available on Tasks, see the external
parameter.
I would recommend using this mechanism to store the IDs of the stories which you would like to mark with some kind of status such as "private" and then have your client use this data store to look up those values after reading stories but before displaying.
Note: Custom external data requires OAuth as the data is app-specific.