Goals

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

Returns compact goal records.

get/goals

Request

  • Base URL: https://app.asana.com/api/1.0
  • URL: https://app.asana.com/api/1.0/goals
  • 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: goals:read)

Query parameters

portfoliostring

Globally unique identifier for supporting portfolio.

projectstring

Globally unique identifier for supporting project.

taskstring

Globally unique identifier for supporting task.

is_workspace_levelboolean

Filter to goals with is_workspace_level set to query value. Must be used with the workspace parameter.

teamstring

Globally unique identifier for the team.

workspacestring

Globally unique identifier for the workspace.

time_periodsstring[]

Globally unique identifiers for the time periods.

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.

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 requested goals.

Example response

{
  "data": [
    {
      "gid": "12345",
      "resource_type": "goal",
      "name": "Grow web traffic by 30%",
      "owner": {
        "gid": "12345",
        "resource_type": "user",
        "name": "Greg Sanchez"
      }
    }
  ],
  "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

    • info

      added the enum value custom_field_settings.custom_field.html_text_value to the property items/ of the query request parameter opt_fields