Hello all! I have a short list of new additions to our API that we’ve accumulated and are ready to share with you.
We’ve introduced a new resource in the API representing users’ memberships within teams, similar to our existing project membership and workspace membership resources. The membership objects have four fields in them:
is_guest, and the usual
resource_type field. All fields are read-only.
You can query for team memberships with the following three routes:
GET /team_memberships- requires either a
teamparameter or a
GET /users/<user-gid>/team_memberships- requires a
GET /teams/<team-gid>/team_memberships- optionally takes a
And you can get an individual membership by ID with
Project objects in the API now have a
default_view field on them, which is one of
"timeline". This determines the view that users see when they initially open the project in the Asana web app. This field is also writeable, so you’re free to have your apps change the default view as well. Note, though, that changing the default view to a different format will also clear any default sort or filters that were set on the project. (This matches what happens in the web app when a user changes views.)
We now support Gzip compression in the API, and you can request that responses be compressed by sending an
Accept-Encoding: gzip header in your request. If the API returns a compressed response, it will have a corresponding
Content-Encoding: gzip header. Many popular HTTP clients will automatically handle decompressing responses, so you might not need to do anything special beyond sending the right header! (For example, Python’s
requests package will automatically uncompress
If you are pulling lots of data from our API, compression can potentially improve performance, as it will take less time to send your app all the packets for the smaller, compressed response.