Stories

Get stories from a goal

<b>Required scope: </b><code>stories:read</code>

Returns the compact records for all stories on the goal.

get/goals/{goal_gid}/stories

Request

  • Base URL: https://app.asana.com/api/1.0
  • URL: https://app.asana.com/api/1.0/goals/{goal_gid}/stories
  • Auth: one of:
    • HTTP bearer
    • OAuth 2 (authorization code, authorization URL https://app.asana.com/-/oauth_authorize, token URL https://app.asana.com/-/oauth_token, scopes: stories:read)

Query parameters

limitinteger

Results per page. The number of objects to return per page. The value must be between 1 and 100.

offsetstring

Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. Note: You can only pass in an offset that was returned to you via a previously paginated request.

created_afterstring date-time

Only return stories created after this time. Applies to every story type; pair it with resource_subtype=comment_added to get just the comments added since a given moment. The bound is exclusive but has second granularity: it is truncated to the start of its second before filtering, so any story created within that same second is still returned. A client polling with the created_at of the last story it saw should expect to see that story again, and others alongside it, and should de-duplicate on gid.

resource_subtype'comment_added'

Only return stories of this subtype. Only comment_added is supported, which narrows the response to comments and excludes activity such as assignments, due date changes, and project moves. Omit to return the full activity feed.

sort_ascendingboolean

Creation-time order: true (the default) is oldest first, false is newest first. Pair false with limit to read only the most recent stories. Ordering is applied across the parent's stories; on a parent with an extremely large activity feed the feed may be truncated before it is ordered, so pair false with created_after to bound what is considered.

opt_fieldsstring[]

This endpoint returns a resource which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. Properties can include nested fields. To learn more, see the input/output options guide.

Response

Successfully retrieved the specified goal's stories.

Example response

{
  "data": [
    {
      "gid": "12345",
      "resource_type": "story",
      "created_at": "2012-02-22T02:06:58.147Z",
      "created_by": {
        "gid": "12345",
        "resource_type": "user",
        "name": "Greg Sanchez"
      },
      "resource_subtype": "comment_added",
      "text": "marked today"
    }
  ],
  "next_page": {
    "offset": "eyJ0eXAiOJiKV1iQLCJhbGciOiJIUzI1NiJ9",
    "path": "/tasks/12345/attachments?limit=2&offset=eyJ0eXAiOJiKV1iQLCJhbGciOiJIUzI1NiJ9",
    "uri": "https://app.asana.com/api/1.0/tasks/12345/attachments?limit=2&offset=eyJ0eXAiOJiKV1iQLCJhbGciOiJIUzI1NiJ9"
  }
}

Changes

No recorded changes to this operation across all 2 revisions of this API.