Asana User Task Lists API

Asana User Task Lists API is a tool that allows users to create, update, and manage task lists within the Asana platform. By using this API, users can access their task lists, view all the tasks within them, and make changes such as marking tasks as complete or updating task details. This API provides a seamless way for users to stay organized and on top of their tasks by offering a centralized platform for managing all their to-do lists.

OpenAPI Specification

asana-user-task-lists-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Asana Allocations User Task Lists API
  description: The Asana Allocations API allows users to manage and allocate resources within their Asana project management system. An allocation object represents how much of a resource (e.g. person, team) is dedicated to a specific work object (e.g. project, portfolio) over a specific period of time. The effort value can be a percentage or number of hours.
  version: '1.0'
  termsOfService: https://asana.com/terms
  contact:
    name: Asana Support
    url: https://asana.com/support
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0
servers:
- url: https://app.asana.com/api/1.0
  description: Main endpoint.
security:
- personalAccessToken: []
- oauth2: []
tags:
- name: User Task Lists
  description: A user task list represents the tasks assigned to a particular user. This list is the user's [My Tasks](https://asana.com/guide/help/fundamentals/my-tasks) list.
paths:
  /user_task_lists/{user_task_list_gid}:
    parameters:
    - $ref: '#/components/parameters/user_task_list_path_gid'
    - $ref: '#/components/parameters/pretty'
    get:
      summary: Asana Get a user task list
      description: Returns the full record for a user task list.
      tags:
      - User Task Lists
      operationId: getUserTaskList
      parameters:
      - name: opt_fields
        in: query
        description: This endpoint returns a compact 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.
        required: false
        example:
        - name
        - owner
        - workspace
        schema:
          type: array
          items:
            type: string
            enum:
            - name
            - owner
            - workspace
        style: form
        explode: false
      responses:
        200:
          description: Successfully retrieved the user task list.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/UserTaskListResponse'
        400:
          $ref: '#/components/responses/BadRequest'
        401:
          $ref: '#/components/responses/Unauthorized'
        403:
          $ref: '#/components/responses/Forbidden'
        404:
          $ref: '#/components/responses/NotFound'
        500:
          $ref: '#/components/responses/InternalServerError'
      x-readme:
        code-samples:
        - language: java
          install: <dependency><groupId>com.asana</groupId><artifactId>asana</artifactId><version>1.0.0</version></dependency>
          code: "import com.asana.Client;\n\nClient client = Client.accessToken(\"PERSONAL_ACCESS_TOKEN\");\n\nUserTaskList result = client.usertasklists.getUserTaskList(userTaskListGid)\n    .option(\"pretty\", true)\n    .execute();"
        - language: node
          install: npm install asana
          code: "const Asana = require('asana');\n\nlet client = Asana.ApiClient.instance;\nlet token = client.authentications['token'];\ntoken.accessToken = '<YOUR_ACCESS_TOKEN>';\n\nlet userTaskListsApiInstance = new Asana.UserTaskListsApi();\nlet user_task_list_gid = \"12345\"; // String | Globally unique identifier for the user task list.\nlet opts = { \n    'opt_fields': \"name,owner,workspace\"\n};\nuserTaskListsApiInstance.getUserTaskList(user_task_list_gid, opts).then((result) => {\n    console.log('API called successfully. Returned data: ' + JSON.stringify(result.data, null, 2));\n}, (error) => {\n    console.error(error.response.body);\n});"
          name: node-sdk-v3
        - language: node
          install: npm install asana@1.0.5
          code: "const asana = require('asana');\n\nconst client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');\n\nclient.usertasklists.getUserTaskList(userTaskListGid, {param: \"value\", param: \"value\", opt_pretty: true})\n    .then((result) => {\n        console.log(result);\n    });"
          name: node-sdk-v1
        - language: python
          install: pip install asana
          code: "import asana\nfrom asana.rest import ApiException\nfrom pprint import pprint\n\nconfiguration = asana.Configuration()\nconfiguration.access_token = '<YOUR_ACCESS_TOKEN>'\napi_client = asana.ApiClient(configuration)\n\n# create an instance of the API class\nuser_task_lists_api_instance = asana.UserTaskListsApi(api_client)\nuser_task_list_gid = \"12345\" # str | Globally unique identifier for the user task list.\nopts = {\n    'opt_fields': \"name,owner,workspace\", # list[str] | This endpoint returns a compact 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.\n}\n\ntry:\n    # Get a user task list\n    api_response = user_task_lists_api_instance.get_user_task_list(user_task_list_gid, opts)\n    pprint(api_response)\nexcept ApiException as e:\n    print(\"Exception when calling UserTaskListsApi->get_user_task_list: %s\\n\" % e)"
          name: python-sdk-v5
        - language: python
          install: pip install asana==3.2.3
          code: 'import asana


            client = asana.Client.access_token(''PERSONAL_ACCESS_TOKEN'')


            result = client.user_task_lists.get_user_task_list(user_task_list_gid, {''param'': ''value'', ''param'': ''value''}, opt_pretty=True)'
          name: python-sdk-v3
        - language: php
          install: composer require asana/asana
          code: '<?php

            require ''vendor/autoload.php'';


            $client = Asana\Client::accessToken(''PERSONAL_ACCESS_TOKEN'');


            $result = $client->usertasklists->getUserTaskList($user_task_list_gid, array(''param'' => ''value'', ''param'' => ''value''), array(''opt_pretty'' => ''true''))'
        - language: ruby
          install: gem install asana
          code: "require 'asana'\n\nclient = Asana::Client.new do |c|\n    c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'\nend\n\nresult = client.user_task_lists.get_user_task_list(user_task_list_gid: 'user_task_list_gid', param: \"value\", param: \"value\", options: {pretty: true})"
  /users/{user_gid}/user_task_list:
    parameters:
    - $ref: '#/components/parameters/user_path_gid'
    - $ref: '#/components/parameters/pretty'
    - name: workspace
      in: query
      required: true
      description: The workspace in which to get the user task list.
      schema:
        type: string
      example: '1234'
    get:
      summary: Asana Get a user's task list
      description: Returns the full record for a user's task list.
      tags:
      - User Task Lists
      operationId: getUserTaskListForUser
      parameters:
      - name: opt_fields
        in: query
        description: This endpoint returns a compact 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.
        required: false
        example:
        - name
        - owner
        - workspace
        schema:
          type: array
          items:
            type: string
            enum:
            - name
            - owner
            - workspace
        style: form
        explode: false
      responses:
        200:
          description: Successfully retrieved the user's task list.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/UserTaskListResponse'
        400:
          $ref: '#/components/responses/BadRequest'
        401:
          $ref: '#/components/responses/Unauthorized'
        403:
          $ref: '#/components/responses/Forbidden'
        404:
          $ref: '#/components/responses/NotFound'
        500:
          $ref: '#/components/responses/InternalServerError'
      x-readme:
        code-samples:
        - language: java
          install: <dependency><groupId>com.asana</groupId><artifactId>asana</artifactId><version>1.0.0</version></dependency>
          code: "import com.asana.Client;\n\nClient client = Client.accessToken(\"PERSONAL_ACCESS_TOKEN\");\n\nUserTaskList result = client.usertasklists.getUserTaskListForUser(userGid, workspace)\n    .option(\"pretty\", true)\n    .execute();"
        - language: node
          install: npm install asana
          code: "const Asana = require('asana');\n\nlet client = Asana.ApiClient.instance;\nlet token = client.authentications['token'];\ntoken.accessToken = '<YOUR_ACCESS_TOKEN>';\n\nlet userTaskListsApiInstance = new Asana.UserTaskListsApi();\nlet user_gid = \"me\"; // String | A string identifying a user. This can either be the string \\\"me\\\", an email, or the gid of a user.\nlet workspace = \"1234\"; // String | The workspace in which to get the user task list.\nlet opts = { \n    'opt_fields': \"name,owner,workspace\"\n};\nuserTaskListsApiInstance.getUserTaskListForUser(user_gid, workspace, opts).then((result) => {\n    console.log('API called successfully. Returned data: ' + JSON.stringify(result.data, null, 2));\n}, (error) => {\n    console.error(error.response.body);\n});"
          name: node-sdk-v3
        - language: node
          install: npm install asana@1.0.5
          code: "const asana = require('asana');\n\nconst client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');\n\nclient.usertasklists.getUserTaskListForUser(userGid, {param: \"value\", param: \"value\", opt_pretty: true})\n    .then((result) => {\n        console.log(result);\n    });"
          name: node-sdk-v1
        - language: python
          install: pip install asana
          code: "import asana\nfrom asana.rest import ApiException\nfrom pprint import pprint\n\nconfiguration = asana.Configuration()\nconfiguration.access_token = '<YOUR_ACCESS_TOKEN>'\napi_client = asana.ApiClient(configuration)\n\n# create an instance of the API class\nuser_task_lists_api_instance = asana.UserTaskListsApi(api_client)\nuser_gid = \"me\" # str | A string identifying a user. This can either be the string \\\"me\\\", an email, or the gid of a user.\nworkspace = \"1234\" # str | The workspace in which to get the user task list.\nopts = {\n    'opt_fields': \"name,owner,workspace\", # list[str] | This endpoint returns a compact 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.\n}\n\ntry:\n    # Get a user's task list\n    api_response = user_task_lists_api_instance.get_user_task_list_for_user(user_gid, workspace, opts)\n    pprint(api_response)\nexcept ApiException as e:\n    print(\"Exception when calling UserTaskListsApi->get_user_task_list_for_user: %s\\n\" % e)"
          name: python-sdk-v5
        - language: python
          install: pip install asana==3.2.3
          code: 'import asana


            client = asana.Client.access_token(''PERSONAL_ACCESS_TOKEN'')


            result = client.user_task_lists.get_user_task_list_for_user(user_gid, {''param'': ''value'', ''param'': ''value''}, opt_pretty=True)'
          name: python-sdk-v3
        - language: php
          install: composer require asana/asana
          code: '<?php

            require ''vendor/autoload.php'';


            $client = Asana\Client::accessToken(''PERSONAL_ACCESS_TOKEN'');


            $result = $client->usertasklists->getUserTaskListForUser($user_gid, array(''param'' => ''value'', ''param'' => ''value''), array(''opt_pretty'' => ''true''))'
        - language: ruby
          install: gem install asana
          code: "require 'asana'\n\nclient = Asana::Client.new do |c|\n    c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'\nend\n\nresult = client.user_task_lists.get_user_task_list_for_user(user_gid: 'user_gid', workspace: '&#x27;workspace_example&#x27;', param: \"value\", param: \"value\", options: {pretty: true})"
components:
  schemas:
    UserTaskListBase:
      $ref: '#/components/schemas/UserTaskListCompact'
    UserTaskListCompact:
      description: A user task list represents the tasks assigned to a particular user. It provides API access to a user’s [My Tasks](https://asana.com/guide/help/fundamentals/my-tasks) view in Asana.
      type: object
      properties:
        gid:
          description: Globally unique identifier of the resource, as a string.
          type: string
          readOnly: true
          example: '12345'
          x-insert-after: false
        resource_type:
          description: The base type of this resource.
          type: string
          readOnly: true
          example: user_task_list
          x-insert-after: gid
        name:
          description: The name of the user task list.
          type: string
          example: My Tasks in My Workspace
        owner:
          description: The owner of the user task list, i.e. the person whose My Tasks is represented by this resource.
          readOnly: true
          allOf:
          - $ref: '#/components/schemas/UserCompact'
        workspace:
          description: The workspace in which the user task list is located.
          readOnly: true
          allOf:
          - $ref: '#/components/schemas/WorkspaceCompact'
    UserCompact:
      description: A *user* object represents an account in Asana that can be given access to various workspaces, projects, and tasks.
      type: object
      properties:
        gid:
          description: Globally unique identifier of the resource, as a string.
          type: string
          readOnly: true
          example: '12345'
          x-insert-after: false
        resource_type:
          description: The base type of this resource.
          type: string
          readOnly: true
          example: user
          x-insert-after: gid
        name:
          type: string
          description: '*Read-only except when same user as requester*. The user’s name.'
          example: Greg Sanchez
    Error:
      type: object
      properties:
        message:
          type: string
          readOnly: true
          description: Message providing more detail about the error that occurred, if available.
          example: 'project: Missing input'
        help:
          type: string
          readOnly: true
          description: Additional information directing developers to resources on how to address and fix the problem, if available.
          example: 'For more information on API status codes and how to handle them, read the docs on errors: https://asana.github.io/developer-docs/#errors'''
        phrase:
          type: string
          readOnly: true
          description: '*500 errors only*. A unique error phrase which can be used when contacting developer support to help identify the exact occurrence of the problem in Asana’s logs.'
          example: 6 sad squid snuggle softly
    WorkspaceCompact:
      description: A *workspace* is the highest-level organizational unit in Asana. All projects and tasks have an associated workspace.
      type: object
      properties:
        gid:
          description: Globally unique identifier of the resource, as a string.
          type: string
          readOnly: true
          example: '12345'
          x-insert-after: false
        resource_type:
          description: The base type of this resource.
          type: string
          readOnly: true
          example: workspace
          x-insert-after: gid
        name:
          description: The name of the workspace.
          type: string
          example: My Company Workspace
    ErrorResponse:
      description: 'Sadly, sometimes requests to the API are not successful. Failures can

        occur for a wide range of reasons. In all cases, the API should return

        an HTTP Status Code that indicates the nature of the failure,

        with a response body in JSON format containing additional information.



        In the event of a server error the response body will contain an error

        phrase. These phrases are automatically generated using the

        [node-asana-phrase

        library](https://github.com/Asana/node-asana-phrase) and can be used by

        Asana support to quickly look up the incident that caused the server

        error.'
      type: object
      properties:
        errors:
          type: array
          items:
            $ref: '#/components/schemas/Error'
    UserTaskListResponse:
      $ref: '#/components/schemas/UserTaskListBase'
  responses:
    Forbidden:
      description: The authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    NotFound:
      description: Either the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Unauthorized:
      description: A valid authentication token was not provided with the request, so the API could not associate a user with the request.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    BadRequest:
      description: This usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    InternalServerError:
      description: There was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  parameters:
    user_task_list_path_gid:
      name: user_task_list_gid
      in: path
      description: Globally unique identifier for the user task list.
      required: true
      schema:
        type: string
      example: '12345'
      x-env-variable: user_task_list
    user_path_gid:
      name: user_gid
      in: path
      description: A string identifying a user. This can either be the string "me", an email, or the gid of a user.
      required: true
      schema:
        type: string
      x-env-variable: user
      example: me
    pretty:
      name: opt_pretty
      in: query
      description: 'Provides “pretty” output.

        Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.'
      required: false
      allowEmptyValue: true
      schema:
        type: boolean
      style: form
      example: true
  securitySchemes:
    personalAccessToken:
      type: http
      description: A personal access token for the Asana API.
      scheme: bearer
    oauth2:
      type: oauth2
      description: OAuth 2.0 authorization code flow.
      flows:
        authorizationCode:
          authorizationUrl: https://app.asana.com/-/oauth_authorize
          tokenUrl: https://app.asana.com/-/oauth_token
          scopes:
            default: Provides access to all endpoints documented in the API reference.