API changes

Hey

Has the API changed?

I see the call to https://app.asana.com/api/1.0/stories/{story_gid}

Returns values different from what they were until today

I would appreciate your reply ,

How different? You remember the differences? ping @Phil_Seeman

Yes ,
Was Type instead of resource_subtype

‫בתאריך יום ד׳, 18 במאי 2022 ב-17:02 מאת ‪Bastien Siebman via Asana Community Forum‬‏ <‪notifications@asana.discoursemail.com‬‏>:‬

I can confirm, we ran into this as well. We were filtering by "type" = "comment" and are now updating to "resource_subtype" = "comment_added". The type field seems to have disappeared around 1:44pm Central time yesterday.

1 Like

Related: No more parsing story text! New fields on stories!

I’m checking on this.

How can I know when there are changes to address before?

You can subscribe to the API category here in addition to subscribing to the GitHub repo of the API.

I can also confirm changes have been made but I am unable to find what else has been changed. Our application is not working.

1 Like

Hi, we’ve identified that the type field was inadvertently removed. Since that field used to be documented and we never ran a deprecation to remove it, we’ve decided to reinstate the field to avoid undesired impact on apps and scripts. The field should once again be present on API responses within the next business week; we apologize for any disruption caused.

That said, Asana strongly encourages to move away from using the undocumented type field in favor of the resource_subtype field as was suggested in the comments above.

3 Likes

Hey @anon65323026,

Does this apply just to story endpoint(s), or more broadly within the API?

The accidental removal of the type field was just for story endpoints, but our recommendation to stay away from that field in favor of resource_subtype is general to all endpoints and schemas in our REST API.

To provide some deeper context, the type field was initially introduced for select object schemas when we had a need to distinguish between resource types or behavior. For stories it started out as a simple “system” vs “comment”, and for custom fields the type indicates whether the field is “enum”, “number”, “text”, etc. We continue to support this old behavior, but eventually we realized that a more universal system of identifying resource “types” (resource_type) and “subtypes” (resource_subtype) provided a more robust and extensible means of providing such differentiation in type or behavior of resources. So we’re recommending usage of the new system since it is better defined, maintained, and generally more functional. This change was announced here.

3 Likes

Got it, @anon65323026 , thanks for the detailed info and background!

1 Like