openapi: 3.0.0
info:
description: >-
This is the interface for interacting with the [Asana
Platform](https://developers.asana.com). Our API reference
is generated from our [OpenAPI spec]
(https://raw.githubusercontent.com/Asana/openapi/master/defs/asana_oas.yaml).
x-public-description: >-
This is the interface for interacting with the [Asana
Platform](https://developers.asana.com). Our API reference
is generated from our [OpenAPI spec]
(https://raw.githubusercontent.com/Asana/openapi/master/defs/asana_oas.yaml).
title: Asana
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
version: '1.0'
x-docs-schema-whitelist:
- AsanaResource
- AsanaNamedResource
- AuditLogEvent
- AttachmentResponse
- AttachmentCompact
- BatchResponse
- CustomFieldSettingResponse
- CustomFieldSettingCompact
- CustomFieldResponse
- CustomFieldCompact
- EnumOption
- EventResponse
- ErrorResponse
- GoalResponse
- GoalCompact
- GoalMembershipCompact
- GoalMembershipBase
- GoalMembershipResponse
- GoalRelationshipResponse
- GoalRelationshipCompact
- JobResponse
- JobCompact
- OrganizationExportResponse
- OrganizationExportCompact
- PortfolioMembershipResponse
- PortfolioMembershipCompact
- PortfolioResponse
- PortfolioCompact
- ProjectBriefResponse
- ProjectBriefCompact
- ProjectMembershipResponse
- ProjectMembershipCompact
- ProjectResponse
- ProjectCompact
- ProjectStatusResponse
- ProjectStatusCompact
- ProjectTemplateCompact
- ProjectTemplateResponse
- SectionResponse
- SectionCompact
- StatusUpdateResponse
- StatusUpdateCompact
- StoryResponse
- StoryCompact
- TagResponse
- TagCompact
- TaskResponse
- TaskCompact
- TaskCountResponse
- TeamMembershipResponse
- TeamMembershipCompact
- TeamResponse
- TeamCompact
- TimePeriodResponse
- TimePeriodCompact
- UserTaskListResponse
- UserTaskListCompact
- UserResponse
- UserCompact
- WebhookFilter
- WebhookResponse
- WebhookCompact
- WorkspaceMembershipResponse
- WorkspaceMembershipCompact
- WorkspaceResponse
- WorkspaceCompact
servers:
- url: https://app.asana.com/api/1.0
description: Main endpoint.
security:
- personalAccessToken: []
- oauth2: []
x-readme:
proxy-enabled: false
tags:
- name: Attachments
description: >-
An *attachment* object represents any file attached to a task in Asana,
whether it’s an uploaded file or one associated via a third-party service
such as Dropbox or Google Drive.
- name: Audit log API
description: >-
Asana's audit log is an immutable log of [important events](/docs/audit-log-events#supported-audit-log-events)
in your organization's Asana instance.
The audit log API allows you to monitor and act upon important security
and compliance-related changes. Organizations might use this API endpoint to:
* Set up proactive alerting with a Security Information and Event Management
(SIEM) tool like [Splunk](https://asana.com/guide/help/api/splunk)
* Conduct reactive investigations when a security incident takes place
* Visualize key domain data in aggregate to identify security trends
Note that since the API provides insight into what is happening in an Asana
instance, the data is [read-only](/reference/getauditlogevents). That is, there
are no "write" or "update" endpoints for audit log events.
Only [Service Accounts](https://asana.com/guide/help/premium/service-accounts)
in [Enterprise Domains](https://asana.com/enterprise) can access audit log API
endpoints. Authentication with a Service Account's
[personal access token](/docs/personal-access-token) is required.
For a full list of
supported events, see [supported AuditLogEvents](/docs/audit-log-events#supported-audit-log-events).
- name: Batch API
description: >-
There are many cases where you want to accomplish a variety of work in
the Asana API but want to minimize the number of HTTP requests you make.
For example:
* Modern browsers limit the number of requests that a single web page can
make at once.
* Mobile apps will use more battery life to keep the cellular radio on
when making a series of requests.
* There is an overhead cost to developing software that can make multiple
requests in parallel.
* Some cloud platforms handle parallelism poorly, or disallow it
entirely.
To make development easier in these use cases, Asana provides a **batch
API** that enables developers to perform multiple “actions” by making
only a single HTTP request.
#### Making a batch request
To make a batch request, send a `POST` request to `/batch`. Like other
`POST` endpoints, the body should contain a `data` envelope. Inside this
envelope should be a single `actions` field, containing a list of
“action” objects. Each action represents a standard request to an
existing endpoint in the Asana API.
**The maximum number of actions allowed in a single batch request is 10**.
Making a batch request with no actions in it will result in a `400 Bad
Request`.
When the batch API receives the list of actions to execute, it will
dispatch those actions to the already-implemented endpoints specified by
the `relative_path` and `method` for each action. This happens in
parallel, so all actions in the request will be processed simultaneously.
There is no guarantee of the execution order for these actions, nor is
there a way to use the output of one action as the input of another
action (such as creating a task and then commenting on it).
The response to the batch request will contain (within the `data`
envelope) a list of result objects, one for each action. The results are
guaranteed to be in the same order as the actions in the request (e.g.,
the first result in the response corresponds to the first action in the
request)
The batch API will always attempt to return a `200 Success` response with
individual result objects for each individual action in the request. Only
in certain cases (such as missing authorization or malformed JSON in the
body) will the entire request fail with another status code. Even if
every individual action in the request fails, the batch API will still
return a `200 Success` response, and each result object in the response
will contain the errors encountered with each action.
#### Rate limiting
The batch API fully respects all of our rate limiting. This means that a
batch request counts against *both* the standard rate limiter and the
concurrent request limiter as though you had made a separate HTTP request
for every individual action. For example, a batch request with five
actions counts as five separate requests in the standard rate limiter,
and counts as five concurrent requests in the concurrent request limiter.
The batch request itself incurs no cost.
If any of the actions in a batch request would exceed any of the enforced
limits, the *entire* request will fail with a `429 Too Many Requests`
error. This is to prevent the unpredictability of which actions might
succeed if not all of them could succeed.
#### Restrictions
Not every endpoint can be accessed through the batch API.
Specifically, the following actions cannot be taken and will result in a
`400 Bad Request` for that action:
* Uploading attachments
* Creating, getting, or deleting organization exports
* Any SCIM operations
* Nested calls to the batch API
- name: Custom fields
description: >-
_Note: Custom fields are a premium feature. Integrations which work
with custom fields need to handle an assortment of use cases for free and
premium users in context of free and premium organizations. For a detailed
examination of which data users will have access in different
circumstances, review the section below on access control._
In the Asana application, tasks, projects, and portfolios can hold
user-specified [custom fields](https://asana.com/guide/help/premium/custom-fields)
which provide extra information (e.g., a "priority" property with an associated
value, or a number representing the time required to complete a task). This
lets
a user define the type of information that each item within a project or portfolio
can contain in addition to the built-in fields that Asana provides.
`display_value` is a read-only field that will always be a string. For apps
that use custom fields, this is a great way to safely display/export the
value of a custom field, regardless of its type. We suggest apps use
this field in order to future-proof for changes to custom fields.
#### Characteristics of custom fields
* There is metadata that defines the custom field. This metadata can be
shared across an entire workspace, or be specific to a project or portfolio.
* Creating a custom field setting on a project or portfolio means each direct
child will have the custom field. This is conceptually akin to adding
columns in a database or a spreadsheet:
every task (row) in the project (table) can contain information for that
field, including "blank" values (i.e., `null` data). For portfolio custom
fields, every project (row) in the portfolio (table) will contain
information for the custom field.
* Custom field settings only go one child deep. This means that a custom field
setting on a portfolio will give each project the custom field, but not
each task within those projects.
* Tasks have custom field _values_ assigned to them.
#### Types of custom fields
Integrations using custom fields need to be aware of the six basic types that
a custom field can adopt. These types are:
* `text` - an arbitrary, relatively short string of text
* `number` - a number with a defined level of precision
* `enum` - a selection of a single option from a defined list of options (i.e.,
mutually exclusive selections)
* `multi_enum` - a selection of one or more options from a defined list of options
(i.e., mutually inclusive selections)
* `date` - a reference date with an optional time value
* `people` - a list of active contributors (i.e., where their relationship to
the work is defined in the custom field title)
#### Example use case
Consider an organization that has defined a custom field for "Priority".
This field is of `enum` type and can have user-defined values of
`Low`, `Medium`, or `High`. This is the field metadata, and it is
visible within, and shared across, the entire organization.
A project is then created in the organization, called "Bugs", and the
"Priority" custom field is associated with that project. This will allow
all tasks within the "Bugs" project to have an associated "Priority".
A new task is created within "Bugs". This task, then, has a field named
"Priority" which can take on the custom field value of one of `[null]`,
`Low`, `Medium`, and `High`.
#### Custom fields in the API
These custom fields are accessible via the API through a number of
endpoints at the top level (e.g. `/custom_fields` and
`/custom_field_settings`) and through requests on workspaces, portfolios,
projects, and tasks resources. The API also provides a way to fetch both the
metadata and data which define each particular custom field, so that a client
application may render proper UI to display or edit the values.
Text fields are currently limited to 1024 characters. On tasks, their
custom field value will have a `text_value` property to represent this
field.
Number fields can have an arbitrary `precision` associated with them; for
example, a precision of `2` would round its value to the second
(hundredths) place (e.g., `1.2345` would round to `1.23`). On tasks, the custom
field value will have a `number_value` property to represent this field.
#### Enum fields
Enum fields represent a selection from a list of options. On the metadata,
they will contain all of the options in an array. Each option has 4
properties:
* `gid` - the GID of this enum option. Note that this is the GID of the individual
_option_. The custom field itself has a separate `gid`.
* `name` - the name of the option (e.g., "Choice #1")
* `enabled` - whether this field is enabled. Disabled fields are not
available to choose from when disabled, and are visually hidden in the
Asana application, but they remain in the metadata for custom field values
which were set to the option before the option was disabled.
* `color` - a color associated with this choice.
On the task's custom field value, the enum will have an `enum_value`
property which will be the same as one of the choices from the list
defined in the custom field metadata.
#### Querying an organization for its custom fields
For custom fields shared across the workspace or organization, the
workspace [can be queried](/reference/getcustomfieldsforworkspace)
for its list of defined custom fields. Like other collection queries, the
fields will be returned as a compact record; slightly different from most
other compact records is the fact that the compact record for custom fields
includes `type` as well as `gid` and `name`.
#### Accessing custom field definitions
The [custom fields](/reference/getcustomfield) reference
describes how the metadata which defines a custom field is accessed. A
GET request with a `gid` can be issued on the `/custom_fields` endpoint
to fetch the full definition of a single custom field given its `gid`
from (for instance) listing all custom fields on a workspace, or getting
the `gid` from a custom field settings object or a task.
#### Associating custom fields with a project or portfolio
A mapping between a custom field and a project or portfolio is handled with
a
[custom field settings](/reference/custom-field-settings) object. This object
contains a reference for each
of the custom fields and the project or portfolio, as well as additional information
about the status of that particular custom field (e.g., `is_important`, which
defines
whether or not the custom field will appear in the list/grid on the Asana application).
#### Accessing custom field values on tasks or projects
The [tasks](/reference/gettask) reference has information on how custom fields
look on tasks. custom fields will return as an array on the
property `custom_fields`, and each entry will contain, side-by-side, the
compact representation of the custom field metadata and a
`{typename}_value` property that stores the value set for the
custom field.
Of particular note is that the top-level `gid` of each entry in the
`custom_fields` array is the `gid` of the custom field metadata, as it is
the compact representation of this metadata. This can be used to refer to
the full metadata by making a request to the
`/custom_fields/{custom_fields_id}` endpoint as described above.
Custom fields can be set just as in the Asana-defined fields on a task via
`POST` or `PUT` requests. You can see an example in the
[update a task](/reference/updatetask) endpoint.
Custom fields on projects follow this same pattern.
#### Warning: Program defensively with regards to custom field definitions
Asana application users have the ability to change the definitions of
custom field metadata. This means that as you write scripts or
applications to work with them, it is possible for the definitions to
change at any time, which may cause an application using them to break or
malfunction if it makes assumptions about the metadata for a particular
custom field. When using custom fields, it is a good idea to program
*defensively*, meaning you your application should double-check that
the custom field metadata are what it expects.
Storing the state of the custom field metadata for too long if you
dynamically create a model for it can cause your model to become
out of sync with the model stored in Asana. For example, if you encounter
an `enum` value on a task that does not match any option
in your metadata model, your metadata model has become out of date with
the custom field metadata.
#### Enabled and disabled values
When information that is contained in a custom field value loses a
logical association with its metadata definition, the value becomes
disabled. This can happen in a couple of simple ways, for example, if
you remove the custom field metadata from a project, or move a task with
a custom field to a different project which does not have the custom
field metadata associated with it. The value remains on the task, and
the custom field metadata can still be found and examined, but as the
context in which the custom field makes sense is gone, the custom field
cannot change its value; it can only be cleared.
_Note: Tasks that are associated with multiple projects do not become
disabled, so long as at least one of the projects is still associated
with the custom field metadata. In other words, tasks with multiple
projects will retain logically associated to the set of custom field
metadata represented by all of their projects._
Moving the task back under a project with that custom field applied to it
or applying the custom field metadata to the current project will return
the custom field value to an enabled state. In this scenario, the custom
field will be re-enabled and editable again.
In the Asana application, disabled fields are grayed out and not allowed
to change, other than to be discarded. In the API, we return a property
`enabled: false` to inform the external application that the value has
been disabled.
Note that the API enforces the same operations on disabled custom field
values as hold in the Asana application: they may not have their values
changed, since the lack of context for the values of a custom field in
general doesn't provide enough information to know what new values should
be. Setting the custom field value to `null` will clear and remove the
custom field value from the task.
#### Custom field access control
Custom fields are a complex feature of the Asana platform, and their
access in the Asana application and in the API vary based on the status
of the user and project. When building your application, it is best to be
defensive and not assume the given user will have read or write access
to a custom field, and fail gracefully when this occurs.
- name: Custom field settings
description: >-
Custom fields are attached to a particular project with the custom
field settings resource. This resource both represents the
many-to-many join of the custom field and project as well as stores
information that is relevant to that particular pairing. For instance,
the `is_important` property determines some possible
application-specific handling of that custom field.
- name: Events
description: >-
An event is an object representing a change to a resource that was
observed by an event subscription. Event streams rely on the same infrastructure
as webhooks, which ensures events are delivered within a minute (on average).
This
system is designed for at most once delivery, meaning in exceptional circumstances
a small number of events may be missing from the stream. For this reason, if
your use
case requires strong guarantees about processing all changes on a resource and
cannot
tolerate any missing events, regardless of how rare that might be, we recommend
building
a fallback polling system that fetches the resource periodically as well. Note
that while
webhooks cannot be replayed once delivered, events are retrievable from the
event stream
for 24 hours after being processed.
In general, requesting events on a resource is faster and subject to
higher rate limits than requesting the resource itself. Additionally,
change events "bubble up" (e.g., listening to events on a project would include
when stories are added to tasks in the project, and even to subtasks).
Establish an initial sync token by making a request with no sync token.
The response will be a `412 Precondition Failed` error - the same as if
the sync token had expired.
Subsequent requests should always provide the sync token from the
immediately preceding call.
Sync tokens may not be valid if you attempt to go "backward" in the
history by requesting previous tokens, though re-requesting the current
sync token is generally safe, and will always return the same results.
When you receive a `412 Precondition Failed` error, it means that the
sync token is either invalid or expired. If you are attempting to keep a
set of data in sync, this signals you may need to re-crawl the data.
Sync tokens always expire after 24 hours, but may expire sooner,
depending on load on the service.
- name: Goals
description: >-
A goal is an object in the goal-tracking system that helps your organization
drive measurable results.
- name: Goal relationships
description: >-
A goal relationship is an object representing the relationship between a goal
and another goal, a project, or a portfolio.
- name: Jobs
description: >-
Jobs represent processes that handle asynchronous work. A job created when an
endpoint requests an action
that will be handled asynchronously, such as project or task duplication.
Only the creator of the duplication process can access the duplication
status of the new object.
*Note*: With any work that is handled asynchronously
(e.g., [project instantation from a template](/reference/instantiateproject),
duplicating a [task](/reference/duplicatetask) or [project](/reference/duplicateproject),
etc.),
the *intermittent states* of newly-created objects may not be consistent. That
is, object properties may
return different values each time when polled until the job `status` has returned
a `succeeded` value.
- name: Organization exports
description: >-
An `organization_export` object represents a request to export the
complete data of an organization in JSON format.
To export an organization using this API:
* Create an `organization_export`
[request](/reference/createorganizationexport)
and store the ID that is returned.
* Request the `organization_export` every few minutes, until the
`state` field contains ‘finished’.
* Download the file located at the URL in the `download_url` field.
* Exports can take a long time, from several minutes to a few hours
for large organizations.
*Note: These endpoints are only available to [Service
Accounts](https://asana.com/guide/help/premium/service-accounts) of an
[Enterprise](https://asana.com/enterprise) organization.*
- name: Portfolios
description: >-
A portfolio gives a high-level overview of the status of multiple
initiatives in Asana. Portfolios provide a dashboard overview of the
state of multiple projects, including a progress report and the most
recent [status update](/reference/status-updates).
Portfolios have some restrictions on size. Each portfolio has a max of 500
items and, like projects, a maximum of 20 custom fields.
- name: Portfolio memberships
description: >-
This object determines if a user is a member of a portfolio.
- name: Projects
description: >-
A project represents a prioritized list of tasks in Asana or a board
with columns of tasks represented as cards. A project exists in a single
workspace or organization and is accessible to a subset of users in that
workspace or organization, depending on its permissions.
Projects in organizations are shared with a single team. Currently, the team
of a project cannot be changed via the API. Non-organization
workspaces do not have teams and so you should not specify the team of
project in a regular workspace.
Followers of a project are a subset of the members of that project.
Followers of a project will receive all updates including tasks
created, added and removed from that project. Members of the project
have access to and will receive status updates of the project. Adding
followers to a project will add them as members if they are not
already, removing followers from a project will not affect membership.
**Note:** You can use certain project endpoints to operate on
[user task lists](/reference/user-task-lists) ([My Tasks](https://asana.com/guide/help/fundamentals/my-tasks))
by substituting the `{project_gid}` with the `{user_task_list_gid}`. For example,
you can perform
operations on the custom fields of a user task list by using the following
projects endpoints: [Add a custom field to a project](/reference/addcustomfieldsettingforproject),
[Remove a custom field from a project](/reference/removecustomfieldsettingforproject)
and
[Get a project's custom fields](/reference/getcustomfieldsettingsforproject)
- name: Project briefs
description: >-
A project brief object represents a rich text document that describes
a project.
Please note that this API is in *preview*, and is expected to change.
This API is to be used for development and testing only as an advance
view into the upcoming rich text format experience in the task description.
For more information, see [this post](https://forum.asana.com/t/project-brief-api-now-available-as-a-preview/150885)
in the developer forum.
- name: Project memberships
description: >-
With the introduction of “comment-only” projects in Asana, a user’s
membership in a project comes with associated permissions. These
permissions (i.e., whether a user has full access to the project or
comment-only access) are accessible through the project memberships
endpoints described here.
- name: Project statuses
description: |-
*Deprecated: new integrations should prefer using [status updates](/reference/status-updates)*
A project status is an update on the progress of a particular project,
and is sent out to all project followers when created. These updates
include both text describing the update and a color code intended to
represent the overall state of the project: "green" for projects that
are on track, "yellow" for projects at risk, "red" for projects that
are behind, and "blue" for projects on hold.
Project statuses can be created and deleted, but not modified.
- name: Project templates
description: |-
A project template is an object that allows new projects to be created
with a predefined setup, which may include tasks, sections, rules, etc.
It simplifies the process of running a workflow that involves a similar
set of work every time.
Project templates in organizations are shared with a single team. Currently, the
team of a project template cannot be changed via the API.
- name: Sections
description: >-
A section is a subdivision of a project that groups tasks together.
It can either be a header above a list of tasks in a list view or a
column in a board view of a project.
Sections are largely a shared idiom in Asana’s API for both list and
board views of a project regardless of the project’s layout.
The ‘memberships’ property when [getting a task](/reference/gettask)
will return the information for the section or the column under
‘section’ in the response.
- name: Status updates
description: |-
A status update is an update on the progress of a particular object,
and is sent out to all followers when created. These updates
include both text describing the update and a `status_type` intended to
represent the overall state of the project. These include: `on_track` for projects that
are on track, `at_risk` for projects at risk, `off_track` for projects that
are behind, and `on_hold` for projects on hold.
Status updates can be created and deleted, but not modified.
- name: Stories
description: >-
*See [our forum post](https://forum.asana.com/t/no-more-parsing-story-text-new-fields-on-stories/42924)
for more info on when conditional fields are returned.*
A story represents an activity associated with an object in the
Asana system. Stories are generated by the system whenever users take
actions such as creating or assigning tasks, or moving tasks between
projects. "Comments" are also a form of user-generated story.
- name: Tags
description: >-
A tag is a label that can be attached to any task in Asana. It exists in
a single workspace or organization.
Tags have some metadata associated with them, but it is possible that
we will simplify them in the future so it is not encouraged to rely
too heavily on it. Unlike projects, tags do not provide any ordering
on the tasks they are associated with.
- name: Tasks
description: >-
The task is the basic object around which many operations in Asana are
centered. In the Asana application, multiple tasks populate the
middle pane according to some view parameters, and the set of selected
tasks determines the more detailed information presented in the
details pane.
Sections are unique in that they will be included in the `memberships`
field of task objects returned in the API when the task is within a
section. They can also be used to manipulate the ordering of a task
within a project.
[Queries](/reference/gettasks)
return a [compact representation of each task object](/reference/tasks). To
retrieve *all* fields or *specific set* of the fields, use
[field selectors](/docs/inputoutput-options) to manipulate what data is included
in a response.
- name: Teams
description: >-
A team is used to group related projects and people together within an
organization. Each project in an organization is associated with a team.
- name: Team memberships
description: >-
This object determines if a user is a member of a team.
- name: Time periods
description: >-
A time period is an object that represents a domain-scoped date range that can
be set on [goals](/reference/goals).
- name: Typeahead
description: >-
The typeahead search API provides search for objects from a single
workspace.
- name: Users
description: >-
A user object represents an account in Asana that can be given access to
various workspaces, projects, and tasks.
Like other objects in the system, users are referred to by numerical
IDs. However, the special string identifier `me` can be used anywhere
a user ID is accepted, to refer to the current authenticated user
(e.g, `GET /users/me`).
- 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.
- name: Webhooks
description: >-
Webhooks allow you to subscribe to notifications about events that occur on
Asana resources (e.g., tasks, projects, stories, etc.).
For a more detailed explanation of webhooks see the [overview of webhooks](/docs/webhooks-guide).
- name: Workspaces
description: >-
A *workspace* is the highest-level organizational unit in Asana. All
projects and tasks have an associated workspace.
An *organization* is a special kind of workspace that represents a
company. In an organization, you can group your projects into teams.
You can read more about how organizations work on the Asana Guide. To
tell if your workspace is an organization or not, check its
`is_organization` property.
Over time, we intend to migrate most workspaces into organizations and
to release more organization-specific functionality. We may eventually
deprecate using workspace-based APIs for organizations. Currently, and
until after some reasonable grace period following any further
announcements, you can still reference organizations in any
`workspace` parameter.
- name: Workspace memberships
description: >-
This object determines if a user is a member of a workspace.
components:
parameters:
fields:
name: opt_fields
in: query
description: >-
Defines fields to return.
Some requests return *compact* representations of objects in order to
conserve resources and complete the request more efficiently. Other times
requests return more information than you may need. This option allows
you to list the exact set of fields that the API should be sure to
return for the objects. The field names should be provided as paths,
described below.
The id of included objects will always be returned, regardless of the
field options.
example:
- followers
- assignee
required: false
schema:
type: array
items:
type: string
style: form
explode: false
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
limit:
name: limit
in: query
description: >-
Results per page.
The number of objects to return per page. The value must be between 1
and 100.
example: 50
schema:
type: integer
offset:
name: offset
in: query
description: >-
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.'
example: eyJ0eXAiOJiKV1iQLCJhbGciOiJIUzI1NiJ9
schema:
type: string
archived_query_param:
name: archived
in: query
description: >-
Only return projects whose `archived` field takes on the value of
this parameter.
schema:
type: boolean
example: false
attachment_path_gid:
name: attachment_gid
in: path
description: >-
Globally unique identifier for the attachment.
required: true
schema:
type: string
example: '12345'
x-env-variable: attachment
custom_field_path_gid:
name: custom_field_gid
in: path
description: >-
Globally unique identifier for the custom field.
required: true
schema:
type: string
example: '12345'
x-env-variable: custom_field
goal_path_gid:
name: goal_gid
in: path
description: >-
Globally unique identifier for the goal.
required: true
schema:
type: string
example: '12345'
x-env-variable: goal
goal_relationship_path_gid:
name: goal_relationship_gid
in: path
description: >-
Globally unique identifier for the goal relationship.
required: true
schema:
type: string
example: '12345'
x-env-variable: goal_relationship
job_path_gid:
name: job_gid
in: path
description: >-
Globally unique identifier for the job.
required: true
schema:
type: string
example: '12345'
x-env-variable: job
membership_path_gid:
name: membership_gid
in: path
description: >-
Globally unique identifier for the membership.
required: true
schema:
type: string
example: '12345'
x-env-variable: membership
organization_export_path_gid:
name: organization_export_gid
in: path
description: >-
Globally unique identifier for the organization export.
required: true
schema:
type: string
example: '12345'
x-env-variable: organization_export
project_brief_path_gid:
name: project_brief_gid
in: path
description: >-
Globally unique identifier for the project brief.
required: true
schema:
type: string
example: '12345'
x-env-variable: project_brief
project_path_gid:
name: project_gid
in: path
description: >-
Globally unique identifier for the project.
required: true
schema:
type: string
example: '1331'
x-env-variable: project
project_template_path_gid:
name: project_template_gid
in: path
description: >-
Globally unique identifier for the project template.
required: true
schema:
type: string
example: '1331'
x-env-variable: project_template
project_membership_path_gid:
name: project_membership_gid
in: path
required: true
schema:
type: string
example: '1331'
x-env-variable: project_membership
project_status_path_gid:
name: project_status_gid
in: path
required: true
description: The project status update to get.
schema:
type: string
example: '321654'
x-env-variable: project_status
status_path_gid:
name: status_gid
in: path
required: true
description: The status update to get.
schema:
type: string
example: '321654'
x-env-variable: status
portfolio_path_gid:
name: portfolio_gid
in: path
description: >-
Globally unique identifier for the portfolio.
required: true
schema:
type: string
example: '12345'
x-env-variable: portfolio
portfolio_membership_path_gid:
name: portfolio_membership_gid
in: path
required: true
schema:
type: string
example: '1331'
x-env-variable: portfolio_membership
portfolio_query_param:
name: portfolio
in: query
description: The portfolio to filter results on.
schema:
type: string
example: '12345'
x-env-variable: portfolio
section_path_gid:
name: section_gid
in: path
required: true
description: The globally unique identifier for the section.
schema:
type: string
example: '321654'
x-env-variable: section
story_path_gid:
name: story_gid
in: path
description: Globally unique identifier for the story.
required: true
schema:
type: string
example: '35678'
x-env-variable: story
tag_path_gid:
name: tag_gid
in: path
description: Globally unique identifier for the tag.
required: true
schema:
type: string
example: '11235'
x-env-variable: tag
task_path_gid:
name: task_gid
in: path
required: true
description: The task to operate on.
schema:
type: string
example: '321654'
x-env-variable: task
team_path_gid:
name: team_gid
in: path
description: Globally unique identifier for the team.
required: true
schema:
type: string
example: '159874'
x-env-variable: team
team_query_param:
name: team
in: query
description: The team to filter projects on.
schema:
type: string
example: '14916'
x-env-variable: team
team_membership_path_gid:
name: team_membership_gid
in: path
required: true
schema:
type: string
example: '724362'
x-env-variable: team_membership
time_period_path_gid:
name: time_period_gid
in: path
description: >-
Globally unique identifier for the time period.
required: true
schema:
type: string
example: '917392'
x-env-variable: time_period
user_query_param:
name: user
in: query
description: >-
A string identifying a user. This can either be the string "me", an email,
or the gid of a user.
schema:
type: string
x-env-variable: user
example: me
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
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
webhook_path_gid:
name: webhook_gid
in: path
description: >-
Globally unique identifier for the webhook.
required: true
schema:
type: string
example: '12345'
x-env-variable: webhook
workspace_path_gid:
name: workspace_gid
in: path
description: >-
Globally unique identifier for the workspace or organization.
required: true
schema:
type: string
example: '12345'
x-env-variable: workspace
workspace_query_param:
name: workspace
in: query
description: The workspace to filter results on.
schema:
type: string
example: '12345'
x-env-variable: workspace
workspace_membership_path_gid:
name: workspace_membership_gid
in: path
required: true
schema:
type: string
example: '12345'
x-env-variable: workspace_membership
audit_log_start_at:
name: start_at
in: query
description: Filter to events created after this time (inclusive).
required: false
schema:
type: string
format: date-time
audit_log_end_at:
name: end_at
in: query
description: Filter to events created before this time (exclusive).
required: false
schema:
type: string
format: date-time
audit_log_event_type:
name: event_type
in: query
description: >-
Filter to events of this type.
Refer to the [supported audit log events](/docs/audit-log-events#supported-audit-log-events)
for a full list of values.
required: false
schema:
type: string
audit_log_actor_type:
name: actor_type
in: query
description: >-
Filter to events with an actor of this type.
This only needs to be included if querying for actor types without an ID.
If `actor_gid` is included, this should be excluded.
required: false
schema:
type: string
enum:
- user
- asana
- asana_support
- anonymous
- external_administrator
audit_log_actor_gid:
name: actor_gid
in: query
description: >-
Filter to events triggered by the actor with this ID.
required: false
schema:
type: string
audit_log_resource_gid:
name: resource_gid
in: query
description: Filter to events with this resource ID.
required: false
schema:
type: string
completed_since:
name: completed_since
in: query
required: false
description: >
Only return tasks that are either incomplete or that have
been completed since this time. Accepts a date-time string or
the keyword *now*.
schema:
type: string
example: '2012-02-22T02:06:58.158Z'
member:
name: member
in: query
required: false
description: >
Member object gid can be user or team.
schema:
type: string
example: '123'
message_path_gid:
name: message_gid
in: path
required: true
description: The message to get.
schema:
type: string
example: '321654'
x-env-variable: message
responses:
GenericErrorResponse:
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.
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'
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'
PaymentRequired:
description: >-
The request was valid, but the queried object or object mutation
specified in the request is above your current premium level.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
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'
TooManyRequests:
description: >-
You have exceeded one of the enforced rate limits in the API. See the
[documentation on rate
limiting](https://developers.asana.com/docs/#rate-limits)
for more information.
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'
BadGateway:
description: >-
There is an issue between the load balancers and Asana's API.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
ServiceUnavailable:
description: >-
Either the upstream service is unavailable to the API, or the API has been
intentionally shut off.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
GatewayTimeout:
description: >-
This request took too long to complete.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
schemas:
AddCustomFieldSettingRequest:
type: object
required:
- custom_field
properties:
custom_field:
description: The custom field to associate with this container.
type: string
example: '14916'
is_important:
description: >-
Whether this field should be considered important to this container
(for instance, to display in the list view of items in the container).
type: boolean
example: true
insert_before:
description: >-
A gid of a Custom Field Setting on this container, before which the new
Custom Field Setting will be added. `insert_before` and `insert_after`
parameters cannot both be specified.
type: string
example: '1331'
insert_after:
description: >-
A gid of a Custom Field Setting on this container, after which the new
Custom Field Setting will be added. `insert_before` and `insert_after`
parameters cannot both be specified.
type: string
example: '1331'
AddFollowersRequest:
type: object
required:
- followers
properties:
followers:
description: >-
An array of strings identifying users. These can either be the string
"me", an email, or the gid of a user.
type: string
example: 521621,621373
AddMembersRequest:
type: object
required:
- members
properties:
members:
description: >-
An array of strings identifying users. These can either be the string
"me", an email, or the gid of a user.
type: string
example: 521621,621373
AsanaNamedResource:
allOf:
- $ref: '#/components/schemas/AsanaResource'
- type: object
properties:
name:
description: The name of the object.
type: string
example: Bug Task
AsanaResource:
description: >-
A generic Asana Resource, containing a globally unique identifier.
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: task
x-insert-after: gid
AttachmentBase:
$ref: '#/components/schemas/AttachmentCompact'
AttachmentCompact:
allOf:
- $ref: '#/components/schemas/AsanaResource'
- type: object
description: >-
An *attachment* object represents any file attached to a task in
Asana, whether it’s an uploaded file or one associated via a
third-party service such as Dropbox or Google Drive.
x-docs-overrides:
properties.resource_type.example: attachment
properties:
name:
description: The name of the file.
type: string
readOnly: true
example: Screenshot.png
resource_subtype:
description: >-
The service hosting the attachment. Valid values are `asana`,
`dropbox`, `gdrive`, `onedrive`, `box`, `vimeo`, and `external`.
type: string
example: dropbox
AttachmentRequest:
type: object
properties:
resource_subtype:
description: >
The type of the attachment. Must be one of the given values.
If not specified, a file attachment of type `asana`
will be assumed. Note that if the value of `resource_subtype` is `external`,
a
`parent`, `name`, and `url` must also be provided.
type: string
example: external
enum:
- asana
- dropbox
- gdrive
- onedrive
- box
- vimeo
- external
file:
description: >
Required for `asana` attachments.
type: string
format: binary
parent:
description: >
Required identifier of the parent task, project, or project_brief, as
a string.
type: string
url:
description: >
The URL of the external resource being attached. Required for
attachments of type `external`.
type: string
name:
description: >
The name of the external resource being attached. Required for
attachments of type `external`.
type: string
connect_to_app:
description: >
*Optional*. Only relevant for external attachments with a parent task.
A boolean indicating whether the current app should be connected with
the attachment for the purposes of showing an app components widget.
Requires the app to have been added to a project the parent task is in.
type: boolean
AttachmentResponse:
allOf:
- $ref: '#/components/schemas/AttachmentBase'
- type: object
properties:
created_at:
description: The time at which this resource was created.
type: string
format: date-time
readOnly: true
example: '2012-02-22T02:06:58.147Z'
download_url:
description: >-
The URL containing the content of the attachment.
*Note:* May be null if the attachment is hosted by
[Box](https://www.box.com/) and will be null if the attachment
is a Video Message hosted by [Vimeo](https://vimeo.com/). If
present, this URL may only be valid for two minutes from the
time of retrieval. You should avoid persisting this URL somewhere
and just refresh it on demand to ensure you do not keep stale URLs.
type: string
format: uri
readOnly: true
nullable: true
example: https://s3.amazonaws.com/assets/123/Screenshot.png
permanent_url:
description: >
type: string
format: uri
readOnly: true
nullable: true
example: https://s3.amazonaws.com/assets/123/Screenshot.png
host:
description: >-
The service hosting the attachment. Valid values are `asana`,
`dropbox`, `gdrive`, `box`, and `vimeo`.
type: string
readOnly: true
example: dropbox
parent:
allOf:
- $ref: '#/components/schemas/TaskCompact'
- type: object
description: The task this attachment is attached to.
readOnly: true
properties:
resource_subtype:
description: >-
The resource subtype of the parent resource that the filter
applies to.
type: string
example: default_task
nullable: true
size:
description: >-
The size of the attachment in bytes. Only present when the `resource_subtype`
is `asana`.
type: integer
readOnly: true
example: 12345
view_url:
description: >-
The URL where the attachment can be viewed, which may be
friendlier to users in a browser than just directing them to a raw
file. May be null if no view URL exists for the service.
type: string
format: uri
readOnly: true
nullable: true
example: https://www.dropbox.com/s/123/Screenshot.png
connected_to_app:
description: >-
Whether the attachment is connected to the app making the request
for the purposes of
showing an app components widget. Only present when the `resource_subtype`
is
`external` or `gdrive`.
type: boolean
readOnly: true
AuditLogEvent:
description: >-
An object representing a single event within an Asana domain.
Every audit log event is comprised of an `event_type`, `actor`, `resource`,
and `context`.
Some events will include additional metadata about the event under `details`.
See our [currently supported list of events](/docs/audit-log-events#supported-audit-log-events)
for more details.
type: object
properties:
gid:
description: >-
Globally unique identifier of the `AuditLogEvent`, as a string.
type: string
example: '12345'
x-insert-after: false
created_at:
description: The time the event was created.
type: string
format: date-time
example: '2021-01-01T00:00:00.000Z'
event_type:
description: The type of the event.
type: string
example: task_deleted
event_category:
description: The category that this `event_type` belongs to.
type: string
example: deletion
actor:
allOf:
- $ref: '#/components/schemas/AuditLogEventActor'
resource:
allOf:
- $ref: '#/components/schemas/AuditLogEventResource'
details:
allOf:
- $ref: '#/components/schemas/AuditLogEventDetails'
context:
allOf:
- $ref: '#/components/schemas/AuditLogEventContext'
AuditLogEventActor:
description: >-
The entity that triggered the event. Will typically be a user.
type: object
properties:
actor_type:
description: >-
The type of actor.
Can be one of `user`, `asana`, `asana_support`, `anonymous`, or `external_administrator`.
type: string
enum:
- user
- asana
- asana_support
- anonymous
- external_administrator
example: user
gid:
description: >-
Globally unique identifier of the actor, if it is a user.
type: string
example: '1111'
name:
description: The name of the actor, if it is a user.
type: string
example: Greg Sanchez
email:
description: The email of the actor, if it is a user.
type: string
example: gregsanchez@example.com
AuditLogEventContext:
description: The context from which this event originated.
type: object
properties:
context_type:
description: >-
The type of context.
Can be one of `web`, `desktop`, `mobile`, `asana_support`, `asana`, `email`,
or `api`.
type: string
enum:
- web
- desktop
- mobile
- asana_support
- asana
- email
- api
example: web
api_authentication_method:
description: >-
The authentication method used in the context of an API request.
Only present if the `context_type` is `api`. Can be one of `cookie`, `oauth`,
`personal_access_token`, or `service_account`.
type: string
enum:
- cookie
- oauth
- personal_access_token
- service_account
client_ip_address:
description: The IP address of the client that initiated the event, if applicable.
type: string
example: 1.1.1.1
user_agent:
description: The user agent of the client that initiated the event, if applicable.
type: string
example: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like
Gecko) Chrome/51.0.2704.103 Safari/537.36
oauth_app_name:
description: >-
The name of the OAuth App that initiated the event.
Only present if the `api_authentication_method` is `oauth`.
type: string
AuditLogEventDetails:
description: Event specific details. The schema will vary depending on the `event_type`.
type: object
AuditLogEventResource:
description: The primary object that was affected by this event.
type: object
properties:
resource_type:
description: The type of resource.
type: string
example: task
resource_subtype:
description: The subtype of resource. Most resources will not have a subtype.
type: string
example: milestone
gid:
description: Globally unique identifier of the resource.
type: string
example: '1111'
name:
description: The name of the resource.
type: string
example: Example Task
email:
description: The email of the resource, if applicable.
type: string
BatchRequest:
description: A request object for use in a batch request.
type: object
properties:
actions:
type: array
items:
$ref: '#/components/schemas/BatchRequestAction'
BatchRequestAction:
description: An action object for use in a batch request.
type: object
properties:
relative_path:
description: >-
The path of the desired endpoint relative to the API’s base URL. Query
parameters are not accepted here; put them in `data` instead.
type: string
example: /tasks/123
method:
description: The HTTP method you wish to emulate for the action.
type: string
enum:
- get
- post
- put
- delete
- patch
- head
example: get
data:
description: >-
For `GET` requests, this should be a map of query parameters you would
have normally passed in the URL. Options and pagination are not
accepted here; put them in `options` instead. For `POST`, `PATCH`, and
`PUT` methods, this should be the content you would have normally put
in the data field of the body.
type: object
example:
assignee: me
workspace: '1337'
options:
description: >-
Pagination (`limit` and `offset`) and output options (`fields` or
`expand`) for the action. “Pretty” JSON output is not an available
option on individual actions; if you want pretty output, specify that
option on the parent request.
type: object
properties:
limit:
description: Pagination limit for the request.
type: integer
example: 50
offset:
description: Pagination offset for the request.
type: integer
example: eyJ0eXAiOJiKV1iQLCJhbGciOiJIUzI1NiJ9
fields:
description: The fields to retrieve in the request.
type: array
items:
type: string
example:
- name
- gid
- notes
- completed
example:
limit: 3
fields:
- name
- notes
- completed
required:
- relative_path
- method
BatchResponse:
description: A response object returned from a batch request.
type: object
properties:
status_code:
description: The HTTP status code that the invoked endpoint returned.
type: integer
example: 200
headers:
description: >-
A map of HTTP headers specific to this result. This is primarily used
for returning a `Location` header to accompany a `201 Created`
result. The parent HTTP response will contain all common headers.
type: object
example:
location: /tasks/1234
body:
description: The JSON body that the invoked endpoint returned.
type: object
example:
data:
gid: '1967'
completed: false
name: Hello, world!
notes: How are you today?
CustomFieldBase:
allOf:
- $ref: '#/components/schemas/CustomFieldCompact'
- type: object
properties:
description:
description: >-
[Opt
In](/docs/inputoutput-options).
The description of the custom field.
type: string
example: Development team priority
enum_options:
description: >-
*Conditional*. Only relevant for custom fields of type `enum`.
This array specifies the possible values which an `enum` custom
field can adopt. To modify the enum options, refer to [working
with enum
options](/reference/createenumoptionforcustomfield).
type: array
items:
$ref: '#/components/schemas/EnumOption'
precision:
description: >-
Only relevant for custom fields of type ‘Number’. This field
dictates the number of places after the decimal to round to, i.e.
0 is integer values, 1 rounds to the nearest tenth, and so on.
Must be between 0 and 6, inclusive.
For percentage format, this may be unintuitive, as a value of 0.25
has a precision of 0, while a value of 0.251 has a precision of 1.
This is due to 0.25 being displayed as 25%.
The identifier format will always have a precision of 0.
type: integer
example: 2
format:
description: >-
The format of this custom field.
type: string
enum:
- currency
- identifier
- percentage
- custom
- none
example: custom
currency_code:
description: >-
ISO 4217 currency code to format this custom field. This will be
null if the `format` is not `currency`.
type: string
nullable: true
example: EUR
custom_label:
description: >-
This is the string that appears next to the custom field value.
This will be null if the `format` is not `custom`.
type: string
nullable: true
example: gold pieces
custom_label_position:
description: >-
Only relevant for custom fields with `custom` format. This depicts
where to place the custom label. This will be null if the `format`
is not `custom`.
type: string
enum:
- prefix
- suffix
example: suffix
is_global_to_workspace:
description: >-
This flag describes whether this custom field is available to
every container in the workspace. Before project-specific custom
fields, this field was always true.
type: boolean
example: true
readOnly: true
has_notifications_enabled:
description: >-
*Conditional*. This flag describes whether a follower of a task
with this field should receive inbox notifications from changes
to this field.
type: boolean
example: true
asana_created_field:
description: >-
*Conditional*. A unique identifier to associate this field with the
template source of truth.
type: string
readOnly: true
nullable: true
enum:
- a_v_requirements
- account_name
- actionable
- align_shipping_link
- align_status
- allotted_time
- appointment
- approval_stage
- approved
- article_series
- board_committee
- browser
- campaign_audience
- campaign_project_status
- campaign_regions
- channel_primary
- client_topic_type
- complete_by
- contact
- contact_email_address
- content_channels
- content_channels_needed
- content_stage
- content_type
- contract
- contract_status
- cost
- creation_stage
- creative_channel
- creative_needed
- creative_needs
- data_sensitivity
- deal_size
- delivery_appt
- delivery_appt_date
- department
- department_responsible
- design_request_needed
- design_request_type
- discussion_category
- do_this_task
- editorial_content_status
- editorial_content_tag
- editorial_content_type
- effort
- effort_level
- est_completion_date
- estimated_time
- estimated_value
- expected_cost
- external_steps_needed
- favorite_idea
- feedback_type
- financial
- funding_amount
- grant_application_process
- hiring_candidate_status
- idea_status
- ids_link
- ids_patient_link
- implementation_stage
- insurance
- interview_area
- interview_question_score
- itero_scan_link
- job_s_applied_to
- lab
- launch_status
- lead_status
- localization_language
- localization_market_team
- localization_status
- meeting_minutes
- meeting_needed
- minutes
- mrr
- must_localize
- name_of_foundation
- need_to_follow_up
- next_appointment
- next_steps_sales
- num_people
- number_of_user_reports
- office_location
- onboarding_activity
- owner
- participants_needed
- patient_date_of_birth
- patient_email
- patient_phone
- patient_status
- phone_number
- planning_category
- point_of_contact
- position
- post_format
- prescription
- priority
- priority_level
- product
- product_stage
- progress
- project_size
- project_status
- proposed_budget
- publish_status
- reason_for_scan
- referral
- request_type
- research_status
- responsible_department
- responsible_team
- risk_assessment_status
- room_name
- sales_counterpart
- sentiment
- shipping_link
- social_channels
- stage
- status
- status_design
- status_of_initiative
- system_setup
- task_progress
- team
- team_marketing
- team_responsible
- time_it_takes_to_complete_tasks
- timeframe
- treatment_type
- type_work_requests_it
- use_agency
- user_name
- vendor_category
- vendor_type
- word_count
example: priority
CustomFieldCompact:
allOf:
- $ref: '#/components/schemas/AsanaResource'
- type: object
description: >-
Custom Fields store the metadata that is used in order to
add user-specified information to tasks in Asana. Be sure
to reference the [custom fields](/reference/custom-fields)
developer documentation for more information about how custom fields
relate to various resources in Asana.
Users in Asana can [lock custom fields](https://asana.com/guide/help/premium/custom-fields#gl-lock-fields),
which will make them read-only when accessed by other users.
Attempting to edit a locked custom field will return HTTP error code
`403 Forbidden`.
x-docs-overrides:
properties.resource_type.example: custom_field
properties:
name:
description: The name of the custom field.
type: string
example: Status
resource_subtype:
description: >
The type of the custom field. Must be one of the given values.
type: string
example: text
enum:
- text
- enum
- multi_enum
- number
- date
- people
type:
description: >
*Deprecated: new integrations should prefer the resource_subtype
field.* The type of the custom field. Must be one of the given
values.
type: string
readOnly: true
enum:
- text
- enum
- multi_enum
- number
enum_options:
description: >-
*Conditional*. Only relevant for custom fields of type `enum`.
This array specifies the possible values which an `enum` custom
field can adopt. To modify the enum options, refer to [working
with enum
options](/reference/createenumoptionforcustomfield).
type: array
items:
$ref: '#/components/schemas/EnumOption'
enabled:
description: >-
*Conditional*. Determines if the custom field is enabled or not.
type: boolean
example: true
date_value:
description: >-
*Conditional*. Only relevant for custom fields of type `date`.
This object reflects the chosen date (and optionally, time) value
of a `date` custom field. If no date is selected, the value of
`date_value` will be `null`.
type: object
properties:
date:
type: string
description: >-
A string representing the date in YYYY-MM-DD format.
example: '2024-08-23'
date_time:
type: string
description: >-
A string representing the date in ISO 8601 format. If no time
value
is selected, the value of `date-time` will be `null`.
example: '2024-08-23T22:00:00.000Z'
enum_value:
allOf:
- $ref: '#/components/schemas/EnumOption'
- type: object
description: >-
*Conditional*. Only relevant for custom fields of type
`enum`. This object is the chosen value of an `enum` custom
field.
multi_enum_values:
description: >-
*Conditional*. Only relevant for custom fields of type
`multi_enum`. This object is the chosen values of a `multi_enum` custom
field.
type: array
items:
$ref: '#/components/schemas/EnumOption'
number_value:
description: >-
*Conditional*. This number is the value of a `number` custom field.
type: number
example: 5.2
text_value:
description: >-
*Conditional*. This string is the value of a `text` custom field.
type: string
example: Some Value
display_value:
description: >-
A string representation for the value of the custom field.
Integrations that don't require the underlying type should
use this field to read values. Using this field will future-proof
an app against new custom field types.
type: string
readOnly: true
example: blue
nullable: true
CustomFieldRequest:
allOf:
- $ref: '#/components/schemas/CustomFieldBase'
- type: object
required:
- workspace
properties:
workspace:
type: string
description: >-
*Create-Only* The workspace to create a custom field in.
example: '1331'
owned_by_app:
type: boolean
description: >-
*Allow-listed*. Instructs the API that this Custom Field is
app-owned. This parameter is allow-listed to specific apps at this
point in time. For apps that are not allow-listed, providing this
parameter will result in a `403 Forbidden`.
people_value:
description: >-
*Conditional*. Only relevant for custom fields of type `people`.
This array of user GIDs reflects the users to be written to a `people`
custom field. Note that *write* operations will replace existing users
(if any) in the custom field with the users specified in this array.
type: array
items:
type: string
description: >-
The GID of a user.
example:
- '12345'
CustomFieldResponse:
allOf:
- $ref: '#/components/schemas/CustomFieldBase'
- type: object
properties:
created_by:
$ref: '#/components/schemas/UserCompact'
nullable: true
people_value:
description: >-
*Conditional*. Only relevant for custom fields of type `people`.
This array of [compact user](/reference/users) objects reflects the
values
of a `people` custom field.
type: array
items:
$ref: '#/components/schemas/UserCompact'
CustomFieldSettingBase:
$ref: '#/components/schemas/CustomFieldSettingCompact'
CustomFieldSettingCompact:
allOf:
- $ref: '#/components/schemas/AsanaResource'
- type: object
description: >-
Custom Fields Settings objects represent the many-to-many join of the
Custom Field and Project as well as stores information that is
relevant to that particular pairing.
x-docs-overrides:
properties.resource_type.example: custom_field_setting
CustomFieldSettingResponse:
allOf:
- $ref: '#/components/schemas/CustomFieldSettingBase'
- type: object
properties:
project:
allOf:
- $ref: '#/components/schemas/ProjectCompact'
- type: object
description: >-
*Deprecated: new integrations should prefer the `parent`
field.* The id of the project that this custom field settings
refers to.
readOnly: true
is_important:
description: >-
`is_important` is used in the Asana web application to determine
if this custom field is displayed in the list/grid view of a project
or portfolio.
type: boolean
readOnly: true
example: false
parent:
allOf:
- $ref: '#/components/schemas/ProjectCompact'
- type: object
description: >-
The parent to which the custom field is applied. This can be a
project or portfolio and indicates that the tasks or projects
that the parent contains may be given custom field values for
this custom field.
readOnly: true
custom_field:
allOf:
- $ref: '#/components/schemas/CustomFieldResponse'
- type: object
description: >-
The custom field that is applied to the `parent`.
readOnly: true
EmptyResponse:
type: object
description: >-
An empty object. Some endpoints do not return an object on success. The
success is conveyed through a 2-- status code and returning an empty
object.
EnumOption:
allOf:
- $ref: '#/components/schemas/AsanaResource'
- type: object
description: >-
Enum options are the possible values which an enum custom field can
adopt. An enum custom field must contain at least 1 enum option but no
more than 500.
You can add enum options to a custom field by using the `POST
/custom_fields/custom_field_gid/enum_options` endpoint.
**It is not possible to remove or delete an enum option**. Instead,
enum options can be disabled by updating the `enabled` field to false
with the `PUT /enum_options/enum_option_gid` endpoint. Other
attributes can be updated similarly.
On creation of an enum option, `enabled` is always set to `true`,
meaning the enum option is a selectable value for the custom field.
Setting `enabled=false` is equivalent to “trashing” the enum option in
the Asana web app within the “Edit Fields” dialog. The enum option
will no longer be selectable but, if the enum option value was
previously set within a task, the task will retain the value.
Enum options are an ordered list and by default new enum options are
inserted at the end. Ordering in relation to existing enum options can
be specified on creation by using `insert_before` or `insert_after` to
reference an existing enum option. Only one of `insert_before` and
`insert_after` can be provided when creating a new enum option.
An enum options list can be reordered with the `POST
/custom_fields/custom_field_gid/enum_options/insert` endpoint.
x-docs-overrides:
properties.resource_type.example: enum_option
properties:
name:
description: The name of the enum option.
type: string
example: Low
enabled:
description: >-
Whether or not the enum option is a selectable value for the
custom field.
type: boolean
example: true
color:
description: >-
The color of the enum option. Defaults to ‘none’.
type: string
example: blue
EnumOptionBase:
$ref: '#/components/schemas/EnumOption'
EnumOptionInsertRequest:
type: object
required:
- enum_option
properties:
enum_option:
type: string
description: The gid of the enum option to relocate.
example: '97285'
before_enum_option:
type: string
description: >-
An existing enum option within this custom field
before which the new enum option should be
inserted. Cannot be provided together with
after_enum_option.
example: '12345'
after_enum_option:
type: string
description: >-
An existing enum option within this custom field
after which the new enum option should be inserted.
Cannot be provided together with
before_enum_option.
example: '12345'
EnumOptionRequest:
allOf:
- $ref: '#/components/schemas/EnumOptionBase'
- type: object
properties:
insert_before:
type: string
description: >-
An existing enum option within this custom field
before which the new enum option should be
inserted. Cannot be provided together with
after_enum_option.
example: '12345'
insert_after:
type: string
description: >-
An existing enum option within this custom field
after which the new enum option should be inserted.
Cannot be provided together with
before_enum_option.
example: '12345'
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
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'
EventResponse:
description: |-
An *event* is an object representing a change to a resource that was
observed by an event subscription or delivered asynchronously to
the target location of an active webhook.
The event may be triggered by a different `user` than the
subscriber. For example, if user A subscribes to a task and user B
modified it, the event’s user will be user B. Note: Some events
are generated by the system, and will have `null` as the user. API
consumers should make sure to handle this case.
The `resource` that triggered the event may be different from the one
that the events were requested for or the webhook is subscribed to. For
example, a subscription to a project will contain events for tasks
contained within the project.
**Note:** pay close attention to the relationship between the fields
`Event.action` and `Event.change.action`.
`Event.action` represents the action taken on the resource
itself, and `Event.change.action` represents how the information
within the resource's fields have been modified.
For instance, consider these scenarios:
* When at task is added to a project, `Event.action` will be
`added`, `Event.parent` will be an object with the `id` and
`type` of the project, and there will be no `change` field.
* When an assignee is set on the task, `Event.parent` will be
`null`, `Event.action` will be `changed`,
`Event.change.action` will be `changed`, and `new_value` will
be an object with the user's `id` and `type`.
* When a collaborator is added to the task, `Event.parent` will
be `null`, `Event.action` will be `changed`,
`Event.change.action` will be `added`, and `added_value` will be
an object with the user's `id` and `type`.
type: object
properties:
user:
allOf:
- $ref: '#/components/schemas/UserCompact'
- description: >-
The user who triggered the event.
resource:
allOf:
- $ref: '#/components/schemas/AsanaNamedResource'
- description: >-
The resource which has triggered the event by being modified in
some way.
type:
description: >-
*Deprecated: Refer to the resource_type of the resource.*
The type of the resource that generated the event.
type: string
readOnly: true
example: task
action:
description: >-
The type of action taken on the **resource** that triggered the
event. This can be one of `changed`, `added`, `removed`, `deleted`,
or `undeleted` depending on the nature of the event.
type: string
readOnly: true
example: changed
parent:
allOf:
- $ref: '#/components/schemas/AsanaNamedResource'
- description: >-
For added/removed events, the parent object that resource was
added to or removed from. The parent will be `null` for other
event types.
created_at:
description: The timestamp when the event occurred.
type: string
format: date-time
readOnly: true
example: '2012-02-22T02:06:58.147Z'
change:
type: object
description: >-
Information about the type of change that has occurred. This field
is only present when the value of the property `action`, describing
the action taken on the **resource**, is `changed`.
readOnly: true
properties:
field:
description: The name of the field that has changed in the resource.
type: string
readOnly: true
example: assignee
action:
description: >-
The type of action taken on the **field** which has been
changed. This can be one of `changed`, `added`, or `removed`
depending on the nature of the change.
type: string
readOnly: true
example: changed
new_value:
description: >-
*Conditional.* This property is only present when the
**field's** `action` is `changed` _and_ the `new_value` is an
Asana resource. This will be only the `gid` and `resource_type`
of the resource when the events come from webhooks; this will
be the compact representation (and can have fields expanded
with [opt_fields](/docs/inputoutput-options)) when using the
[get events](/reference/getevents) endpoint.
example:
gid: '12345'
resource_type: user
added_value:
description: >-
*Conditional.* This property is only present when the
**field's** `action` is `added` _and_ the `added_value` is an
Asana resource. This will be only the `gid` and `resource_type`
of the resource when the events come from webhooks; this will
be the compact representation (and can have fields expanded
with [opt_fields](/docs/inputoutput-options)) when using the
[get events](/reference/getevents) endpoint.
example:
gid: '12345'
resource_type: user
removed_value:
description: >-
*Conditional.* This property is only present when the
**field's** `action` is `removed` _and_ the `removed_value` is an
Asana resource. This will be only the `gid` and `resource_type`
of the resource when the events come from webhooks; this will
be the compact representation (and can have fields expanded
with [opt_fields](/docs/inputoutput-options)) when using the
[get events](/reference/getevents) endpoint.
example:
gid: '12345'
resource_type: user
GoalAddSubgoalRequest:
type: object
required:
- subgoal
properties:
subgoal:
description: >-
The goal gid to add as subgoal to a parent goal
type: string
example: '1331'
insert_before:
description: >-
An id of a subgoal of this parent goal. The new
subgoal will be added before the one specified here.
`insert_before` and `insert_after` parameters cannot both
be specified.
type: string
example: '1331'
insert_after:
description: >-
An id of a subgoal of this parent goal. The new
subgoal will be added after the one specified here.
`insert_before` and `insert_after` parameters cannot both
be specified.
type: string
example: '1331'
GoalAddSupportingWorkRequest:
type: object
required:
- supporting_work
properties:
supporting_work:
description: >-
The project/portfolio gid to add as supporting work for a goal
type: string
example: '1331'
GoalBase:
allOf:
- $ref: '#/components/schemas/AsanaResource'
- type: object
x-docs-overrides:
properties.resource_type.example: goal
properties:
name:
type: string
description: The name of the goal.
example: Grow web traffic by 30%
html_notes:
type: string
description: >-
The notes of the goal with formatting as HTML.
example:
Start building brand awareness.
notes:
type: string
description: >-
Free-form textual information associated with the
goal (i.e. its description).
example: Start building brand awareness.
due_on:
type: string
description: >-
The localized day on which this goal is due. This takes a
date with format `YYYY-MM-DD`.
example: '2019-09-15'
nullable: true
start_on:
type: string
description: >-
The day on which work for this goal begins, or null if the
goal has no start date. This takes a date with `YYYY-MM-DD`
format, and cannot be set unless there is an accompanying due date.
example: '2019-09-14'
nullable: true
status:
type: string
description: >-
The current status of this goal. When the goal is open, its status
can be `green`, `yellow`, and `red` to reflect "On Track", "At Risk",
and "Off Track", respectively. When the goal is closed, the value
can be `missed`, `achieved`, `partial`, or `dropped`.
*Note* you can only write to this property if `metric` is set.
example: green
nullable: true
is_workspace_level:
type: boolean
description: >-
*Conditional*. This property is only present when the `workspace`
provided is an organization. Whether the goal belongs to the `workspace`
(and is listed as part of the workspace’s goals) or not. If it isn’t
a workspace-level goal, it is a team-level goal, and is associated
with the goal’s team.
example: true
liked:
type: boolean
description: >-
True if the goal is liked by the authorized user, false if not.
example: false
GoalCompact:
allOf:
- $ref: '#/components/schemas/AsanaResource'
- type: object
x-docs-overrides:
properties.resource_type.example: goal
properties:
name:
type: string
description: The name of the goal.
example: Grow web traffic by 30%
owner:
allOf:
- $ref: '#/components/schemas/UserCompact'
- type: object
nullable: true
GoalMetricBase:
allOf:
- $ref: '#/components/schemas/AsanaResource'
- type: object
properties:
resource_subtype:
description: >-
The subtype of this resource. Different subtypes retain many of the
same fields and behavior, but may render differently in Asana or
represent resources with different semantic meaning.
type: string
readOnly: true
example: number
enum:
- number
precision:
description: >-
*Conditional*. Only relevant for goal metrics of type ‘Number’. This
field
dictates the number of places after the decimal to round to, i.e.
0 is integer values, 1 rounds to the nearest tenth, and so on.
Must be between 0 and 6, inclusive.
For percentage format, this may be unintuitive, as a value of 0.25
has a precision of 0, while a value of 0.251 has a precision of 1.
This is due to 0.25 being displayed as 25%.
type: integer
example: 2
unit:
description: >-
A supported unit of measure for the goal metric, or none.
type: string
enum:
- none
- currency
- percentage
currency_code:
description: >-
ISO 4217 currency code to format this custom field. This will be
null if the `unit` is not `currency`.
type: string
nullable: true
example: EUR
initial_number_value:
description: >-
This number is the start value of a goal metric of
type number.
type: number
example: 5.2
target_number_value:
description: >-
This number is the end value of a goal metric of
type number. This number cannot equal `initial_number_value`.
type: number
example: 10.2
current_number_value:
description: >-
This number is the current value of a goal metric of
type number.
type: number
example: 8.12
current_display_value:
description: >-
This string is the current value of a goal metric of
type string.
type: string
readOnly: true
example: '8.12'
progress_source:
description: >-
This field defines how the progress value of a goal metric is being
calculated.
A goal's progress can be provided manually by the user,
calculated automatically from contributing subgoals or projects,
or managed by an integration with an external data source, such as
Salesforce.
type: string
enum:
- manual
- subgoal_progress
- project_task_completion
- project_milestone_completion
- external
example: manual
GoalRemoveSupportingRelationshipRequest:
type: object
required:
- supporting_resource
properties:
supporting_resource:
description: >-
The gid of the supporting resource to remove from the parent goal. Must
be the gid of a goal, project, or portfolio.
type: string
example: '12345'
GoalAddSupportingRelationshipRequest:
type: object
required:
- supporting_resource
properties:
supporting_resource:
description: >-
The gid of the supporting resource to add to the parent goal. Must be
the gid of a goal, project, or portfolio.
type: string
example: '12345'
insert_before:
description: >-
An id of a subgoal of this parent goal. The new
subgoal will be added before the one specified here.
`insert_before` and `insert_after` parameters cannot both
be specified. Currently only supported when adding a subgoal.
type: string
example: '1331'
insert_after:
description: >-
An id of a subgoal of this parent goal. The new
subgoal will be added after the one specified here.
`insert_before` and `insert_after` parameters cannot both
be specified. Currently only supported when adding a subgoal.
type: string
example: '1331'
contribution_weight:
description: The weight that the supporting resource's progress will contribute
to the supported goal's progress. This can only be 0 or 1.
type: number
example: 1
GoalMetricCurrentValueRequest:
allOf:
- $ref: '#/components/schemas/AsanaResource'
- type: object
properties:
current_number_value:
description: >-
*Conditional*. This number is the current value of a goal metric of
type number.
type: number
example: 8.12
GoalMetricRequest:
$ref: '#/components/schemas/GoalMetricBase'
GoalRemoveSubgoalRequest:
type: object
required:
- subgoal
properties:
subgoal:
description: >-
The goal gid to remove as subgoal from the parent goal
type: string
example: '1331'
GoalRequest:
allOf:
- $ref: '#/components/schemas/GoalBase'
- type: object
properties:
team:
type: string
description: >-
*Conditional*. This property is only present when the `workspace`
provided is an organization.
example: '12345'
nullable: true
workspace:
type: string
description: >-
The `gid` of a workspace.
example: '12345'
followers:
type: array
items:
type: string
description: >-
The `gid` of a user.
example:
- '12345'
time_period:
type: string
description: >-
The `gid` of a time period.
example: '12345'
nullable: true
owner:
type: string
description: >-
The `gid` of a user.
example: '12345'
nullable: true
GoalResponse:
allOf:
- $ref: '#/components/schemas/GoalBase'
- type: object
properties:
likes:
description: >-
Array of likes for users who have liked this goal.
type: array
items:
$ref: '#/components/schemas/Like'
readOnly: true
num_likes:
description: >-
The number of users who have liked this goal.
type: integer
readOnly: true
example: 5
team:
allOf:
- $ref: '#/components/schemas/TeamCompact'
- type: object
nullable: true
description: >-
*Conditional*. This property is only present when the `workspace`
provided is an organization.
workspace:
allOf:
- $ref: '#/components/schemas/WorkspaceCompact'
- type: object
followers:
type: array
items:
$ref: '#/components/schemas/UserCompact'
description: >-
Array of users who are members of this goal.
time_period:
allOf:
- $ref: '#/components/schemas/TimePeriodCompact'
- type: object
nullable: true
metric:
allOf:
- $ref: '#/components/schemas/GoalMetricBase'
- type: object
nullable: true
properties:
can_manage:
description: >-
*Conditional*. Only relevant for `progress_source` of type
`external`.
This boolean indicates whether the requester has the ability
to update the current value of this metric.
This returns `true` if the external metric was created by
the requester, `false` otherwise.
type: boolean
readOnly: true
example: true
owner:
allOf:
- $ref: '#/components/schemas/UserCompact'
- type: object
nullable: true
current_status_update:
description: The latest `status_update` posted to this goal.
nullable: true
allOf:
- $ref: '#/components/schemas/StatusUpdateCompact'
GoalRelationshipBase:
allOf:
- $ref: '#/components/schemas/GoalRelationshipCompact'
- type: object
properties:
supported_goal:
allOf:
- $ref: '#/components/schemas/GoalCompact'
- type: object
readOnly: true
description: >-
The goal that the supporting resource supports.
GoalRelationshipCompact:
allOf:
- $ref: '#/components/schemas/AsanaResource'
- type: object
description: >-
A *goal relationship* is an object representing the relationship between
a goal and another goal, a project, or a portfolio.
x-docs-overrides:
properties.resource_type.example: goal_relationship
properties:
resource_subtype:
description: >-
The subtype of this resource. Different subtypes retain many of the
same fields and behavior, but may render differently in Asana or
represent resources with different semantic meaning.
type: string
readOnly: true
example: subgoal
enum:
- subgoal
- supporting_work
supporting_resource:
allOf:
- $ref: '#/components/schemas/ProjectCompact'
- type: object
readOnly: true
description: >-
The supporting resource that supports the goal. This can be either
a project, portfolio, or goal.
contribution_weight:
description: The weight that the supporting resource's progress contributes
to the supported goal's progress. This can only be 0 or 1.
type: number
example: 1
GoalRelationshipRequest:
allOf:
- $ref: '#/components/schemas/GoalRelationshipBase'
- type: object
GoalRelationshipResponse:
allOf:
- $ref: '#/components/schemas/GoalRelationshipBase'
- type: object
JobBase:
$ref: '#/components/schemas/JobCompact'
JobCompact:
allOf:
- $ref: '#/components/schemas/AsanaResource'
- type: object
description: >-
A *job* is an object representing a process that handles asynchronous
work.
x-docs-overrides:
properties.resource_type.example: job
properties:
resource_subtype:
description: >-
The subtype of this resource. Different subtypes retain many of the
same fields and behavior, but may render differently in Asana or
represent resources with different semantic meaning.
type: string
readOnly: true
example: duplicate_task
status:
description: >-
The current status of this job. The value is one of: `not_started`,
`in_progress`, `succeeded`, or `failed`.
type: string
enum:
- not_started
- in_progress
- succeeded
- failed
readOnly: true
example: in_progress
new_project:
$ref: '#/components/schemas/ProjectCompact'
new_task:
$ref: '#/components/schemas/TaskCompact'
new_project_template:
$ref: '#/components/schemas/ProjectTemplateCompact'
JobResponse:
$ref: '#/components/schemas/JobBase'
Like:
type: object
description: >-
An object to represent a user's like.
properties:
gid:
description: >-
Globally unique identifier of the object, as a string.
type: string
readOnly: true
example: '12345'
user:
$ref: '#/components/schemas/UserCompact'
MemberCompact:
allOf:
- $ref: '#/components/schemas/AsanaResource'
- type: object
description: A *member* object represents either a team or user.
x-docs-overrides:
properties.resource_type.example: member
properties:
name:
type: string
description: The name of the member
example: Greg Sanchez
resource_type:
type: string
description: The type of the member (team or user)
example: user
ModifyDependenciesRequest:
type: object
properties:
dependencies:
description: An array of task gids that a task depends on.
type: array
items:
type: string
example:
dependencies:
- '133713'
- '184253'
ModifyDependentsRequest:
description: A set of dependent tasks.
type: object
properties:
dependents:
description: An array of task gids that are dependents of the given task.
type: array
items:
type: string
example:
dependents:
- '133713'
- '184253'
OrganizationExportBase:
$ref: '#/components/schemas/OrganizationExportCompact'
OrganizationExportCompact:
allOf:
- $ref: '#/components/schemas/AsanaResource'
- type: object
description: >-
An *organization_export* object represents a request to export the
complete data of an Organization in JSON format.
x-docs-overrides:
properties.resource_type.example: organization_export
properties:
created_at:
description: The time at which this resource was created.
type: string
format: date-time
readOnly: true
example: '2012-02-22T02:06:58.147Z'
download_url:
description: |-
Download this URL to retreive the full export of the organization
in JSON format. It will be compressed in a gzip (.gz) container.
*Note: May be null if the export is still in progress or
failed. If present, this URL may only be valid for 1 hour from
the time of retrieval. You should avoid persisting this URL
somewhere and rather refresh on demand to ensure you do not keep
stale URLs.*
type: string
format: uri
readOnly: true
nullable: true
example: >-
https://asana-export.s3.amazonaws.com/export-4632784536274-20170127-43246.json.gz?AWSAccessKeyId=xxxxxxxx
state:
description: The current state of the export.
type: string
enum:
- pending
- started
- finished
- error
readOnly: true
example: started
organization:
$ref: '#/components/schemas/WorkspaceCompact'
OrganizationExportRequest:
type: object
description: >-
An *organization_export* request starts a job to export the complete
data of the given Organization.
properties:
organization:
description: >-
Globally unique identifier for the workspace or organization.
type: string
example: '1331'
OrganizationExportResponse:
$ref: '#/components/schemas/OrganizationExportBase'
PortfolioAddItemRequest:
type: object
required:
- item
properties:
item:
description: >-
The item to add to the portfolio.
type: string
example: '1331'
insert_before:
description: >-
An id of an item in this portfolio. The new
item will be added before the one specified here.
`insert_before` and `insert_after` parameters cannot both
be specified.
type: string
example: '1331'
insert_after:
description: >-
An id of an item in this portfolio. The new
item will be added after the one specified here.
`insert_before` and `insert_after` parameters cannot both
be specified.
type: string
example: '1331'
PortfolioBase:
allOf:
- $ref: '#/components/schemas/PortfolioCompact'
- type: object
properties:
color:
description: Color of the portfolio.
type: string
enum:
- dark-pink
- dark-green
- dark-blue
- dark-red
- dark-teal
- dark-brown
- dark-orange
- dark-purple
- dark-warm-gray
- light-pink
- light-green
- light-blue
- light-red
- light-teal
- light-brown
- light-orange
- light-purple
- light-warm-gray
example: light-green
PortfolioCompact:
allOf:
- $ref: '#/components/schemas/AsanaResource'
- type: object
description: >-
A *portfolio* gives a high-level overview of the status of multiple
initiatives in Asana. Portfolios provide a dashboard overview of
the state of multiple projects, including a progress report and the
most recent [project
status](/reference/project-statuses)
update.
Portfolios have some restrictions on size. Each portfolio has a max of
500 items and, like projects, a max of 20 custom fields.
x-docs-overrides:
properties.resource_type.example: portfolio
properties:
name:
description: The name of the portfolio.
type: string
example: Bug Portfolio
PortfolioMembershipBase:
$ref: '#/components/schemas/PortfolioMembershipCompact'
PortfolioMembershipCompact:
allOf:
- $ref: '#/components/schemas/AsanaResource'
- type: object
description: >-
This object determines if a user is a member of a portfolio.
x-docs-overrides:
properties.resource_type.example: portfolio_membership
properties:
portfolio:
description: >-
[Opt In](/docs/inputoutput-options).
The portfolio the user is a member of.
$ref: '#/components/schemas/PortfolioCompact'
user:
$ref: '#/components/schemas/UserCompact'
PortfolioMembershipResponse:
$ref: '#/components/schemas/PortfolioMembershipBase'
PortfolioRemoveItemRequest:
type: object
required:
- item
properties:
item:
description: >-
The item to remove from the portfolio.
type: string
example: '1331'
PortfolioRequest:
allOf:
- $ref: '#/components/schemas/PortfolioBase'
- type: object
properties:
members:
readOnly: true
type: array
description: >-
An array of strings identifying users. These can either be the
string "me", an email, or the gid of a user.
items:
type: string
description: >-
Gid of an object.
example:
- '52164'
- '15363'
workspace:
type: string
description: >-
Gid of an object.
example: '167589'
public:
type: boolean
description: >-
True if the portfolio is public to its workspace members.
example: false
PortfolioResponse:
allOf:
- $ref: '#/components/schemas/PortfolioBase'
- type: object
properties:
created_at:
description: The time at which this resource was created.
type: string
format: date-time
readOnly: true
example: '2012-02-22T02:06:58.147Z'
created_by:
$ref: '#/components/schemas/UserCompact'
custom_field_settings:
description: Array of custom field settings applied to the portfolio.
type: array
items:
$ref: '#/components/schemas/CustomFieldSettingResponse'
current_status_update:
description: The latest `status_update` posted to this portfolio.
nullable: true
allOf:
- $ref: '#/components/schemas/StatusUpdateCompact'
due_on:
description: >-
The localized day on which this portfolio is due. This takes a
date with format YYYY-MM-DD.
type: string
format: date-time
nullable: true
example: '2019-09-15'
custom_fields:
description: Array of Custom Fields.
type: array
items:
$ref: '#/components/schemas/CustomFieldCompact'
members:
type: array
readOnly: true
items:
$ref: '#/components/schemas/UserCompact'
owner:
$ref: '#/components/schemas/UserCompact'
start_on:
description: >-
The day on which work for this portfolio begins, or null if the
portfolio has no start date. This takes a date with `YYYY-MM-DD`
format. *Note: `due_on` must be present in the
request when setting or unsetting the `start_on` parameter.
Additionally, `start_on` and `due_on` cannot be the same date.*
type: string
format: date
nullable: true
example: '2019-09-14'
workspace:
allOf:
- $ref: '#/components/schemas/WorkspaceCompact'
- type: object
description: >-
*Create-only*. The workspace or organization that the
portfolio belongs to.
permalink_url:
type: string
readOnly: true
description: >-
A url that points directly to the object within Asana.
example: https://app.asana.com/0/resource/123456789/list
public:
description: >-
True if the portfolio is public to its workspace members.
type: boolean
example: false
Preview:
type: object
description: >-
A collection of rich text that will be displayed as a preview to another
app.
This is read-only except for a small group of whitelisted apps.
readOnly: true
properties:
fallback:
description: Some fallback text to display if unable to display the full
preview.
type: string
example: >-
Greg: Great! I like this
idea.\n\nhttps//a_company.slack.com/archives/ABCDEFG/12345678
footer:
description: Text to display in the footer.
type: string
example: Mar 17, 2019 1:25 PM
header:
description: Text to display in the header.
type: string
example: Asana for Slack
header_link:
description: Where the header will link to.
type: string
example: https://asana.comn/apps/slack
html_text:
description: HTML formatted text for the body of the preview.
type: string
example: Great! I like this idea.
text:
description: Text for the body of the preview.
type: string
example: Great! I like this idea.
title:
description: Text to display as the title.
type: string
example: Greg
title_link:
description: Where to title will link to.
type: string
example: https://asana.slack.com/archives/ABCDEFG/12345678
ProjectBase:
allOf:
- $ref: '#/components/schemas/ProjectCompact'
- type: object
properties:
archived:
description: >-
True if the project is archived, false if not. Archived projects
do not show in the UI by default and may be treated differently
for queries.
type: boolean
example: false
color:
description: Color of the project.
type: string
nullable: true
enum:
- dark-pink
- dark-green
- dark-blue
- dark-red
- dark-teal
- dark-brown
- dark-orange
- dark-purple
- dark-warm-gray
- light-pink
- light-green
- light-blue
- light-red
- light-teal
- light-brown
- light-orange
- light-purple
- light-warm-gray
example: light-green
created_at:
description: The time at which this resource was created.
type: string
format: date-time
readOnly: true
example: '2012-02-22T02:06:58.147Z'
current_status:
description: >-
*Deprecated: new integrations should prefer the `current_status_update`
resource.*
nullable: true
allOf:
- $ref: '#/components/schemas/ProjectStatusResponse'
current_status_update:
description: The latest `status_update` posted to this project.
nullable: true
allOf:
- $ref: '#/components/schemas/StatusUpdateCompact'
custom_field_settings:
description: Array of Custom Field Settings (in compact form).
readOnly: true
type: array
items:
$ref: '#/components/schemas/CustomFieldSettingResponse'
default_view:
description: The default view (list, board, calendar, or timeline) of
a project.
type: string
enum:
- list
- board
- calendar
- timeline
example: calendar
due_date:
description: >-
*Deprecated: new integrations should prefer the `due_on` field.*
type: string
nullable: true
format: date-time
example: '2019-09-15'
due_on:
description: >-
The day on which this project is due. This takes a date with
format YYYY-MM-DD.
type: string
nullable: true
format: date-time
example: '2019-09-15'
html_notes:
description: >-
[Opt In](/docs/inputoutput-options).
The notes of the project with formatting as HTML.
type: string
example: These are things we need to purchase.
members:
description: Array of users who are members of this project.
type: array
items:
$ref: '#/components/schemas/UserCompact'
readOnly: true
modified_at:
description: >-
The time at which this project was last modified.
*Note: This does not currently reflect any changes in
associations such as tasks or comments that may have been added or
removed from the project.*
type: string
readOnly: true
format: date-time
example: '2012-02-22T02:06:58.147Z'
notes:
description: >-
Free-form textual information associated with the
project (ie., its description).
type: string
example: These are things we need to purchase.
public:
description: >-
True if the project is public to its team.
type: boolean
example: false
start_on:
description: >-
The day on which work for this project begins, or null if the
project has no start date. This takes a date with `YYYY-MM-DD`
format. *Note: `due_on` or `due_at` must be present in the
request when setting or unsetting the `start_on` parameter.
Additionally, `start_on` and `due_on` cannot be the same date.*
type: string
nullable: true
format: date
example: '2019-09-14'
workspace:
allOf:
- $ref: '#/components/schemas/WorkspaceCompact'
- type: object
readOnly: true
description: >-
*Create-only*. The workspace or organization this project is
associated with. Once created, projects cannot be moved to a
different workspace. This attribute can only be specified at
creation time.
ProjectBriefBase:
allOf:
- $ref: '#/components/schemas/ProjectBriefCompact'
- type: object
properties:
title:
description: >-
The title of the project brief.
type: string
example: Stuff to buy — Project Brief
html_text:
description: >-
HTML formatted text for the project brief.
type: string
example: This is a project brief.
ProjectBriefCompact:
allOf:
- $ref: '#/components/schemas/AsanaResource'
- type: object
description: >-
A *Project Brief* allows you to explain the what and why of the project
to
your team.
x-docs-overrides:
properties.resource_type.example: project_brief
ProjectBriefRequest:
allOf:
- $ref: '#/components/schemas/ProjectBriefBase'
- type: object
properties:
text:
description: >-
The plain text of the project brief. When writing to a project
brief, you can specify either `html_text` (preferred) or `text`,
but not both.
type: string
example: This is a project brief.
ProjectBriefResponse:
allOf:
- $ref: '#/components/schemas/ProjectBriefBase'
- type: object
properties:
text:
description: >-
[Opt In](/docs/inputoutput-options).
The plain text of the project brief.
type: string
example: This is a project brief.
permalink_url:
type: string
readOnly: true
description: >-
A url that points directly to the object within Asana.
example: https://app.asana.com/0/11111111/22222222
project:
allOf:
- $ref: '#/components/schemas/ProjectCompact'
- type: object
description: >-
The project with which this project brief is associated.
ProjectCompact:
allOf:
- $ref: '#/components/schemas/AsanaResource'
- type: object
description: >-
A *project* represents a prioritized list of tasks in Asana or a board
with columns of tasks represented as cards. It exists in a single
workspace or organization and is accessible to a subset of users in
that workspace or organization, depending on its permissions.
x-docs-overrides:
properties.resource_type.example: project
properties:
name:
description: >-
Name of the project. This is generally a short sentence fragment
that fits on a line in the UI for maximum readability. However, it
can be longer.
type: string
example: Stuff to buy
ProjectDuplicateRequest:
type: object
required:
- name
properties:
name:
description: The name of the new project.
type: string
example: New Project Name
team:
description: >-
Sets the team of the new project. If team is not defined,
the new project will be in the same team as the the
original project.
type: string
example: '12345'
include:
description: >-
The elements that will be duplicated to the new project.
Tasks are always included.
type: string
enum:
- members
- notes
- forms
- task_notes
- task_assignee
- task_subtasks
- task_attachments
- task_dates
- task_dependencies
- task_followers
- task_tags
- task_projects
example:
- members
- task_notes
schedule_dates:
description: >-
A dictionary of options to auto-shift dates.
`task_dates` must be included to use this option.
Requires either `start_on` or `due_on`, but not both.
type: object
required:
- should_skip_weekends
properties:
should_skip_weekends:
description: >-
Determines if the auto-shifted dates should skip weekends.
type: boolean
example: true
due_on:
description: >-
Sets the last due date in the duplicated project to the given
date. The rest of the due dates will be offset by the same amount
as the due dates in the original project.
type: string
example: '2019-05-21'
start_on:
description: >-
Sets the first start date in the duplicated project to the given
date. The rest of the start dates will be offset by the same amount
as the start dates in the original project.
type: string
example: '2019-05-21'
ProjectMembershipBase:
$ref: '#/components/schemas/ProjectMembershipCompact'
ProjectMembershipCompact:
allOf:
- $ref: '#/components/schemas/AsanaResource'
- type: object
description: >-
With the introduction of “comment-only” projects in Asana, a user’s
membership in a project comes with associated permissions. These
permissions (whether a user has full access to the project or
comment-only access) are accessible through the project memberships
endpoints described here.
x-docs-overrides:
properties.resource_type.example: project_membership
properties:
user:
$ref: '#/components/schemas/UserCompact'
ProjectMembershipResponse:
allOf:
- $ref: '#/components/schemas/ProjectMembershipBase'
- type: object
properties:
project:
description: >-
[Opt
In](/docs/inputoutput-options).
The project the user is a member of.
$ref: '#/components/schemas/ProjectCompact'
member:
description: Member can be a user or a team.
$ref: '#/components/schemas/MemberCompact'
resource_type:
description: Type of the membership.
type: string
example: project_membership
write_access:
description: >-
Whether the member has full access, edit access, or comment-only
access to the project.
type: string
enum:
- full_write
- editor
- comment_only
readOnly: true
example: full_write
ProjectRequest:
allOf:
- $ref: '#/components/schemas/ProjectBase'
- type: object
properties:
custom_fields:
description: >-
An object where each key is a Custom Field GID and each value is
an enum GID, string, number, or object.
type: object
additionalProperties:
type: string
description: >-
"{custom_field_gid}" => Value (Can be text, number, etc.)
example:
5678904321: On Hold
4578152156: Not Started
followers:
description: >-
*Create-only*. Comma separated string of users. Followers
are a subset of members who have opted in to receive "tasks
added" notifications for a project.
type: string
example: 12345,23456
owner:
description: >-
The current owner of the project, may be null.
nullable: true
type: string
example: '12345'
team:
description: >-
The team that this project is shared with.
type: string
example: '12345'
ProjectResponse:
allOf:
- $ref: '#/components/schemas/ProjectBase'
- type: object
properties:
custom_fields:
description: Array of Custom Fields.
readOnly: true
type: array
items:
$ref: '#/components/schemas/CustomFieldCompact'
completed:
description: >-
True if the project is currently marked complete, false if not.
type: boolean
readOnly: true
example: false
completed_at:
description: >-
The time at which this project was completed, or null if the project
is not completed.
type: string
format: date-time
readOnly: true
nullable: true
example: '2012-02-22T02:06:58.147Z'
completed_by:
description: >-
The user that marked this project complete, or null if the project
is not completed.
readOnly: true
nullable: true
$ref: '#/components/schemas/UserCompact'
followers:
description: >-
Array of users following this project. Followers are a subset
of members who have opted in to receive "tasks added"
notifications for a project.
type: array
items:
$ref: '#/components/schemas/UserCompact'
readOnly: true
owner:
description: >-
The current owner of the project, may be null.
nullable: true
allOf:
- $ref: '#/components/schemas/UserCompact'
team:
allOf:
- $ref: '#/components/schemas/TeamCompact'
- type: object
description: >-
The team that this project is shared with.
icon:
description: >-
The icon for a project.
type: string
nullable: true
enum:
- list
- board
- timeline
- calendar
- rocket
- people
- graph
- star
- bug
- light_bulb
- globe
- gear
- notebook
- computer
- check
- target
- html
- megaphone
- chat_bubbles
- briefcase
- page_layout
- mountain_flag
- puzzle
- presentation
- line_and_symbols
- speed_dial
- ribbon
- shoe
- shopping_basket
- map
- ticket
- coins
example: chat_bubbles
permalink_url:
type: string
readOnly: true
description: >-
A url that points directly to the object within Asana.
example: https://app.asana.com/0/resource/123456789/list
project_brief:
allOf:
- $ref: '#/components/schemas/ProjectBriefCompact'
- type: object
description: >-
[Opt In](/docs/inputoutput-options).
The project brief associated with this project.
nullable: true
created_from_template:
allOf:
- $ref: '#/components/schemas/ProjectTemplateCompact'
- type: object
description: >-
[Opt In](/docs/inputoutput-options).
The project template from which this project was created. If the
project was
not created from a template, this field will be null.
nullable: true
ProjectSectionInsertRequest:
type: object
properties:
project:
description: The project in which to reorder the given section.
type: string
example: '123456'
section:
description: The section to reorder.
type: string
example: '321654'
before_section:
description: >-
Insert the given section immediately before the section
specified by this parameter.
type: string
example: '86420'
after_section:
description: >-
Insert the given section immediately after the section
specified by this parameter.
type: string
example: '987654'
required:
- project
- section
ProjectStatusBase:
allOf:
- $ref: '#/components/schemas/ProjectStatusCompact'
- type: object
required:
- text
- color
properties:
text:
description: The text content of the status update.
type: string
example: The project is moving forward according to plan...
html_text:
description: >-
[Opt
In](/docs/inputoutput-options).
The text content of the status update with formatting as HTML.
type: string
example: >-
The project is moving forward according to
plan...
color:
description: The color associated with the status update.
type: string
enum:
- green
- yellow
- red
- blue
ProjectStatusCompact:
allOf:
- $ref: '#/components/schemas/AsanaResource'
- type: object
description: >-
*Deprecated: new integrations should prefer the `status_update` resource.*
A *project status* is an update on the progress of a particular
project, and is sent out to all project followers when created. These
updates include both text describing the update and a color code
intended to represent the overall state of the project: "green" for
projects that are on track, "yellow" for projects at risk, and "red"
for projects that are behind.
x-docs-overrides:
properties.resource_type.example: project_status
properties:
title:
description: The title of the project status update.
type: string
example: Status Update - Jun 15
ProjectStatusRequest:
$ref: '#/components/schemas/ProjectStatusBase'
ProjectStatusResponse:
allOf:
- $ref: '#/components/schemas/ProjectStatusBase'
- type: object
properties:
author:
$ref: '#/components/schemas/UserCompact'
created_at:
description: The time at which this resource was created.
type: string
format: date-time
readOnly: true
example: '2012-02-22T02:06:58.147Z'
created_by:
$ref: '#/components/schemas/UserCompact'
modified_at:
description: >-
The time at which this project status was last modified.
*Note: This does not currently reflect any changes in
associations such as comments that may have been added or
removed from the project status.*
type: string
format: date-time
readOnly: true
example: '2012-02-22T02:06:58.147Z'
ProjectTemplateCompact:
allOf:
- $ref: '#/components/schemas/AsanaResource'
- type: object
description: >-
A *project template* is an object that allows new projects to be created
with a predefined setup, which may include tasks, sections, Rules, etc.
It simplifies the process of running a workflow that involves a similar
set of work every time.
x-docs-overrides:
properties.resource_type.example: project_template
properties:
name:
description: >-
Name of the project template.
type: string
example: Packing list
ProjectTemplateBase:
allOf:
- $ref: '#/components/schemas/ProjectTemplateCompact'
- type: object
properties:
description:
description: >-
Free-form textual information associated with the
project template
type: string
example: These are things we need to pack for a trip.
html_description:
description: >-
The description of the project template with formatting as HTML.
type: string
example: These are things we need to pack for a trip.
public:
description: >-
True if the project template is public to its team.
type: boolean
example: false
owner:
description: >-
The current owner of the project template, may be null.
nullable: true
allOf:
- $ref: '#/components/schemas/UserCompact'
team:
allOf:
- $ref: '#/components/schemas/TeamCompact'
requested_dates:
description: >-
Array of date variables in this project template. Calendar dates
must be provided for these variables when instantiating a project.
type: array
items:
$ref: '#/components/schemas/DateVariableCompact'
readOnly: true
color:
description: Color of the project template.
type: string
nullable: true
enum:
- dark-pink
- dark-green
- dark-blue
- dark-red
- dark-teal
- dark-brown
- dark-orange
- dark-purple
- dark-warm-gray
- light-pink
- light-green
- light-blue
- light-red
- light-teal
- light-brown
- light-orange
- light-purple
- light-warm-gray
example: light-green
requested_roles:
description: >-
Array of template roles in this project template. User Ids can be
provided
for these variables when instantiating a project to assign template
tasks to
the user.
type: array
items:
$ref: '#/components/schemas/TemplateRole'
ProjectTemplateResponse:
allOf:
- $ref: '#/components/schemas/ProjectTemplateBase'
ProjectTemplateInstantiateProjectRequest:
type: object
required:
- name
- public
properties:
name:
description: The name of the new project.
type: string
example: New Project Name
team:
description: >-
*Optional*. Sets the team of the new project. If the project template
exists in an
_organization_, you may specify a value for `team`. If no value is provided
then it
defaults to the same team as the project template.
type: string
example: '12345'
public:
description: >-
Sets the project to public to its team.
type: boolean
example: true
is_strict:
description: >-
*Optional*. If set to `true`, the endpoint returns an "Unprocessable Entity"
error
if you fail to provide a calendar date value for any date variable. If
set to
`false`, a default date is used for each unfulfilled date variable (e.g.,
the
current date is used as the Start Date of a project).
type: boolean
example: true
requested_dates:
description: >-
Array of mappings of date variables to calendar dates.
type: array
items:
$ref: '#/components/schemas/DateVariableRequest'
requested_roles:
description: >-
Array of mappings of template roles to user ids
type: array
items:
$ref: '#/components/schemas/RequestedRoleRequest'
DateVariableCompact:
type: object
properties:
gid:
description: >-
Globally unique identifier of the date field in the project template.
A value of
`1` refers to the project start date, while `2` refers to the project
due date.
type: string
readOnly: true
example: '1'
name:
description: >-
The name of the date variable.
type: string
readOnly: true
example: Start Date
description:
description: >-
The description of what the date variable is used for when instantiating
a project.
type: string
readOnly: true
example: Choose a start date for your project.
DateVariableRequest:
type: object
properties:
gid:
description: >-
Globally unique identifier of the date field in the project template.
A value of
`1` refers to the project start date, while `2` refers to the project
due date.
type: string
example: '1'
value:
description: >-
The date with which the date variable should be replaced when instantiating
a project.
This takes a date with `YYYY-MM-DD` format.
type: string
nullable: true
format: date-time
example: '2022-01-01'
RequestedRoleRequest:
type: object
properties:
gid:
description: >-
Globally unique identifier of the template role in the project template.
type: string
example: '1'
value:
description: >-
The user id that should be assigned to the template role.
type: string
example: '123'
ProjectSaveAsTemplateRequest:
type: object
required:
- name
- public
properties:
name:
description: The name of the new project template.
type: string
example: New Project Template
team:
description: >-
Sets the team of the new project template. If the project exists in an
organization, specify team and not workspace.
type: string
example: '12345'
workspace:
description: >-
Sets the workspace of the new project template. Only specify workspace
if the
project exists in a workspace.
type: string
example: '12345'
public:
description: >-
Sets the project template to public to its team.
type: boolean
example: true
RemoveCustomFieldSettingRequest:
type: object
required:
- custom_field
properties:
custom_field:
description: The custom field to remove from this portfolio.
type: string
example: '14916'
RemoveFollowersRequest:
type: object
required:
- followers
properties:
followers:
description: >-
An array of strings identifying users. These can either be the string
"me", an email, or the gid of a user.
type: string
example: 521621,621373
RemoveMembersRequest:
type: object
required:
- members
properties:
members:
description: >-
An array of strings identifying users. These can either be the string
"me", an email, or the gid of a user.
type: string
example: 521621,621373
SectionBase:
$ref: '#/components/schemas/SectionCompact'
SectionCompact:
allOf:
- $ref: '#/components/schemas/AsanaResource'
- type: object
description: >-
A *section* is a subdivision of a project that groups tasks together.
It can either be a header above a list of tasks in a list view or a
column in a board view of a project.
x-docs-overrides:
properties.resource_type.example: section
properties:
name:
description: >-
The name of the section (i.e. the text displayed as the section
header).
type: string
example: Next Actions
SectionRequest:
type: object
properties:
name:
description: >-
The text to be displayed as the section name. This cannot be
an empty string.
type: string
example: Next Actions
insert_before:
description: >-
An existing section within this project before which the added
section should be inserted. Cannot be provided together with
insert_after.
type: string
example: '86420'
insert_after:
description: >-
An existing section within this project after which the added
section should be inserted. Cannot be provided together with
insert_before.
type: string
example: '987654'
required:
- project
- name
SectionResponse:
allOf:
- $ref: '#/components/schemas/SectionBase'
- type: object
properties:
created_at:
description: The time at which this resource was created.
type: string
format: date-time
readOnly: true
example: '2012-02-22T02:06:58.147Z'
project:
$ref: '#/components/schemas/ProjectCompact'
projects:
description: >-
*Deprecated - please use project instead*
type: array
readOnly: true
items:
$ref: '#/components/schemas/ProjectCompact'
SectionTaskInsertRequest:
type: object
properties:
task:
description: The task to add to this section.
type: string
example: '123456'
insert_before:
description: >-
An existing task within this section before which the added
task should be inserted. Cannot be provided together with
insert_after.
type: string
example: '86420'
insert_after:
description: >-
An existing task within this section after which the added
task should be inserted. Cannot be provided together with
insert_before.
type: string
example: '987654'
required:
- task
StatusUpdateBase:
allOf:
- $ref: '#/components/schemas/StatusUpdateCompact'
- type: object
required:
- text
- status_type
properties:
text:
description: The text content of the status update.
type: string
example: The project is moving forward according to plan...
html_text:
description: >-
[Opt
In](/docs/inputoutput-options).
The text content of the status update with formatting as HTML.
type: string
example: >-
The project is moving forward according to
plan...
status_type:
description: The type associated with the status update. This represents
the current state of the object this object is on.
type: string
enum:
- on_track
- at_risk
- off_track
- on_hold
- complete
- achieved
- partial
- missed
- dropped
StatusUpdateCompact:
allOf:
- $ref: '#/components/schemas/AsanaResource'
- type: object
description: >-
A *status update* is an update on the progress of a particular
project, portfolio, or goal, and is sent out to all of its parent's
followers when created. These
updates include both text describing the update and a `status_type`
intended to represent the overall state of the project.
x-docs-overrides:
properties.resource_type.example: status_update
properties:
title:
description: The title of the status update.
type: string
example: Status Update - Jun 15
resource_subtype:
type: string
description: >-
The subtype of this resource. Different subtypes retain many of
the same fields and behavior, but may render differently in Asana
or represent resources with different semantic meaning.
The `resource_subtype`s for `status` objects represent the type of
their parent.
enum:
- project_status_update
- portfolio_status_update
- goal_status_update
example: project_status_update
readOnly: true
StatusUpdateRequest:
allOf:
- $ref: '#/components/schemas/StatusUpdateBase'
- type: object
required:
- parent
properties:
parent:
allOf:
- type: string
description: >-
The id of parent to send this status update to. This can be a
project,
goal or portfolio.
StatusUpdateResponse:
allOf:
- $ref: '#/components/schemas/StatusUpdateBase'
- type: object
properties:
author:
$ref: '#/components/schemas/UserCompact'
created_at:
description: The time at which this resource was created.
type: string
format: date-time
readOnly: true
example: '2012-02-22T02:06:58.147Z'
created_by:
$ref: '#/components/schemas/UserCompact'
hearted:
description: >-
*Deprecated - please use liked instead* True if the status is
hearted by the authorized user, false if not.
type: boolean
example: true
readOnly: true
hearts:
description: >-
*Deprecated - please use likes instead* Array of likes for users
who have hearted this status.
type: array
items:
$ref: '#/components/schemas/Like'
readOnly: true
liked:
description: >-
True if the status is liked by the authorized user, false if not.
type: boolean
example: true
likes:
description: Array of likes for users who have liked this status.
type: array
items:
$ref: '#/components/schemas/Like'
readOnly: true
modified_at:
description: >-
The time at which this project status was last modified.
*Note: This does not currently reflect any changes in
associations such as comments that may have been added or
removed from the status.*
type: string
format: date-time
readOnly: true
example: '2012-02-22T02:06:58.147Z'
num_hearts:
description: >-
*Deprecated - please use likes instead* The number of users who
have hearted this status.
type: integer
example: 5
readOnly: true
num_likes:
description: The number of users who have liked this status.
type: integer
example: 5
readOnly: true
parent:
allOf:
- $ref: '#/components/schemas/ProjectCompact'
- type: object
description: >-
The parent of the status update. This can be a project,
goal or portfolio, and indicates that this status was sent
on that object.
StoryBase:
allOf:
- $ref: '#/components/schemas/AsanaResource'
- type: object
description: >-
A story represents an activity associated with an object in the Asana
system.
x-docs-overrides:
properties.resource_type.example: story
properties:
created_at:
description: The time at which this resource was created.
type: string
format: date-time
readOnly: true
example: '2012-02-22T02:06:58.147Z'
resource_subtype:
description: >-
The subtype of this resource. Different subtypes retain many of the
same fields and behavior, but may render differently in Asana or
represent resources with different semantic meaning.
type: string
readOnly: true
example: comment_added
text:
description: The plain text of the comment to add. Cannot be used with
html_text.
type: string
example: This is a comment.
html_text:
description: >-
[Opt In](/docs/inputoutput-options).
HTML formatted text for a comment. This will not include the name
of the creator.
type: string
example: This is a comment.
is_pinned:
description: >-
*Conditional*. Whether the story should be pinned on the
resource.
type: boolean
example: false
sticker_name:
description: >-
The name of the sticker in this story. `null` if there is no sticker.
type: string
enum:
- green_checkmark
- people_dancing
- dancing_unicorn
- heart
- party_popper
- people_waving_flags
- splashing_narwhal
- trophy
- yeti_riding_unicorn
- celebrating_people
- determined_climbers
- phoenix_spreading_love
example: dancing_unicorn
StoryCompact:
allOf:
- $ref: '#/components/schemas/AsanaResource'
- type: object
description: >-
A story represents an activity associated with an object in the Asana
system.
x-docs-overrides:
properties.resource_type.example: story
properties:
created_at:
description: The time at which this resource was created.
type: string
format: date-time
readOnly: true
example: '2012-02-22T02:06:58.147Z'
created_by:
$ref: '#/components/schemas/UserCompact'
resource_subtype:
description: >-
The subtype of this resource. Different subtypes retain many of the
same fields and behavior, but may render differently in Asana or
represent resources with different semantic meaning.
type: string
readOnly: true
example: comment_added
text:
description: >-
*Create-only*. Human-readable text for the story or comment.
This will not include the name of the creator.
*Note: This is not guaranteed to be stable for a given type of
story. For example, text for a reassignment may not always say
“assigned to …” as the text for a story can both be edited and
change based on the language settings of the user making the
request.*
Use the `resource_subtype` property to discover the action that
created the story.
type: string
example: marked today
StoryRequest:
$ref: '#/components/schemas/StoryBase'
StoryResponse:
allOf:
- $ref: '#/components/schemas/StoryBase'
- type: object
properties:
created_by:
$ref: '#/components/schemas/UserCompact'
type:
type: string
enum:
- comment
- system
readOnly: true
example: comment
is_editable:
description: >-
*Conditional*. Whether the text of the story can be edited
after creation.
type: boolean
readOnly: true
example: false
is_edited:
description: >-
*Conditional*. Whether the text of the story has been edited
after creation.
type: boolean
readOnly: true
example: false
hearted:
description: >-
*Deprecated - please use likes instead*
*Conditional*. True if the story is hearted by the authorized
user, false if not.
type: boolean
readOnly: true
example: false
hearts:
description: |-
*Deprecated - please use likes instead*
*Conditional*. Array of likes for users who have hearted this story.
type: array
items:
$ref: '#/components/schemas/Like'
readOnly: true
num_hearts:
description: |-
*Deprecated - please use likes instead*
*Conditional*. The number of users who have hearted this story.
type: integer
readOnly: true
example: 5
liked:
description: >-
*Conditional*. True if the story is liked by the authorized
user, false if not.
type: boolean
readOnly: true
example: false
likes:
description: >-
*Conditional*. Array of likes for users who have liked this story.
type: array
items:
$ref: '#/components/schemas/Like'
readOnly: true
num_likes:
description: >-
*Conditional*. The number of users who have liked this story.
type: integer
readOnly: true
example: 5
previews:
description: >-
*Conditional*. A collection of previews to be displayed in the
story.
*Note: This property only exists for comment stories.*
type: array
items:
$ref: '#/components/schemas/Preview'
readOnly: true
old_name:
description: >-
*Conditional*'
type: string
example: This was the Old Name
new_name:
description: >-
*Conditional*
type: string
readOnly: true
example: This is the New Name
old_dates:
$ref: '#/components/schemas/StoryResponseDates'
new_dates:
$ref: '#/components/schemas/StoryResponseDates'
old_resource_subtype:
description: >-
*Conditional*
type: string
readOnly: true
example: default_task
new_resource_subtype:
description: >-
*Conditional*
type: string
readOnly: true
example: milestone
story:
description: >-
*Conditional*
$ref: '#/components/schemas/StoryCompact'
readOnly: true
assignee:
description: >-
*Conditional*
$ref: '#/components/schemas/UserCompact'
readOnly: true
follower:
description: >-
*Conditional*
$ref: '#/components/schemas/UserCompact'
readOnly: true
old_section:
description: >-
*Conditional*
$ref: '#/components/schemas/SectionCompact'
readOnly: true
new_section:
description: >-
*Conditional*
$ref: '#/components/schemas/SectionCompact'
readOnly: true
task:
description: >-
*Conditional*
$ref: '#/components/schemas/TaskCompact'
readOnly: true
project:
description: >-
*Conditional*
$ref: '#/components/schemas/ProjectCompact'
readOnly: true
tag:
description: >-
*Conditional*
$ref: '#/components/schemas/TagCompact'
readOnly: true
custom_field:
description: >-
*Conditional*
$ref: '#/components/schemas/CustomFieldCompact'
readOnly: true
old_text_value:
description: >-
*Conditional*
type: string
readOnly: true
example: This was the Old Text
new_text_value:
description: >-
*Conditional*
type: string
readOnly: true
example: This is the New Text
old_number_value:
description: >-
*Conditional*
type: integer
readOnly: true
example: 1
new_number_value:
description: >-
*Conditional*
type: integer
readOnly: true
example: 2
old_enum_value:
description: >-
*Conditional*
$ref: '#/components/schemas/EnumOption'
readOnly: true
new_enum_value:
description: >-
*Conditional*
$ref: '#/components/schemas/EnumOption'
readOnly: true
old_date_value:
allOf:
- $ref: '#/components/schemas/StoryResponseDates'
- description: >-
*Conditional*. The old value of a date custom field story.
readOnly: true
new_date_value:
allOf:
- $ref: '#/components/schemas/StoryResponseDates'
- description: >-
*Conditional* The new value of a date custom field story.
readOnly: true
old_people_value:
description: >-
*Conditional*. The old value of a people custom field story.
type: array
items:
$ref: '#/components/schemas/UserCompact'
readOnly: true
new_people_value:
description: >-
*Conditional*. The new value of a people custom field story.
type: array
items:
$ref: '#/components/schemas/UserCompact'
readOnly: true
old_multi_enum_values:
description: >-
*Conditional*. The old value of a multi-enum custom field story.
type: array
items:
$ref: '#/components/schemas/EnumOption'
readOnly: true
new_multi_enum_values:
description: >-
*Conditional*. The new value of a multi-enum custom field story.
type: array
items:
$ref: '#/components/schemas/EnumOption'
readOnly: true
new_approval_status:
description: >-
*Conditional*. The new value of approval status.
type: string
readOnly: true
example: approved
old_approval_status:
description: >-
*Conditional*. The old value of approval status.
type: string
readOnly: true
example: pending
duplicate_of:
description: >-
*Conditional*
$ref: '#/components/schemas/TaskCompact'
readOnly: true
duplicated_from:
description: >-
*Conditional*
$ref: '#/components/schemas/TaskCompact'
readOnly: true
dependency:
description: >-
*Conditional*
$ref: '#/components/schemas/TaskCompact'
readOnly: true
source:
description: >-
The component of the Asana product the user used to trigger the
story.
type: string
enum:
- web
- email
- mobile
- api
- unknown
readOnly: true
example: web
target:
allOf:
- $ref: '#/components/schemas/TaskCompact'
- type: object
readOnly: true
description: >-
The object this story is associated with. Currently may only be
a
task.
StoryResponseDates:
description: >-
*Conditional*
type: object
readOnly: true
properties:
start_on:
description: >-
The day on which work for this goal begins, or null if the
goal has no start date. This takes a date with `YYYY-MM-DD`
format, and cannot be set unless there is an accompanying due date.
type: string
format: date
example: '2019-09-14'
nullable: true
due_at:
description: >-
The UTC date and time on which this task is due, or null if the
task has no due time. This takes an ISO 8601 date string in UTC
and should not be used together with `due_on`.
type: string
format: date-time
example: '2019-09-15T02:06:58.158Z'
nullable: true
due_on:
description: >-
The localized day on which this goal is due. This takes a
date with format `YYYY-MM-DD`.
type: string
format: date
example: '2019-09-15'
TagBase:
allOf:
- $ref: '#/components/schemas/TagCompact'
- type: object
properties:
color:
type: string
description: Color of the tag.
nullable: true
enum:
- dark-pink
- dark-green
- dark-blue
- dark-red
- dark-teal
- dark-brown
- dark-orange
- dark-purple
- dark-warm-gray
- light-pink
- light-green
- light-blue
- light-red
- light-teal
- light-brown
- light-orange
- light-purple
- light-warm-gray
example: light-green
notes:
description: >-
Free-form textual information associated with the
tag (i.e. its description).
type: string
example: Mittens really likes the stuff from Humboldt.
TagCompact:
allOf:
- $ref: '#/components/schemas/AsanaResource'
- type: object
description: >-
A *tag* is a label that can be attached to any task in Asana. It
exists in a single workspace or organization.
x-docs-overrides:
properties.resource_type.example: tag
properties:
name:
description: >-
Name of the tag. This is generally a short sentence fragment that
fits on a line in the UI for maximum readability. However, it can
be longer.
type: string
example: Stuff to buy
TagRequest:
allOf:
- $ref: '#/components/schemas/TagBase'
- type: object
properties:
followers:
type: array
description: >-
An array of strings identifying users. These can either be the
string "me", an email, or the gid of a user.
items:
type: string
example:
- '12345'
- '42563'
workspace:
type: string
x-env-variable: true
description: >-
Gid of an object.
example: '12345'
TagResponse:
allOf:
- $ref: '#/components/schemas/TagBase'
- type: object
properties:
created_at:
description: The time at which this resource was created.
type: string
format: date-time
readOnly: true
example: '2012-02-22T02:06:58.147Z'
followers:
description: Array of users following this tag.
type: array
readOnly: true
items:
$ref: '#/components/schemas/UserCompact'
workspace:
$ref: '#/components/schemas/WorkspaceCompact'
permalink_url:
type: string
readOnly: true
description: >-
A url that points directly to the object within Asana.
example: https://app.asana.com/0/resource/123456789/list
TaskAddFollowersRequest:
type: object
properties:
followers:
description: >-
An array of strings identifying users. These can either be the string
"me", an email, or the gid of a user.
type: array
items:
type: string
example:
- '13579'
- '321654'
required:
- followers
TaskAddProjectRequest:
type: object
properties:
project:
description: The project to add the task to.
type: string
example: '13579'
insert_after:
description: >-
A task in the project to insert the task after, or `null`
to insert at the beginning of the list.
type: string
nullable: true
example: '124816'
insert_before:
description: >-
A task in the project to insert the task before, or
`null` to insert at the end of the list.
type: string
nullable: true
example: '432134'
section:
description: >-
A section in the project to insert the task into. The
task will be inserted at the bottom of the section.
type: string
nullable: true
example: '987654'
required:
- project
TaskAddTagRequest:
type: object
properties:
tag:
description: The tag to add to the task.
type: string
example: '13579'
required:
- tag
TaskBase:
allOf:
- $ref: '#/components/schemas/TaskCompact'
- type: object
properties:
approval_status:
type: string
description: >-
*Conditional* Reflects the approval status of this task. This
field is kept in sync with `completed`, meaning `pending`
translates to false while `approved`, `rejected`, and
`changes_requested` translate to true. If you set completed
to true, this field will be set to `approved`.
enum:
- pending
- approved
- rejected
- changes_requested
example: pending
assignee_status:
description: >-
*Deprecated* Scheduling status of this task for the user it is assigned
to.
This field can only be set if the assignee is non-null.
Setting this field to "inbox" or "upcoming" inserts it at the top
of the section, while the other options will insert at the bottom.
type: string
enum:
- today
- upcoming
- later
- new
- inbox
example: upcoming
completed:
description: >-
True if the task is currently marked complete, false if not.
type: boolean
example: false
completed_at:
description: >-
The time at which this task was completed, or null if the task is
incomplete.
type: string
format: date-time
readOnly: true
nullable: true
example: '2012-02-22T02:06:58.147Z'
completed_by:
readOnly: true
$ref: '#/components/schemas/UserCompact'
created_at:
description: The time at which this resource was created.
type: string
format: date-time
readOnly: true
example: '2012-02-22T02:06:58.147Z'
dependencies:
description: >-
[Opt
In](/docs/inputoutput-options).
Array of resources referencing tasks that this task depends on.
The objects contain only the gid of the dependency.
type: array
items:
$ref: '#/components/schemas/AsanaResource'
readOnly: true
dependents:
description: >-
[Opt
In](/docs/inputoutput-options).
Array of resources referencing tasks that depend on this task. The
objects contain only the ID of the dependent.
type: array
items:
$ref: '#/components/schemas/AsanaResource'
readOnly: true
due_at:
description: >-
The UTC date and time on which this task is due, or null if the
task has no due time. This takes an ISO 8601 date string in UTC
and should not be used together with `due_on`.
type: string
format: date
example: '2019-09-15T02:06:58.147Z'
nullable: true
due_on:
description: >-
The localized date on which this task is due, or null if the task
has no due date. This takes a date with `YYYY-MM-DD` format and
should not be used together with `due_at`.
type: string
format: date
example: '2019-09-15'
nullable: true
external:
description: >-
*OAuth Required*. *Conditional*. This field is returned only
if external values are set or included by using [Opt In]
(/docs/inputoutput-options).
The external field allows you to store app-specific metadata on
tasks, including a gid that can be used to retrieve tasks and a
data blob that can store app-specific character strings. Note that
you will need to authenticate with Oauth to access or modify this
data. Once an external gid is set, you can use the notation
`external:custom_gid` to reference your object anywhere in the API
where you may use the original object gid. See the page on Custom
External Data for more details.
type: object
properties:
gid:
type: string
example: '1234'
data:
type: string
example: A blob of information.
example:
gid: my_gid
data: A blob of information
html_notes:
description: >-
[Opt
In](/docs/inputoutput-options).
The notes of the text with formatting as HTML.
type: string
example: >-
Mittens really likes the stuff from
Humboldt.
hearted:
description: >-
*Deprecated - please use liked instead* True if the task is
hearted by the authorized user, false if not.
type: boolean
example: true
readOnly: true
hearts:
description: >-
*Deprecated - please use likes instead* Array of likes for users
who have hearted this task.
type: array
items:
$ref: '#/components/schemas/Like'
readOnly: true
is_rendered_as_separator:
description: >-
[Opt In](/docs/inputoutput-options).
In some contexts tasks can be rendered as a visual separator;
for instance, subtasks can appear similar to
[sections](/reference/sections) without being true
`section` objects. If a `task` object is rendered this way in any
context it will have the property `is_rendered_as_separator` set
to `true`.
type: boolean
example: false
readOnly: true
liked:
description: >-
True if the task is liked by the authorized user, false if not.
type: boolean
example: true
likes:
description: Array of likes for users who have liked this task.
type: array
items:
$ref: '#/components/schemas/Like'
readOnly: true
memberships:
description: >-
*Create-only*. Array of projects this task is associated with
and the section it is in. At task creation time, this array can be
used to add the task to specific sections. After task creation,
these associations can be modified using the `addProject` and
`removeProject` endpoints. Note that over time, more types of
memberships may be added to this property.
type: array
readOnly: true
items:
type: object
properties:
project:
$ref: '#/components/schemas/ProjectCompact'
section:
$ref: '#/components/schemas/SectionCompact'
modified_at:
description: |-
The time at which this task was last modified.
*Note: This does not currently reflect any changes in
associations such as projects or comments that may have been
added or removed from the task.*
type: string
format: date-time
readOnly: true
example: '2012-02-22T02:06:58.147Z'
name:
description: >-
Name of the task. This is generally a short sentence fragment that
fits on a line in the UI for maximum readability. However, it can
be longer.
type: string
example: Buy catnip
notes:
description: >-
Free-form textual information associated with the
task (i.e. its description).
type: string
example: Mittens really likes the stuff from Humboldt.
num_hearts:
description: >-
*Deprecated - please use likes instead* The number of users who
have hearted this task.
type: integer
example: 5
readOnly: true
num_likes:
description: The number of users who have liked this task.
type: integer
example: 5
readOnly: true
num_subtasks:
description: >
[Opt
In](/docs/inputoutput-options).
The number of subtasks on this task.
type: integer
example: 3
readOnly: true
start_at:
description: >-
Date and time on which work begins for the task, or null if the task
has no start time. This takes an ISO 8601 date string in UTC
and should not be used together with `start_on`.
*Note: `due_at` must be present in the request when
setting or unsetting the `start_at` parameter.*
type: string
nullable: true
format: date
example: '2019-09-14T02:06:58.147Z'
start_on:
description: >-
The day on which work begins for the task , or null if the task
has no start date. This takes a date with `YYYY-MM-DD` format and
should not be used together with `start_at`.
*Note: `due_on` or `due_at` must be present in the request when
setting or unsetting the `start_on` parameter.*
type: string
nullable: true
format: date
example: '2019-09-14'
actual_time_minutes:
description: >-
This value represents the sum of all the Time Tracking entries in
the Actual Time field on a given Task. It is represented as a nullable
long value.
type: number
example: 200
readOnly: true
nullable: true
TaskCompact:
allOf:
- $ref: '#/components/schemas/AsanaResource'
- type: object
description: >-
The *task* is the basic object around which many operations in Asana
are centered.
x-docs-overrides:
properties.resource_type.example: task
properties:
name:
description: The name of the task.
type: string
example: Bug Task
resource_subtype:
type: string
description: >-
The subtype of this resource. Different subtypes retain many of
the same fields and behavior, but may render differently in Asana
or represent resources with different semantic meaning.
The resource_subtype `milestone` represent a single moment in
time. This means tasks with this subtype cannot have a start_date.
enum:
- default_task
- milestone
- section
- approval
example: default_task
TaskCountResponse:
description: A response object returned from the task count endpoint.
type: object
properties:
num_tasks:
description: The number of tasks in a project.
type: integer
example: 200
num_incomplete_tasks:
description: The number of incomplete tasks in a project.
type: integer
example: 50
num_completed_tasks:
description: The number of completed tasks in a project.
type: integer
example: 150
num_milestones:
description: The number of milestones in a project.
type: integer
example: 10
num_incomplete_milestones:
description: The number of incomplete milestones in a project.
type: integer
example: 7
num_completed_milestones:
description: The number of completed milestones in a project.
type: integer
example: 3
TaskDuplicateRequest:
type: object
properties:
name:
description: The name of the new task.
type: string
example: New Task Name
include:
description: The fields that will be duplicated to the new task.
type: string
enum:
- notes
- assignee
- subtasks
- attachments
- tags
- followers
- projects
- dates
- dependencies
- parent
example:
- notes
- assignee
TaskRemoveFollowersRequest:
type: object
properties:
followers:
description: >-
An array of strings identifying users. These can either be the string
"me", an email, or the gid of a user.
type: array
items:
type: string
example:
- '13579'
- '321654'
required:
- followers
TaskRemoveProjectRequest:
type: object
properties:
project:
description: The project to remove the task from.
type: string
example: '13579'
required:
- project
TaskRemoveTagRequest:
type: object
properties:
tag:
description: The tag to remove from the task.
type: string
example: '13579'
required:
- tag
TaskRequest:
allOf:
- $ref: '#/components/schemas/TaskBase'
- type: object
properties:
assignee:
type: string
readOnly: false
x-env-variable: true
description: >-
Gid of a user.
example: '12345'
nullable: true
assignee_section:
nullable: true
type: string
description: >-
The *assignee section* is a subdivision of a project that groups
tasks together in the assignee's "My Tasks" list. It can either be
a
header above a list of tasks in a list view or a column in a board
view of "My Tasks."
The `assignee_section` property will be returned in the response only
if the request was sent by the user who is the assignee of the task.
Note that you can only write to `assignee_section` with the gid of
an
existing section visible in the user's "My Tasks" list.
example: '12345'
custom_fields:
description: >-
An object where each key is a Custom Field GID and each value is
an enum GID, string, number, object, or array.
type: object
additionalProperties:
type: string
description: >-
"{custom_field_gid}" => Value (Can be text, number, etc.)
example:
5678904321: On Hold
4578152156: Not Started
followers:
type: array
description: >-
*Create-Only* An array of strings identifying users. These can
either be the string "me", an email, or the gid of a user. In
order to change followers on an existing task use `addFollowers`
and `removeFollowers`.
items:
type: string
description: >-
Gid of a user.
example:
- '12345'
parent:
type: string
readOnly: false
x-env-variable: true
description: >-
Gid of a task.
example: '12345'
nullable: true
projects:
type: array
description: >-
*Create-Only* Array of project gids. In order to change projects on
an
existing task use `addProject` and `removeProject`.
items:
type: string
description: >-
Gid of a project.
example:
- '12345'
tags:
type: array
description: >-
*Create-Only* Array of tag gids. In order to change tags on an
existing task use `addTag` and `removeTag`.
items:
type: string
description: >-
Gid of a tag.
example:
- '12345'
workspace:
type: string
readOnly: false
x-env-variable: true
description: >-
Gid of a workspace.
example: '12345'
TaskResponse:
allOf:
- $ref: '#/components/schemas/TaskBase'
- type: object
properties:
assignee:
nullable: true
allOf:
- $ref: '#/components/schemas/UserCompact'
assignee_section:
nullable: true
allOf:
- $ref: '#/components/schemas/SectionCompact'
- description: >-
The *assignee section* is a subdivision of a project that groups
tasks together in the assignee's "My Tasks" list. It can either
be a
header above a list of tasks in a list view or a column in a board
view of "My Tasks."
The `assignee_section` property will be returned in the response
only
if the request was sent by the user who is the assignee of the
task.
Note that you can only write to `assignee_section` with the gid
of an
existing section visible in the user's "My Tasks" list.
custom_fields:
description: >-
Array of custom field values applied to the task. These
represent the custom field values recorded on this project for a
particular custom field. For example, these custom field values
will contain an `enum_value` property for custom fields of type
`enum`, a `text_value` property for custom fields of type
`text`, and so on. Please note that the `gid` returned on each
custom field value *is identical* to the `gid` of the custom field,
which allows referencing the custom field metadata through the
`/custom_fields/custom_field-gid` endpoint.
type: array
items:
$ref: '#/components/schemas/CustomFieldResponse'
readOnly: true
followers:
description: Array of users following this task.
type: array
readOnly: true
items:
$ref: '#/components/schemas/UserCompact'
parent:
allOf:
- $ref: '#/components/schemas/TaskCompact'
- type: object
readOnly: true
description: >-
The parent of this task, or `null` if this is not a subtask.
This property cannot be modified using a PUT request but you
can change it with the `setParent` endpoint. You can create
subtasks by using the subtasks endpoint.
nullable: true
projects:
description: >-
*Create-only.* Array of projects this task is associated with.
At task creation time, this array can be used to add the task to
many projects at once. After task creation, these associations can
be modified using the addProject and removeProject endpoints.
type: array
readOnly: true
items:
$ref: '#/components/schemas/ProjectCompact'
tags:
description: >-
Array of tags associated with this task. In order to change tags on
an
existing task use `addTag` and `removeTag`.
type: array
readOnly: true
items:
$ref: '#/components/schemas/TagCompact'
example:
- gid: '59746'
name: Grade A
workspace:
allOf:
- $ref: '#/components/schemas/WorkspaceCompact'
- type: object
readOnly: true
description: >-
*Create-only*. The workspace this task is associated with.
Once created, task cannot be moved to a different workspace.
This attribute can only be specified at creation time.
permalink_url:
type: string
readOnly: true
description: >-
A url that points directly to the object within Asana.
example: https://app.asana.com/0/resource/123456789/list
TaskSetParentRequest:
type: object
properties:
parent:
description: >-
The new parent of the task, or `null` for no parent.
type: string
example: '987654'
insert_after:
description: >-
A subtask of the parent to insert the task after, or `null` to
insert at the beginning of the list.
type: string
example: 'null'
insert_before:
description: >-
A subtask of the parent to insert the task before, or `null` to
insert at the end of the list.
type: string
example: '124816'
required:
- parent
TeamAddUserRequest:
type: object
description: A user identification object for specification with the addUser/removeUser
endpoints.
properties:
user:
description: >-
A string identifying a user. This can either be the string "me", an email,
or the gid of a user.
type: string
example: '12345'
TeamBase:
$ref: '#/components/schemas/TeamCompact'
TeamCompact:
allOf:
- $ref: '#/components/schemas/AsanaResource'
- type: object
description: >-
A *team* is used to group related projects and people together within
an organization. Each project in an organization is associated with a
team.
x-docs-overrides:
properties.resource_type.example: team
properties:
name:
description: The name of the team.
type: string
example: Marketing
TeamMembershipBase:
$ref: '#/components/schemas/TeamMembershipCompact'
TeamMembershipCompact:
allOf:
- $ref: '#/components/schemas/AsanaResource'
- type: object
description: >-
This object represents a user's connection to a team.
x-docs-overrides:
properties.resource_type.example: team_membership
properties:
user:
$ref: '#/components/schemas/UserCompact'
team:
$ref: '#/components/schemas/TeamCompact'
is_guest:
type: boolean
description: >-
Describes if the user is a guest in the team.
example: false
is_limited_access:
type: boolean
description: >-
Describes if the user has limited access to the team.
example: false
is_admin:
type: boolean
description: >-
Describes if the user is a team admin.
example: false
TeamMembershipResponse:
$ref: '#/components/schemas/TeamMembershipBase'
TeamRemoveUserRequest:
type: object
description: A user identification object for specification with the addUser/removeUser
endpoints.
properties:
user:
description: >-
A string identifying a user. This can either be the string "me", an email,
or the gid of a user.
type: string
example: '12345'
TeamRequest:
allOf:
- $ref: '#/components/schemas/TeamBase'
- type: object
properties:
description:
description: >
The description of the team.
type: string
example: All developers should be members of this team.
html_description:
description: >
The description of the team with formatting as HTML.
type: string
example: >-
All developers should be members of this
team.
organization:
type: string
description: >
The organization/workspace the team belongs to. This must be the same
organization you are in and cannot be changed once set.
example: '123456789'
visibility:
description: >
The visibility of the team to users in the same organization
type: string
enum:
- secret
- request_to_join
- public
edit_team_name_or_description_access_level:
description: >
Controls who can edit team name and description
type: string
enum:
- all_team_members
- only_team_admins
edit_team_visibility_or_trash_team_access_level:
description: >
Controls who can edit team visibility and trash teams
type: string
enum:
- all_team_members
- only_team_admins
member_invite_management_access_level:
description: >
Controls who can accept or deny member invites for a given team
type: string
enum:
- all_team_members
- only_team_admins
guest_invite_management_access_level:
description: >
Controls who can accept or deny guest invites for a given team
type: string
enum:
- all_team_members
- only_team_admins
join_request_management_access_level:
description: >
Controls who can accept or deny join team requests for a Membership
by Request team
type: string
enum:
- all_team_members
- only_team_admins
team_member_removal_access_level:
description: >
Controls who can remove team members
type: string
enum:
- all_team_members
- only_team_admins
TeamResponse:
allOf:
- $ref: '#/components/schemas/TeamBase'
- type: object
properties:
description:
description: >
[Opt
In](/docs/inputoutput-options).
The description of the team.
type: string
example: All developers should be members of this team.
html_description:
description: >
[Opt
In](/docs/inputoutput-options).
The description of the team with formatting as HTML.
type: string
example: >-
All developers should be members of this
team.
organization:
allOf:
- $ref: '#/components/schemas/WorkspaceCompact'
- type: object
description: |
The organization/workspace the team belongs to.
permalink_url:
type: string
readOnly: true
description: >-
A url that points directly to the object within Asana.
example: https://app.asana.com/0/resource/123456789/list
visibility:
description: >
The visibility of the team to users in the same organization
type: string
enum:
- secret
- request_to_join
- public
edit_team_name_or_description_access_level:
description: >
Controls who can edit team name and description
type: string
enum:
- all_team_members
- only_team_admins
edit_team_visibility_or_trash_team_access_level:
description: >
Controls who can edit team visibility and trash teams
type: string
enum:
- all_team_members
- only_team_admins
member_invite_management_access_level:
description: >
Controls who can accept or deny member invites for a given team
type: string
enum:
- all_team_members
- only_team_admins
guest_invite_management_access_level:
description: >
Controls who can accept or deny guest invites for a given team
type: string
enum:
- all_team_members
- only_team_admins
join_request_management_access_level:
description: >
Controls who can accept or deny join team requests for a Membership
by Request team
type: string
enum:
- all_team_members
- only_team_admins
team_member_removal_access_level:
description: >
Controls who can remove team members
type: string
enum:
- all_team_members
- only_team_admins
TemplateRole:
allOf:
- $ref: '#/components/schemas/AsanaResource'
- type: object
properties:
name:
type: string
description: >-
Name of the template role.
example: Designer
TimePeriodBase:
allOf:
- $ref: '#/components/schemas/TimePeriodCompact'
- type: object
properties:
parent:
$ref: '#/components/schemas/TimePeriodCompact'
TimePeriodCompact:
allOf:
- $ref: '#/components/schemas/AsanaResource'
- type: object
x-docs-overrides:
properties.resource_type.example: time_period
properties:
end_on:
type: string
description: >-
The localized end date of the time period in `YYYY-MM-DD` format.
example: '2019-09-14'
start_on:
type: string
description: >-
The localized start date of the time period in `YYYY-MM-DD` format.
example: '2019-09-13'
period:
type: string
description: >-
The cadence and index of the time period. The value is one of: `FY`,
`H1`, `H2`, `Q1`, `Q2`, `Q3`, or `Q4`.
enum:
- FY
- H1
- H2
- Q1
- Q2
- Q3
- Q4
example: Q1
display_name:
type: string
description: >-
A string representing the cadence code and the fiscal year.
example: Q1 FY22
TimePeriodResponse:
allOf:
- $ref: '#/components/schemas/TimePeriodBase'
- type: object
UserBase:
$ref: '#/components/schemas/UserCompact'
UserCompact:
allOf:
- $ref: '#/components/schemas/AsanaResource'
- type: object
description: >-
A *user* object represents an account in Asana that can be given
access to various workspaces, projects, and tasks.
x-docs-overrides:
properties.resource_type.example: user
properties:
name:
type: string
description: >-
*Read-only except when same user as requester*. The user’s name.
example: Greg Sanchez
UserRequest:
$ref: '#/components/schemas/UserBase'
UserBaseResponse:
allOf:
- $ref: '#/components/schemas/UserBase'
- type: object
properties:
email:
type: string
format: email
readOnly: true
description: The user's email address.
example: gsanchez@example.com
photo:
type: object
nullable: true
properties:
image_21x21:
type: string
format: uri
image_27x27:
type: string
format: uri
image_36x36:
type: string
format: uri
image_60x60:
type: string
format: uri
image_128x128:
type: string
format: uri
image_1024x1024:
type: string
format: uri
readOnly: true
description: >-
A map of the user’s profile photo in various sizes, or null if no
photo is set. Sizes provided are 21, 27, 36, 60, 128, and 1024. All
images
are in PNG format, except for 1024 (which is in JPEG format).
example:
image_21x21: https://...
image_27x27: https://...
image_36x36: https://...
image_60x60: https://...
image_128x128: https://...
image_1024x1024: https://...
UserResponse:
allOf:
- $ref: '#/components/schemas/UserBaseResponse'
- type: object
properties:
workspaces:
description: >-
Workspaces and organizations this user may access.
Note\: The API will only return workspaces and organizations that
also contain the authenticated user.
readOnly: true
type: array
items:
$ref: '#/components/schemas/WorkspaceCompact'
UserTaskListBase:
$ref: '#/components/schemas/UserTaskListCompact'
UserTaskListCompact:
allOf:
- $ref: '#/components/schemas/AsanaResource'
- type: object
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.
x-docs-overrides:
properties.resource_type.example: user_task_list
properties:
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'
UserTaskListRequest:
$ref: '#/components/schemas/UserTaskListBase'
UserTaskListResponse:
$ref: '#/components/schemas/UserTaskListBase'
WebhookCompact:
allOf:
- $ref: '#/components/schemas/AsanaResource'
- type: object
description: >-
Webhook objects represent the state of an active subscription for a
server to be updated with information from Asana. This schema
represents the subscription itself, not the objects that are sent to
the server. For information on those please refer to the
[event](/reference/events) schema.
x-docs-overrides:
properties.resource_type.example: webhook
properties:
active:
description: >-
If true, the webhook will send events - if false it is considered
inactive and will not generate events.
type: boolean
readOnly: true
example: false
resource:
$ref: '#/components/schemas/AsanaNamedResource'
target:
description: The URL to receive the HTTP POST.
type: string
format: uri
readOnly: true
example: https://example.com/receive-webhook/7654
WebhookFilter:
type: object
description: >-
A WebhookFilter can be passed on creation of a webhook in order to filter
the types of actions that trigger delivery of an
[event](/reference/events)
properties:
resource_type:
type: string
description: >-
The type of the resource which created the event when modified; for
example, to filter to changes on regular tasks this field should be
set to `task`.
example: task
resource_subtype:
description: >-
The resource subtype of the resource that the filter applies to. This
should be set to the same value as is returned on the
`resource_subtype` field on the resources themselves.
type: string
example: milestone
action:
type: string
description: >-
The type of change on the **resource** to pass through the filter.
For more information refer to `Event.action` in the
[event](/reference/events) schema. This can be one of
`changed`, `added`, `removed`, `deleted`, and `undeleted` depending
on the nature of what has occurred on the resource.
example: changed
fields:
type: array
description: >-
*Conditional.* A whitelist of fields for events which will pass the
filter when the resource is changed. These can be any combination of
the fields on the resources themselves. This field is only valid for
`action` of type `changed`
items:
type: string
example:
- due_at
- due_on
- dependencies
WebhookRequest:
type: object
properties:
resource:
description: >-
A resource ID to subscribe to. Many Asana resources are valid to
create webhooks on, but higher-level resources require filters.
type: string
example: '12345'
target:
description: >-
The URL to receive the HTTP POST. The full URL will be used to
deliver events from this webhook (including parameters) which allows
encoding of application-specific state when the webhook is created.
type: string
format: uri
example: >-
https://example.com/receive-webhook/7654?app_specific_param=app_specific_value
filters:
type: array
description: >-
An array of WebhookFilter objects to specify a whitelist of filters
to apply to events from this webhook. If a webhook event passes any
of the filters the event will be delivered; otherwise no event will
be sent to the receiving server.
items:
allOf:
- $ref: '#/components/schemas/WebhookFilter'
- description: >-
A set of filters to specify a whitelist for what types of
events will be delivered.
- type: object
required:
- resource
- target
WebhookResponse:
allOf:
- $ref: '#/components/schemas/WebhookCompact'
- type: object
properties:
created_at:
description: The time at which this resource was created.
type: string
format: date-time
readOnly: true
example: '2012-02-22T02:06:58.147Z'
last_failure_at:
description: >-
The timestamp when the webhook last received an error when sending
an event to the target.
type: string
format: date-time
readOnly: true
example: '2012-02-22T02:06:58.147Z'
last_failure_content:
description: >-
The contents of the last error response sent to the webhook when
attempting to deliver events to the target.
type: string
readOnly: true
example: 500 Server Error\n\nCould not complete the request
last_success_at:
description: >-
The timestamp when the webhook last successfully sent an event to
the target.
type: string
format: date-time
readOnly: true
example: '2012-02-22T02:06:58.147Z'
filters:
description: >-
Whitelist of filters to apply to events from this webhook. If a
webhook event passes any of the filters the event will be
delivered; otherwise no event will be sent to the receiving server.
type: array
items:
allOf:
- $ref: '#/components/schemas/WebhookFilter'
- description: A set of filters to specify a whitelist for what
types of events will be delivered.
- type: object
WebhookUpdateRequest:
type: object
properties:
filters:
type: array
description: >-
An array of WebhookFilter objects to specify a whitelist of filters
to apply to events from this webhook. If a webhook event passes any
of the filters the event will be delivered; otherwise no event will
be sent to the receiving server.
items:
allOf:
- $ref: '#/components/schemas/WebhookFilter'
- description: >-
A set of filters to specify a whitelist for what types of
events will be delivered.
- type: object
WorkspaceAddUserRequest:
type: object
description: A user identification object for specification with the addUser/removeUser
endpoints.
properties:
user:
description: >-
A string identifying a user. This can either be the string "me", an email,
or the gid of a user.
type: string
example: '12345'
WorkspaceBase:
$ref: '#/components/schemas/WorkspaceCompact'
WorkspaceCompact:
allOf:
- $ref: '#/components/schemas/AsanaResource'
- type: object
description: >-
A *workspace* is the highest-level organizational unit in Asana. All
projects and tasks have an associated workspace.
x-docs-overrides:
properties.resource_type.example: workspace
properties:
name:
description: The name of the workspace.
type: string
example: My Company Workspace
WorkspaceMembershipBase:
$ref: '#/components/schemas/WorkspaceMembershipCompact'
WorkspaceMembershipCompact:
allOf:
- $ref: '#/components/schemas/AsanaResource'
- type: object
description: >-
This object determines if a user is a member of a workspace.
x-docs-overrides:
properties.resource_type.example: workspace_membership
properties:
user:
$ref: '#/components/schemas/UserCompact'
workspace:
$ref: '#/components/schemas/WorkspaceCompact'
WorkspaceMembershipRequest:
$ref: '#/components/schemas/WorkspaceMembershipBase'
WorkspaceMembershipResponse:
allOf:
- $ref: '#/components/schemas/WorkspaceMembershipBase'
- type: object
properties:
user_task_list:
$ref: '#/components/schemas/UserTaskListResponse'
description: >-
The user's "My Tasks" in the workspace.
readOnly: true
is_active:
type: boolean
readOnly: true
description: >-
Reflects if this user still a member of the workspace.
is_admin:
type: boolean
readOnly: true
description: >-
Reflects if this user is an admin of the workspace.
is_guest:
type: boolean
readOnly: true
description: >-
Reflects if this user is a guest of the workspace.
vacation_dates:
type: object
readOnly: true
nullable: true
description: >-
Contains keys `start_on` and `end_on` for the vacation dates for the
user in this workspace.
If `start_on` is null, the entire `vacation_dates` object will be
null.
If `end_on` is before today, the entire `vacation_dates` object will
be null.
properties:
start_on:
description: The day on which the user's vacation in this workspace
starts. This is a date with `YYYY-MM-DD` format.
type: string
example: '2022-11-05'
end_on:
description: The day on which the user's vacation in this workspace
ends, or null if there is no end date. This is a date with `YYYY-MM-DD`
format.
nullable: true
type: string
example: '2022-11-07'
created_at:
description: The time at which this resource was created.
type: string
format: date-time
readOnly: true
example: '2012-02-22T02:06:58.147Z'
WorkspaceRemoveUserRequest:
type: object
description: A user identification object for specification with the addUser/removeUser
endpoints.
properties:
user:
description: >-
A string identifying a user. This can either be the string "me", an email,
or the gid of a user.
type: string
example: '12345'
WorkspaceRequest:
$ref: '#/components/schemas/WorkspaceBase'
WorkspaceResponse:
allOf:
- $ref: '#/components/schemas/WorkspaceBase'
- type: object
properties:
email_domains:
description: The email domains that are associated with this workspace.
type: array
items:
type: string
format: uri
example:
- asana.com
is_organization:
description: Whether the workspace is an *organization*.
type: boolean
example: false
GoalMembershipBase:
$ref: '#/components/schemas/GoalMembershipCompact'
GoalMembershipCompact:
allOf:
- $ref: '#/components/schemas/AsanaResource'
- type: object
description: This object represents a user's connection to a goal.
x-docs-overrides:
properties.resource_type.example: goal_membership
properties:
member:
$ref: '#/components/schemas/MemberCompact'
goal:
$ref: '#/components/schemas/GoalCompact'
is_commenter:
type: boolean
description: Describes if the member is comment only in goal.
example: false
is_editor:
type: boolean
description: Describes if the member is editor in goal.
example: false
GoalMembershipResponse:
$ref: '#/components/schemas/GoalMembershipBase'
MembershipRequest:
type: object
properties:
is_active:
description: >-
*Optional*. Denotes if a member is active. Applies to all memberships
type: boolean
example: true
is_guest:
description: >-
*Optional*. Denotes if a member is a guest. Applies to only `team` memberships.
type: boolean
example: true
is_admin:
description: >-
*Optional*. Denotes if a member is an admin. Applies to only `team` memberships.
type: boolean
example: false
CreateMembershipRequest:
allOf:
- $ref: '#/components/schemas/MembershipRequest'
- type: object
properties:
member:
description: The gid of the user or team
type: string
example: 12345
parent:
description: The gid of the `portfolio`, `team`, `project`, or `goal`
type: string
example: true
MembershipResponse:
anyOf:
- $ref: '#/components/schemas/ProjectMembershipResponse'
- $ref: '#/components/schemas/PortfolioMembershipResponse'
- $ref: '#/components/schemas/TeamMembershipResponse'
- $ref: '#/components/schemas/GoalMembershipResponse'
- $ref: '#/components/schemas/WorkspaceMembershipResponse'
securitySchemes:
personalAccessToken:
type: http
description: >-
A personal access token allows access to the api for the user who
created it. This should be kept a secret and be treated like a
password.
scheme: bearer
oauth2:
type: oauth2
description: >-
We require that applications designed to access the Asana API on behalf
of multiple users implement OAuth 2.0.
Asana supports the Authorization Code Grant flow.
flows:
authorizationCode:
authorizationUrl: https://app.asana.com/-/oauth_authorize
tokenUrl: https://app.asana.com/-/oauth_token
refreshUrl: https://app.asana.com/-/oauth_token
scopes:
default: >-
Provides access to all endpoints documented in our API reference.
If no scopes are requested, this scope is assumed by default.
openid: >-
Provides access to OpenID Connect ID tokens and the OpenID Connect
user info endpoint.
email: >-
Provides access to the user’s email through the OpenID Connect
user info endpoint.
profile: >-
Provides access to the user’s name and profile photo through the
OpenID Connect user info endpoint.
paths:
/attachments/{attachment_gid}:
parameters:
- $ref: '#/components/parameters/attachment_path_gid'
- $ref: '#/components/parameters/pretty'
- $ref: '#/components/parameters/fields'
get:
summary: Get an attachment
description: Get the full record for a single attachment.
tags:
- Attachments
operationId: getAttachment
responses:
200:
description: Successfully retrieved the record for a single attachment.
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/AttachmentResponse'
400:
$ref: '#/components/responses/BadRequest'
401:
$ref: '#/components/responses/Unauthorized'
402:
$ref: '#/components/responses/PaymentRequired'
403:
$ref: '#/components/responses/Forbidden'
404:
$ref: '#/components/responses/NotFound'
424:
$ref: '#/components/responses/TooManyRequests'
500:
$ref: '#/components/responses/InternalServerError'
501:
$ref: '#/components/responses/BadGateway'
503:
$ref: '#/components/responses/ServiceUnavailable'
504:
$ref: '#/components/responses/GatewayTimeout'
x-readme:
code-samples:
- language: java
install: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
Attachment result = client.attachments.getAttachment(attachmentGid)
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.attachments.getAttachment(attachmentGid, {param: "value", param:
"value", opt_pretty: true})
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.attachments.get_attachment(attachment_gid, {'param':
'value', 'param': 'value'}, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
attachments->getAttachment($attachment_gid, array('param'
=> 'value', 'param' => 'value'), array('opt_pretty' => 'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.attachments.get_attachment(attachment_gid: 'attachment_gid',
param: "value", param: "value", options: {pretty: true})
delete:
summary: Delete an attachment
description: |-
Deletes a specific, existing attachment.
Returns an empty data record.
tags:
- Attachments
operationId: deleteAttachment
responses:
200:
description: Successfully deleted the specified attachment.
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/EmptyResponse'
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: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
JsonElement result = client.attachments.deleteAttachment(attachmentGid)
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.attachments.deleteAttachment(attachmentGid)
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.attachments.delete_attachment(attachment_gid, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
attachments->deleteAttachment($attachment_gid, array('opt_pretty'
=> 'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.attachments.delete_attachment(attachment_gid: 'attachment_gid',
options: {pretty: true})
/attachments:
parameters:
- $ref: '#/components/parameters/pretty'
- $ref: '#/components/parameters/fields'
get:
summary: Get attachments from an object
description: >-
Returns the compact records for all attachments on the object.
There are three possible `parent` values for this request: `project`, `project_brief`,
and `task`.
For a project, an attachment refers to a file uploaded to the "Key resources"
section in the project
Overview. For a project brief, an attachment refers to inline files in the
project brief itself. For
a task, an attachment refers to a file directly associated to that task.
Note that within the Asana app, inline images in the task description do not
appear in the index of image
thumbnails nor as stories in the task. However, requests made to `GET /attachments`
for a task will return
all of the images in the task, including inline images.
tags:
- Attachments
operationId: getAttachmentsForObject
parameters:
- $ref: '#/components/parameters/limit'
- $ref: '#/components/parameters/offset'
- name: parent
required: true
in: query
description: >-
Globally unique identifier for object to fetch statuses from. Must be
a GID
for a `project`, `project_brief`, or `task`.
schema:
type: string
example: '159874'
responses:
200:
description: >-
Successfully retrieved the specified object's attachments.
content:
application/json:
schema:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/AttachmentCompact'
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: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
List result = client.attachments.getAttachmentsForObject(parent)
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.attachments.getAttachmentsForObject({param: "value", param: "value",
opt_pretty: true})
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.attachments.get_attachments_for_object({'param': 'value',
'param': 'value'}, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
attachments->getAttachmentsForObject(array('param'
=> 'value', 'param' => 'value'), array('opt_pretty' => 'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.attachments.get_attachments_for_object(parent: ''parent_example'',
param: "value", param: "value", options: {pretty: true})
post:
summary: Upload an attachment
description: |-
Upload an attachment.
This method uploads an attachment on an object and returns the compact
record for the created attachment object. This is possible by either:
- Providing the URL of the external resource being attached, or
- Downloading the file content first and then uploading it as any other attachment. Note that it is not possible to attach
files from third party services such as Dropbox, Box, Vimeo & Google Drive via the API
The 100MB size limit on attachments in Asana is enforced on this endpoint.
This endpoint expects a multipart/form-data encoded request containing the full contents of the file to be uploaded.
Requests made should follow the HTTP/1.1 specification that line
terminators are of the form `CRLF` or `\r\n` outlined
[here](http://www.w3.org/Protocols/HTTP/1.1/draft-ietf-http-v11-spec-01#Basic-Rules) in order for the server to reliably and properly handle the request.
tags:
- Attachments
operationId: createAttachmentForObject
requestBody:
description: |-
The file you want to upload.
*Note when using curl:*
Be sure to add an `‘@’` before the file path, and use the `--form`
option instead of the `-d` option.
When uploading PDFs with curl, force the content-type to be pdf by
appending the content type to the file path: `--form
"file=@file.pdf;type=application/pdf"`.
required: true
content:
multipart/form-data:
schema:
$ref: '#/components/schemas/AttachmentRequest'
responses:
200:
description: Successfully uploaded the attachment to the parent object.
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/AttachmentResponse'
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: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
Attachment result = client.attachments.createAttachmentForObject(file,
parent, url, name)
.data("field", "value")
.data("field", "value")
.option("pretty", true)
.execute();
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.attachments.create_attachment_for_object({'field': 'value',
'field': 'value'}, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
attachments->createAttachmentForObject(array('field'
=> 'value', 'field' => 'value'), array('opt_pretty' => 'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.attachments.create_attachment_for_object(field: "value",
field: "value", options: {pretty: true})
/workspaces/{workspace_gid}/audit_log_events:
parameters:
- $ref: '#/components/parameters/workspace_path_gid'
- $ref: '#/components/parameters/audit_log_start_at'
- $ref: '#/components/parameters/audit_log_end_at'
- $ref: '#/components/parameters/audit_log_event_type'
- $ref: '#/components/parameters/audit_log_actor_type'
- $ref: '#/components/parameters/audit_log_actor_gid'
- $ref: '#/components/parameters/audit_log_resource_gid'
- $ref: '#/components/parameters/limit'
- $ref: '#/components/parameters/offset'
get:
summary: Get audit log events
description: >-
Retrieve the audit log events that have been captured in your domain.
This endpoint will return a list of [AuditLogEvent](/reference/audit-log-api)
objects,
sorted by creation time in ascending order. Note that the Audit Log API captures
events
from October 8th, 2021 and later. Queries for events before this date will
not return
results.
There are a number of query parameters (below) that can be used to filter
the set of
[AuditLogEvent](/reference/audit-log-api) objects that are returned in the
response. Any
combination of query parameters is valid. When no filters are provided, all
of the events
that have been captured in your domain will match.
The list of events will always be [paginated](/docs/pagination). The default
limit
is 1000 events. The next set of events can be retrieved using the `offset`
from the
previous response. If there are no events that match the provided filters
in your domain, the endpoint will return `null` for the `next_page` field.
Querying
again with the same filters may return new events if they were captured after
the
last request. Once a response includes a `next_page` with an `offset`, subsequent
requests can be made with the latest `offset` to poll for new events that
match
the provided filters.
*Note: If the filters you provided match events in your domain and `next_page`
is
present in the response, we will continue to send `next_page` on subsequent
requests
even when there are no more events that match the filters. This was put in
place so
that you can implement an audit log stream that will return future events
that match
these filters. If you are not interested in future events that match the filters
you
have defined, you can rely on checking empty `data` response for the end of
current
events that match your filters.*
When no `offset` is provided, the response will begin with the oldest events
that match the provided filters. It is important to note that
[AuditLogEvent](/reference/audit-log-api) objects will be permanently deleted
from our systems
after 90 days. If you wish to keep a permanent record of these events, we
recommend using a
SIEM tool to ingest and store these logs.
tags:
- Audit log API
operationId: getAuditLogEvents
responses:
200:
description: >-
AuditLogEvents were successfully retrieved.
content:
application/json:
schema:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/AuditLogEvent'
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: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
List result = client.auditlogapi.getAuditLogEvents(workspaceGid,
resourceGid, actorGid, actorType, eventType, endAt, startAt)
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.auditlogapi.getAuditLogEvents(workspaceGid, {param: "value",
param: "value", opt_pretty: true})
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.audit_log_api.get_audit_log_events(workspace_gid, {'param':
'value', 'param': 'value'}, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
auditlogapi->getAuditLogEvents($workspace_gid, array('param'
=> 'value', 'param' => 'value'), array('opt_pretty' => 'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.audit_log_api.get_audit_log_events(workspace_gid: 'workspace_gid',
param: "value", param: "value", options: {pretty: true})
/batch:
parameters:
- $ref: '#/components/parameters/pretty'
- $ref: '#/components/parameters/fields'
post:
summary: Submit parallel requests
description: |-
Make multiple requests in parallel to Asana's API.
tags:
- Batch API
operationId: createBatchRequest
requestBody:
description: >-
The requests to batch together via the Batch API.
required: true
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/BatchRequest'
responses:
200:
description: Successfully completed the requested batch API operations.
content:
application/json:
schema:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/BatchResponse'
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: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
List result = client.batchapi.createBatchRequest()
.data("field", "value")
.data("field", "value")
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.batchapi.createBatchRequest({field: "value", field: "value",
pretty: true})
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.batch_api.create_batch_request({'field': 'value', 'field':
'value'}, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
batchapi->createBatchRequest(array('field' => 'value',
'field' => 'value'), array('opt_pretty' => 'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.batch_api.create_batch_request(field: "value", field:
"value", options: {pretty: true})
/projects/{project_gid}/custom_field_settings:
parameters:
- $ref: '#/components/parameters/project_path_gid'
- $ref: '#/components/parameters/pretty'
- $ref: '#/components/parameters/fields'
- $ref: '#/components/parameters/limit'
- $ref: '#/components/parameters/offset'
get:
summary: Get a project's custom fields
description: >-
Returns a list of all of the custom fields settings on a project, in
compact form. Note that, as in all queries to collections which return
compact representation, `opt_fields` can be used to
include more data than is returned in the compact representation. See the
[getting started guide on input/output
options](https://developers.asana.com/docs/#input-output-options)
for more information.
tags:
- Custom field settings
operationId: getCustomFieldSettingsForProject
responses:
200:
description: >-
Successfully retrieved custom field settings objects for a project.
content:
application/json:
schema:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/CustomFieldSettingResponse'
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: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
List result = client.customfieldsettings.getCustomFieldSettingsForProject(projectGid)
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.customfieldsettings.getCustomFieldSettingsForProject(projectGid,
{param: "value", param: "value", opt_pretty: true})
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.custom_field_settings.get_custom_field_settings_for_project(project_gid,
{'param': 'value', 'param': 'value'}, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
customfieldsettings->getCustomFieldSettingsForProject($project_gid,
array('param' => 'value', 'param' => 'value'), array('opt_pretty' =>
'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.custom_field_settings.get_custom_field_settings_for_project(project_gid:
'project_gid', param: "value", param: "value", options: {pretty: true})
/portfolios/{portfolio_gid}/custom_field_settings:
parameters:
- $ref: '#/components/parameters/portfolio_path_gid'
- $ref: '#/components/parameters/pretty'
- $ref: '#/components/parameters/fields'
- $ref: '#/components/parameters/limit'
- $ref: '#/components/parameters/offset'
get:
summary: Get a portfolio's custom fields
description: >-
Returns a list of all of the custom fields settings on a portfolio, in
compact form.
tags:
- Custom field settings
operationId: getCustomFieldSettingsForPortfolio
responses:
200:
description: >-
Successfully retrieved custom field settings objects for a portfolio.
content:
application/json:
schema:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/CustomFieldSettingResponse'
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: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
List result = client.customfieldsettings.getCustomFieldSettingsForPortfolio(portfolioGid)
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.customfieldsettings.getCustomFieldSettingsForPortfolio(portfolioGid,
{param: "value", param: "value", opt_pretty: true})
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.custom_field_settings.get_custom_field_settings_for_portfolio(portfolio_gid,
{'param': 'value', 'param': 'value'}, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
customfieldsettings->getCustomFieldSettingsForPortfolio($portfolio_gid,
array('param' => 'value', 'param' => 'value'), array('opt_pretty' =>
'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.custom_field_settings.get_custom_field_settings_for_portfolio(portfolio_gid:
'portfolio_gid', param: "value", param: "value", options: {pretty: true})
/custom_fields:
parameters:
- $ref: '#/components/parameters/pretty'
- $ref: '#/components/parameters/fields'
- $ref: '#/components/parameters/limit'
- $ref: '#/components/parameters/offset'
post:
summary: Create a custom field
description: |-
Creates a new custom field in a workspace. Every custom field is required
to be created in a specific workspace, and this workspace cannot be
changed once set.
A custom field’s name must be unique within a workspace and not conflict
with names of existing task properties such as `Due Date` or `Assignee`.
A custom field’s type must be one of `text`, `enum`, `multi_enum`, `number`,
`date`, or `people`.
Returns the full record of the newly created custom field.
tags:
- Custom fields
operationId: createCustomField
requestBody:
description: The custom field object to create.
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/CustomFieldRequest'
responses:
201:
description: Custom field successfully created.
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/CustomFieldResponse'
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: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
CustomField result = client.customfields.createCustomField()
.data("field", "value")
.data("field", "value")
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.customfields.createCustomField({field: "value", field: "value",
pretty: true})
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.custom_fields.create_custom_field({'field': 'value',
'field': 'value'}, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
customfields->createCustomField(array('field' =>
'value', 'field' => 'value'), array('opt_pretty' => 'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.custom_fields.create_custom_field(field: "value", field:
"value", options: {pretty: true})
/custom_fields/{custom_field_gid}:
parameters:
- $ref: '#/components/parameters/custom_field_path_gid'
- $ref: '#/components/parameters/pretty'
- $ref: '#/components/parameters/fields'
get:
summary: Get a custom field
description: |-
Get the complete definition of a custom field’s metadata.
Since custom fields can be defined for one of a number of types, and
these types have different data and behaviors, there are fields that are
relevant to a particular type. For instance, as noted above, enum_options
is only relevant for the enum type and defines the set of choices that
the enum could represent. The examples below show some of these
type-specific custom field definitions.
tags:
- Custom fields
operationId: getCustomField
responses:
200:
description: >-
Successfully retrieved the complete definition of a custom field’s
metadata.
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/CustomFieldResponse'
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: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
CustomField result = client.customfields.getCustomField(customFieldGid)
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.customfields.getCustomField(customFieldGid, {param: "value",
param: "value", opt_pretty: true})
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.custom_fields.get_custom_field(custom_field_gid, {'param':
'value', 'param': 'value'}, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
customfields->getCustomField($custom_field_gid, array('param'
=> 'value', 'param' => 'value'), array('opt_pretty' => 'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.custom_fields.get_custom_field(custom_field_gid: 'custom_field_gid',
param: "value", param: "value", options: {pretty: true})
put:
summary: Update a custom field
description: >-
A specific, existing custom field can be updated by making a PUT request
on the URL for that custom field. Only the fields provided in the `data`
block will be updated; any unspecified fields will remain unchanged
When using this method, it is best to specify only those fields you wish
to change, or else you may overwrite changes made by another user since
you last retrieved the custom field.
A custom field’s `type` cannot be updated.
An enum custom field’s `enum_options` cannot be updated with this
endpoint.
Instead see “Work With Enum Options” for information on how to update
`enum_options`.
Locked custom fields can only be updated by the user who locked the field.
Returns the complete updated custom field record.
tags:
- Custom fields
operationId: updateCustomField
requestBody:
description: The custom field object with all updated properties.
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/CustomFieldRequest'
responses:
200:
description: The custom field was successfully updated.
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/CustomFieldResponse'
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: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
CustomField result = client.customfields.updateCustomField(customFieldGid)
.data("field", "value")
.data("field", "value")
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.customfields.updateCustomField(customFieldGid, {field: "value",
field: "value", pretty: true})
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.custom_fields.update_custom_field(custom_field_gid,
{'field': 'value', 'field': 'value'}, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
customfields->updateCustomField($custom_field_gid,
array('field' => 'value', 'field' => 'value'), array('opt_pretty' =>
'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.custom_fields.update_custom_field(custom_field_gid:
'custom_field_gid', field: "value", field: "value", options: {pretty:
true})
delete:
summary: Delete a custom field
description: >-
A specific, existing custom field can be deleted by making a DELETE
request on the URL for that custom field.
Locked custom fields can only be deleted by the user who locked the field.
Returns an empty data record.
tags:
- Custom fields
operationId: deleteCustomField
responses:
200:
description: The custom field was successfully deleted.
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/EmptyResponse'
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: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
JsonElement result = client.customfields.deleteCustomField(customFieldGid)
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.customfields.deleteCustomField(customFieldGid)
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.custom_fields.delete_custom_field(custom_field_gid,
opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
customfields->deleteCustomField($custom_field_gid,
array('opt_pretty' => 'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.custom_fields.delete_custom_field(custom_field_gid:
'custom_field_gid', options: {pretty: true})
/workspaces/{workspace_gid}/custom_fields:
parameters:
- $ref: '#/components/parameters/workspace_path_gid'
- $ref: '#/components/parameters/pretty'
- $ref: '#/components/parameters/fields'
- $ref: '#/components/parameters/limit'
- $ref: '#/components/parameters/offset'
get:
summary: Get a workspace's custom fields
description: >-
Returns a list of the compact representation of all of the custom fields
in a workspace.
tags:
- Custom fields
operationId: getCustomFieldsForWorkspace
responses:
200:
description: >-
Successfully retrieved all custom fields for the given workspace.
content:
application/json:
schema:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/CustomFieldResponse'
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: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
List result = client.customfields.getCustomFieldsForWorkspace(workspaceGid)
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.customfields.getCustomFieldsForWorkspace(workspaceGid, {param:
"value", param: "value", opt_pretty: true})
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.custom_fields.get_custom_fields_for_workspace(workspace_gid,
{'param': 'value', 'param': 'value'}, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
customfields->getCustomFieldsForWorkspace($workspace_gid,
array('param' => 'value', 'param' => 'value'), array('opt_pretty' =>
'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.custom_fields.get_custom_fields_for_workspace(workspace_gid:
'workspace_gid', param: "value", param: "value", options: {pretty: true})
/custom_fields/{custom_field_gid}/enum_options:
parameters:
- $ref: '#/components/parameters/custom_field_path_gid'
- $ref: '#/components/parameters/pretty'
- $ref: '#/components/parameters/fields'
- $ref: '#/components/parameters/limit'
- $ref: '#/components/parameters/offset'
post:
summary: Create an enum option
description: >-
Creates an enum option and adds it to this custom field’s list of enum
options. A custom field can have at most 500 enum options (including
disabled options). By default new enum options are inserted at the end of
a custom field’s list.
Locked custom fields can only have enum options added by the user who locked
the field.
Returns the full record of the newly created enum option.
tags:
- Custom fields
operationId: createEnumOptionForCustomField
requestBody:
description: The enum option object to create.
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/EnumOptionRequest'
responses:
201:
description: Custom field enum option successfully created.
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/EnumOption'
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: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
JsonElement result = client.customfields.createEnumOptionForCustomField(customFieldGid)
.data("field", "value")
.data("field", "value")
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.customfields.createEnumOptionForCustomField(customFieldGid, {field:
"value", field: "value", pretty: true})
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.custom_fields.create_enum_option_for_custom_field(custom_field_gid,
{'field': 'value', 'field': 'value'}, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
customfields->createEnumOptionForCustomField($custom_field_gid,
array('field' => 'value', 'field' => 'value'), array('opt_pretty' =>
'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.custom_fields.create_enum_option_for_custom_field(custom_field_gid:
'custom_field_gid', field: "value", field: "value", options: {pretty:
true})
/custom_fields/{custom_field_gid}/enum_options/insert:
parameters:
- $ref: '#/components/parameters/custom_field_path_gid'
- $ref: '#/components/parameters/pretty'
- $ref: '#/components/parameters/fields'
post:
summary: Reorder a custom field's enum
description: >-
Moves a particular enum option to be either before or after another
specified enum option in the custom field.
Locked custom fields can only be reordered by the user who locked the field.
tags:
- Custom fields
operationId: insertEnumOptionForCustomField
requestBody:
description: The enum option object to create.
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/EnumOptionInsertRequest'
responses:
200:
description: Custom field enum option successfully reordered.
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/EnumOption'
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: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
JsonElement result = client.customfields.insertEnumOptionForCustomField(customFieldGid)
.data("field", "value")
.data("field", "value")
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.customfields.insertEnumOptionForCustomField(customFieldGid, {field:
"value", field: "value", pretty: true})
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.custom_fields.insert_enum_option_for_custom_field(custom_field_gid,
{'field': 'value', 'field': 'value'}, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
customfields->insertEnumOptionForCustomField($custom_field_gid,
array('field' => 'value', 'field' => 'value'), array('opt_pretty' =>
'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.custom_fields.insert_enum_option_for_custom_field(custom_field_gid:
'custom_field_gid', field: "value", field: "value", options: {pretty:
true})
/enum_options/{enum_option_gid}:
parameters:
- name: enum_option_gid
in: path
required: true
description: >-
Globally unique identifier for the enum option.
schema:
type: string
example: '124578'
- $ref: '#/components/parameters/pretty'
- $ref: '#/components/parameters/fields'
put:
summary: Update an enum option
description: >-
Updates an existing enum option. Enum custom fields require at least one
enabled enum option.
Locked custom fields can only be updated by the user who locked the field.
Returns the full record of the updated enum option.
tags:
- Custom fields
operationId: updateEnumOption
requestBody:
description: The enum option object to update
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/EnumOptionRequest'
responses:
200:
description: Successfully updated the specified custom field enum.
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/EnumOption'
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: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
JsonElement result = client.customfields.updateEnumOption(enumOptionGid)
.data("field", "value")
.data("field", "value")
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.customfields.updateEnumOption(enumOptionGid, {field: "value",
field: "value", pretty: true})
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.custom_fields.update_enum_option(enum_option_gid, {'field':
'value', 'field': 'value'}, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
customfields->updateEnumOption($enum_option_gid,
array('field' => 'value', 'field' => 'value'), array('opt_pretty' =>
'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.custom_fields.update_enum_option(enum_option_gid: 'enum_option_gid',
field: "value", field: "value", options: {pretty: true})
/events:
parameters:
- name: resource
in: query
required: true
description: >-
A resource ID to subscribe to. The resource can be a task or project.
schema:
type: string
example: '12345'
- name: sync
in: query
required: false
description: >-
A sync token received from the last request, or none on first sync.
Events will be returned from the point in time that the sync token was
generated.
*Note: On your first request, omit the sync token. The response will
be the same as for an expired sync token, and will include a new valid
sync token.If the sync token is too old (which may happen from time to
time) the API will return a `412 Precondition Failed` error, and
include a fresh sync token in the response.*
schema:
type: string
example: de4774f6915eae04714ca93bb2f5ee81
- $ref: '#/components/parameters/pretty'
- $ref: '#/components/parameters/fields'
get:
summary: Get events on a resource
description: |-
Returns the full record for all events that have occurred since the sync
token was created.
A `GET` request to the endpoint `/[path_to_resource]/events` can be made in
lieu of including the resource ID in the data for the request.
Asana limits a single sync token to 100 events. If more than 100 events exist
for a given resource, `has_more: true` will be returned in the response, indicating
that there are more events to pull.
*Note: The resource returned will be the resource that triggered the
event. This may be different from the one that the events were requested
for. For example, a subscription to a project will contain events for
tasks contained within the project.*
tags:
- Events
operationId: getEvents
responses:
200:
description: Successfully retrieved events.
content:
application/json:
schema:
type: object
description: >-
The full record for all events that have occurred since the sync
token was
created.
properties:
data:
type: array
items:
$ref: '#/components/schemas/EventResponse'
sync:
description: A sync token to be used with the next call to the
/events endpoint.
type: string
example: de4774f6915eae04714ca93bb2f5ee81
has_more:
description: Indicates whether there are more events to pull.
type: boolean
example: true
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: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
List result = client.events.getEvents(sync, resource)
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.events.getEvents({param: "value", param: "value", opt_pretty:
true})
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.events.get_events({'param': 'value', 'param': 'value'},
opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
events->getEvents(array('param' => 'value', 'param'
=> 'value'), array('opt_pretty' => 'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.events.get_events(resource: ''resource_example'',
param: "value", param: "value", options: {pretty: true})
/goal_relationships/{goal_relationship_gid}:
parameters:
- $ref: '#/components/parameters/goal_relationship_path_gid'
- $ref: '#/components/parameters/pretty'
- $ref: '#/components/parameters/fields'
get:
summary: Get a goal relationship
description: |-
Returns the complete updated goal relationship record for a single goal relationship.
tags:
- Goal relationships
operationId: getGoalRelationship
responses:
200:
description: Successfully retrieved the record for the goal relationship.
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/GoalRelationshipResponse'
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: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
JsonElement result = client.goalrelationships.getGoalRelationship(goalRelationshipGid)
.option("pretty", true)
.execute();
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.goal_relationships.get_goal_relationship(goal_relationship_gid,
{'param': 'value', 'param': 'value'}, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
goalrelationships->getGoalRelationship($goal_relationship_gid,
array('param' => 'value', 'param' => 'value'), array('opt_pretty' =>
'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.goal_relationships.get_goal_relationship(goal_relationship_gid:
'goal_relationship_gid', param: "value", param: "value", options: {pretty:
true})
put:
summary: Update a goal relationship
description: |-
An existing goal relationship can be updated by making a PUT request on the URL for
that goal relationship. Only the fields provided in the `data` block will be updated;
any unspecified fields will remain unchanged.
Returns the complete updated goal relationship record.
tags:
- Goal relationships
operationId: updateGoalRelationship
requestBody:
description: The updated fields for the goal relationship.
required: true
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/GoalRelationshipRequest'
responses:
200:
description: Successfully updated the goal relationship.
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/GoalRelationshipResponse'
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: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
JsonElement result = client.goalrelationships.updateGoalRelationship(goalRelationshipGid)
.data("field", "value")
.data("field", "value")
.option("pretty", true)
.execute();
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.goal_relationships.update_goal_relationship(goal_relationship_gid,
{'field': 'value', 'field': 'value'}, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
goalrelationships->updateGoalRelationship($goal_relationship_gid,
array('field' => 'value', 'field' => 'value'), array('opt_pretty' =>
'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.goal_relationships.update_goal_relationship(goal_relationship_gid:
'goal_relationship_gid', field: "value", field: "value", options: {pretty:
true})
/goal_relationships:
get:
summary: Get goal relationships
description: |-
Returns compact goal relationship records.
tags:
- Goal relationships
operationId: getGoalRelationships
parameters:
- $ref: '#/components/parameters/pretty'
- $ref: '#/components/parameters/fields'
- name: supported_goal
required: true
in: query
description: Globally unique identifier for the supported goal in the goal
relationship.
schema:
type: string
example: '12345'
- name: resource_subtype
in: query
description: If provided, filter to goal relationships with a given resource_subtype.
schema:
type: string
example: subgoal
responses:
200:
description: Successfully retrieved the requested goal relationships.
content:
application/json:
schema:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/GoalRelationshipCompact'
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: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
List result = client.goalrelationships.getGoalRelationships(resourceSubtype,
supportedGoal)
.option("pretty", true)
.execute();
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.goal_relationships.get_goal_relationships({'param':
'value', 'param': 'value'}, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
goalrelationships->getGoalRelationships(array('param'
=> 'value', 'param' => 'value'), array('opt_pretty' => 'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.goal_relationships.get_goal_relationships(supported_goal:
''supported_goal_example'', param: "value", param: "value",
options: {pretty: true})
/goals/{goal_gid}/addSupportingRelationship:
parameters:
- $ref: '#/components/parameters/goal_path_gid'
- $ref: '#/components/parameters/pretty'
- $ref: '#/components/parameters/fields'
post:
summary: Add a supporting goal relationship
description: |-
Creates a goal relationship by adding a supporting resource to a given goal.
Returns the newly created goal relationship record.
tags:
- Goal relationships
operationId: addSupportingRelationship
requestBody:
description: The supporting resource to be added to the goal
required: true
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/GoalAddSupportingRelationshipRequest'
responses:
200:
description: Successfully created the goal relationship.
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/GoalRelationshipResponse'
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: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
JsonElement result = client.goalrelationships.addSupportingRelationship(goalGid)
.data("field", "value")
.data("field", "value")
.option("pretty", true)
.execute();
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.goal_relationships.add_supporting_relationship(goal_gid,
{'field': 'value', 'field': 'value'}, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
goalrelationships->addSupportingRelationship($goal_gid,
array('field' => 'value', 'field' => 'value'), array('opt_pretty' =>
'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.goal_relationships.add_supporting_relationship(goal_gid:
'goal_gid', field: "value", field: "value", options: {pretty: true})
/goals/{goal_gid}/removeSupportingRelationship:
parameters:
- $ref: '#/components/parameters/goal_path_gid'
- $ref: '#/components/parameters/pretty'
- $ref: '#/components/parameters/fields'
post:
summary: Removes a supporting goal relationship
description: |-
Removes a goal relationship for a given parent goal.
tags:
- Goal relationships
operationId: removeSupportingRelationship
requestBody:
description: The supporting resource to be removed from the goal
required: true
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/GoalRemoveSupportingRelationshipRequest'
responses:
200:
description: Successfully removed the goal relationship.
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/EmptyResponse'
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: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
JsonElement result = client.goalrelationships.removeSupportingRelationship(goalGid)
.data("field", "value")
.data("field", "value")
.option("pretty", true)
.execute();
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.goal_relationships.remove_supporting_relationship(goal_gid,
{'field': 'value', 'field': 'value'}, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
goalrelationships->removeSupportingRelationship($goal_gid,
array('field' => 'value', 'field' => 'value'), array('opt_pretty' =>
'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.goal_relationships.remove_supporting_relationship(goal_gid:
'goal_gid', field: "value", field: "value", options: {pretty: true})
/goals/{goal_gid}:
parameters:
- $ref: '#/components/parameters/goal_path_gid'
- $ref: '#/components/parameters/pretty'
- $ref: '#/components/parameters/fields'
get:
summary: Get a goal
description: Returns the complete goal record for a single goal.
operationId: getGoal
tags:
- Goals
responses:
200:
description: Successfully retrieved the record for a single goal.
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/GoalResponse'
400:
$ref: '#/components/responses/BadRequest'
401:
$ref: '#/components/responses/Unauthorized'
402:
$ref: '#/components/responses/PaymentRequired'
403:
$ref: '#/components/responses/Forbidden'
404:
$ref: '#/components/responses/NotFound'
500:
$ref: '#/components/responses/InternalServerError'
x-readme:
code-samples:
- language: java
install: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
JsonElement result = client.goals.getGoal(goalGid)
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.goals.getGoal(goalGid, {param: "value", param: "value", opt_pretty:
true})
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.goals.get_goal(goal_gid, {'param': 'value', 'param':
'value'}, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
goals->getGoal($goal_gid, array('param' => 'value',
'param' => 'value'), array('opt_pretty' => 'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.goals.get_goal(goal_gid: 'goal_gid', param: "value",
param: "value", options: {pretty: true})
put:
summary: Update a goal
description: |-
An existing goal can be updated by making a PUT request on the URL for
that goal. Only the fields provided in the `data` block will be updated;
any unspecified fields will remain unchanged.
Returns the complete updated goal record.
tags:
- Goals
operationId: updateGoal
requestBody:
description: The updated fields for the goal.
required: true
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/GoalRequest'
responses:
200:
description: Successfully updated the goal.
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/GoalResponse'
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: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
JsonElement result = client.goals.updateGoal(goalGid)
.data("field", "value")
.data("field", "value")
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.goals.updateGoal(goalGid, {field: "value", field: "value", pretty:
true})
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.goals.update_goal(goal_gid, {'field': 'value', 'field':
'value'}, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
goals->updateGoal($goal_gid, array('field' => 'value',
'field' => 'value'), array('opt_pretty' => 'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.goals.update_goal(goal_gid: 'goal_gid', field: "value",
field: "value", options: {pretty: true})
delete:
summary: Delete a goal
description: |-
A specific, existing goal can be deleted by making a DELETE request on the URL for that goal.
Returns an empty data record.
tags:
- Goals
operationId: deleteGoal
responses:
200:
description: Successfully deleted the specified goal.
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/EmptyResponse'
400:
$ref: '#/components/responses/BadRequest'
401:
$ref: '#/components/responses/Unauthorized'
402:
$ref: '#/components/responses/PaymentRequired'
403:
$ref: '#/components/responses/Forbidden'
404:
$ref: '#/components/responses/NotFound'
500:
$ref: '#/components/responses/InternalServerError'
x-readme:
code-samples:
- language: java
install: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
JsonElement result = client.goals.deleteGoal(goalGid)
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.goals.deleteGoal(goalGid)
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.goals.delete_goal(goal_gid, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
goals->deleteGoal($goal_gid, array('opt_pretty' =>
'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.goals.delete_goal(goal_gid: 'goal_gid', options: {pretty:
true})
/goals:
parameters:
- $ref: '#/components/parameters/pretty'
- $ref: '#/components/parameters/fields'
- $ref: '#/components/parameters/limit'
- $ref: '#/components/parameters/offset'
get:
summary: Get goals
description: >-
Returns compact goal records.
tags:
- Goals
operationId: getGoals
parameters:
- name: portfolio
in: query
description: Globally unique identifier for supporting portfolio.
schema:
type: string
example: '159874'
- name: project
in: query
description: Globally unique identifier for supporting project.
schema:
type: string
example: '512241'
- name: is_workspace_level
in: query
description: Filter to goals with is_workspace_level set to query value.
Must be used with the workspace parameter.
schema:
type: boolean
example: false
- name: team
in: query
description: Globally unique identifier for the team.
schema:
type: string
example: '31326'
- name: workspace
in: query
description: Globally unique identifier for the workspace.
schema:
type: string
example: '31326'
- name: time_periods
in: query
description: Globally unique identifiers for the time periods.
schema:
type: array
items:
type: string
example: 221693,506165
responses:
200:
description: >-
Successfully retrieved the requested goals.
content:
application/json:
schema:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/GoalCompact'
400:
$ref: '#/components/responses/BadRequest'
401:
$ref: '#/components/responses/Unauthorized'
402:
$ref: '#/components/responses/PaymentRequired'
403:
$ref: '#/components/responses/Forbidden'
404:
$ref: '#/components/responses/NotFound'
500:
$ref: '#/components/responses/InternalServerError'
x-readme:
code-samples:
- language: java
install: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
List result = client.goals.getGoals(timePeriods, workspace,
team, isWorkspaceLevel, project, portfolio)
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.goals.getGoals({param: "value", param: "value", opt_pretty: true})
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.goals.get_goals({'param': 'value', 'param': 'value'},
opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
goals->getGoals(array('param' => 'value', 'param'
=> 'value'), array('opt_pretty' => 'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.goals.get_goals(param: "value", param: "value", options:
{pretty: true})
post:
summary: Create a goal
description: |-
Creates a new goal in a workspace or team.
Returns the full record of the newly created goal.
tags:
- Goals
operationId: createGoal
requestBody:
description: The goal to create.
required: true
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/GoalRequest'
responses:
201:
description: Successfully created a new goal.
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/GoalResponse'
400:
$ref: '#/components/responses/BadRequest'
401:
$ref: '#/components/responses/Unauthorized'
402:
$ref: '#/components/responses/PaymentRequired'
403:
$ref: '#/components/responses/Forbidden'
404:
$ref: '#/components/responses/NotFound'
500:
$ref: '#/components/responses/InternalServerError'
x-readme:
code-samples:
- language: java
install: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
JsonElement result = client.goals.createGoal()
.data("field", "value")
.data("field", "value")
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.goals.createGoal({field: "value", field: "value", pretty: true})
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.goals.create_goal({'field': 'value', 'field': 'value'},
opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
goals->createGoal(array('field' => 'value', 'field'
=> 'value'), array('opt_pretty' => 'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.goals.create_goal(field: "value", field: "value", options:
{pretty: true})
/goals/{goal_gid}/setMetric:
parameters:
- $ref: '#/components/parameters/goal_path_gid'
- $ref: '#/components/parameters/pretty'
- $ref: '#/components/parameters/fields'
post:
summary: Create a goal metric
description: >-
Creates and adds a goal metric to a specified goal. Note that this replaces
an existing goal metric if one already exists.
tags:
- Goals
operationId: createGoalMetric
requestBody:
description: The goal metric to create.
required: true
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/GoalMetricRequest'
responses:
200:
description: Successfully created a new goal metric.
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/GoalResponse'
400:
$ref: '#/components/responses/BadRequest'
401:
$ref: '#/components/responses/Unauthorized'
402:
$ref: '#/components/responses/PaymentRequired'
403:
$ref: '#/components/responses/Forbidden'
404:
$ref: '#/components/responses/NotFound'
500:
$ref: '#/components/responses/InternalServerError'
x-readme:
code-samples:
- language: java
install: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
JsonElement result = client.goals.createGoalMetric(goalGid)
.data("field", "value")
.data("field", "value")
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.goals.createGoalMetric(goalGid, {field: "value", field: "value",
pretty: true})
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.goals.create_goal_metric(goal_gid, {'field': 'value',
'field': 'value'}, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
goals->createGoalMetric($goal_gid, array('field'
=> 'value', 'field' => 'value'), array('opt_pretty' => 'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.goals.create_goal_metric(goal_gid: 'goal_gid', field:
"value", field: "value", options: {pretty: true})
/goals/{goal_gid}/setMetricCurrentValue:
parameters:
- $ref: '#/components/parameters/goal_path_gid'
- $ref: '#/components/parameters/pretty'
- $ref: '#/components/parameters/fields'
post:
summary: Update a goal metric
description: |-
Updates a goal's existing metric's `current_number_value` if one exists,
otherwise responds with a 400 status code.
Returns the complete updated goal metric record.
tags:
- Goals
operationId: updateGoalMetric
requestBody:
description: The updated fields for the goal metric.
required: true
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/GoalMetricCurrentValueRequest'
responses:
200:
description: Successfully updated the goal metric.
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/GoalResponse'
400:
$ref: '#/components/responses/BadRequest'
401:
$ref: '#/components/responses/Unauthorized'
402:
$ref: '#/components/responses/PaymentRequired'
403:
$ref: '#/components/responses/Forbidden'
404:
$ref: '#/components/responses/NotFound'
500:
$ref: '#/components/responses/InternalServerError'
x-readme:
code-samples:
- language: java
install: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
JsonElement result = client.goals.updateGoalMetric(goalGid)
.data("field", "value")
.data("field", "value")
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.goals.updateGoalMetric(goalGid, {field: "value", field: "value",
pretty: true})
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.goals.update_goal_metric(goal_gid, {'field': 'value',
'field': 'value'}, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
goals->updateGoalMetric($goal_gid, array('field'
=> 'value', 'field' => 'value'), array('opt_pretty' => 'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.goals.update_goal_metric(goal_gid: 'goal_gid', field:
"value", field: "value", options: {pretty: true})
/goals/{goal_gid}/addFollowers:
parameters:
- $ref: '#/components/parameters/goal_path_gid'
- $ref: '#/components/parameters/pretty'
- $ref: '#/components/parameters/fields'
post:
summary: Add a collaborator to a goal
description: >-
Adds followers to a goal. Returns the goal the followers were added to.
Each goal can be associated with zero or more followers in the system.
Requests to add/remove followers, if successful, will return the complete
updated goal record, described above.
tags:
- Goals
operationId: addFollowers
requestBody:
description: The followers to be added as collaborators
required: true
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/TaskAddFollowersRequest'
responses:
200:
description: Successfully added users as collaborators.
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/GoalResponse'
400:
$ref: '#/components/responses/BadRequest'
401:
$ref: '#/components/responses/Unauthorized'
402:
$ref: '#/components/responses/PaymentRequired'
403:
$ref: '#/components/responses/Forbidden'
404:
$ref: '#/components/responses/NotFound'
500:
$ref: '#/components/responses/InternalServerError'
x-readme:
code-samples:
- language: java
install: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
JsonElement result = client.goals.addFollowers(goalGid)
.data("field", "value")
.data("field", "value")
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.goals.addFollowers(goalGid, {field: "value", field: "value",
pretty: true})
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.goals.add_followers(goal_gid, {'field': 'value', 'field':
'value'}, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
goals->addFollowers($goal_gid, array('field' => 'value',
'field' => 'value'), array('opt_pretty' => 'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.goals.add_followers(goal_gid: 'goal_gid', field: "value",
field: "value", options: {pretty: true})
/goals/{goal_gid}/removeFollowers:
parameters:
- $ref: '#/components/parameters/goal_path_gid'
- $ref: '#/components/parameters/pretty'
- $ref: '#/components/parameters/fields'
post:
summary: Remove a collaborator from a goal
description: "Removes followers from a goal. Returns the goal the followers\
\ were removed from.\nEach goal can be associated with zero or more followers\
\ in the system.\nRequests to add/remove followers, if successful, will return\
\ the complete updated goal record, described above."
tags:
- Goals
operationId: removeFollowers
requestBody:
description: The followers to be removed as collaborators
required: true
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/TaskAddFollowersRequest'
responses:
200:
description: Successfully removed users as collaborators.
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/GoalResponse'
400:
$ref: '#/components/responses/BadRequest'
401:
$ref: '#/components/responses/Unauthorized'
402:
$ref: '#/components/responses/PaymentRequired'
403:
$ref: '#/components/responses/Forbidden'
404:
$ref: '#/components/responses/NotFound'
500:
$ref: '#/components/responses/InternalServerError'
x-readme:
code-samples:
- language: java
install: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
JsonElement result = client.goals.removeFollowers(goalGid)
.data("field", "value")
.data("field", "value")
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.goals.removeFollowers(goalGid, {field: "value", field: "value",
pretty: true})
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.goals.remove_followers(goal_gid, {'field': 'value',
'field': 'value'}, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
goals->removeFollowers($goal_gid, array('field' =>
'value', 'field' => 'value'), array('opt_pretty' => 'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.goals.remove_followers(goal_gid: 'goal_gid', field:
"value", field: "value", options: {pretty: true})
/goals/{goal_gid}/parentGoals:
parameters:
- $ref: '#/components/parameters/goal_path_gid'
- $ref: '#/components/parameters/pretty'
- $ref: '#/components/parameters/fields'
get:
summary: Get parent goals from a goal
description: Returns a compact representation of all of the parent goals of
a goal.
tags:
- Goals
operationId: getParentGoalsForGoal
responses:
200:
description: Successfully retrieved the specified goal's parent goals.
content:
application/json:
schema:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/GoalCompact'
400:
$ref: '#/components/responses/BadRequest'
401:
$ref: '#/components/responses/Unauthorized'
402:
$ref: '#/components/responses/PaymentRequired'
403:
$ref: '#/components/responses/Forbidden'
404:
$ref: '#/components/responses/NotFound'
500:
$ref: '#/components/responses/InternalServerError'
x-readme:
code-samples:
- language: java
install: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
List result = client.goals.getParentGoalsForGoal(goalGid)
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.goals.getParentGoalsForGoal(goalGid, {param: "value", param:
"value", opt_pretty: true})
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.goals.get_parent_goals_for_goal(goal_gid, {'param':
'value', 'param': 'value'}, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
goals->getParentGoalsForGoal($goal_gid, array('param'
=> 'value', 'param' => 'value'), array('opt_pretty' => 'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.goals.get_parent_goals_for_goal(goal_gid: 'goal_gid',
param: "value", param: "value", options: {pretty: true})
/jobs/{job_gid}:
parameters:
- $ref: '#/components/parameters/job_path_gid'
- $ref: '#/components/parameters/pretty'
- $ref: '#/components/parameters/fields'
get:
summary: Get a job by id
description: |-
Returns the full record for a job.
tags:
- Jobs
operationId: getJob
responses:
200:
description: Successfully retrieved Job.
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/JobResponse'
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: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
Job result = client.jobs.getJob(jobGid)
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.jobs.getJob(jobGid, {param: "value", param: "value", opt_pretty:
true})
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.jobs.get_job(job_gid, {'param': 'value', 'param': 'value'},
opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
jobs->getJob($job_gid, array('param' => 'value',
'param' => 'value'), array('opt_pretty' => 'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.jobs.get_job(job_gid: 'job_gid', param: "value", param:
"value", options: {pretty: true})
/memberships:
parameters:
- $ref: '#/components/parameters/pretty'
- $ref: '#/components/parameters/fields'
get:
summary: Get multiple memberships
description: >-
Returns compact `goal_membership`, `team_membership`, `project_membership`,
`portfolio_membership`,
or `workspace_membership` records. The possible types
for `parent` in this request are `project`, `portfolio`, `team`, `goal`,
and `workspace`. An additional member (user GID or team GID) can be passed
in
to filter to a specific membership.
If a `parent` param is not provided, a `member`, `resource_subtype`, and `workspace`
param must be provided.
tags:
- Memberships
operationId: getMemberships
parameters:
- name: parent
in: query
description: >-
Globally unique identifier for `project`, `portfolio`,
`team`, `goal`, and `workspace`.
schema:
type: string
example: '159874'
- name: member
in: query
description: Globally unique identifier for `team` or `user`.
schema:
type: string
example: '1061493'
- name: resource_subtype
in: query
schema:
type: string
example: team_membership
description: >-
The resource_subtype to filter on.
Must be provided with `member` and `workspace` if `parent` is not provided.
Valid values include `team_membership`, `workspace_membership`, `portfolio_membership`
- name: workspace
in: query
schema:
type: string
example: '75642'
description: >-
The workspace to filter on.
Must be provided with `member` and `resource_subtype` if `parent` is not
provided.
- name: limit
in: query
description: Pagination limit for the request.
schema:
type: integer
example: 50
- name: offset
in: query
description: >-
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.'
example: eyJ0eXAiOJiKV1iQLCJhbGciOiJIUzI1NiJ9
schema:
type: string
responses:
200:
description: >-
Successfully retrieved the requested membership.
content:
application/json:
schema:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/MembershipResponse'
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: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.memberships.get_memberships({'param': 'value', 'param':
'value'}, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
memberships->getMemberships(array('param' => 'value',
'param' => 'value'), array('opt_pretty' => 'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.memberships.get_memberships(parent: ''parent_example'',
param: "value", param: "value", options: {pretty: true})
post:
summary: Create a membership
description: |-
Creates a new membership in a `team`, `project`, `goal`, or `portfolio`.
`Teams` or `users` can be a member of `goals`. `Project`, `team`, and
`portfolios` have users as members.
Returns the full record of the newly created membership.
tags:
- Memberships
operationId: createMembership
requestBody:
description: The updated fields for the membership.
required: false
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/CreateMembershipRequest'
responses:
200:
description: >-
Successfully created the requested membership.
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/MembershipResponse'
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: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.memberships.create_membership({'field': 'value', 'field':
'value'}, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
memberships->createMembership(array('field' => 'value',
'field' => 'value'), array('opt_pretty' => 'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.memberships.create_membership(field: "value", field:
"value", options: {pretty: true})
/memberships/{membership_gid}:
parameters:
- $ref: '#/components/parameters/membership_path_gid'
- $ref: '#/components/parameters/pretty'
- $ref: '#/components/parameters/fields'
delete:
summary: Delete a membership
description: |-
A specific, existing membership can be deleted by making a `DELETE` request
on the URL for that membership.
Returns an empty data record.
tags:
- Memberships
operationId: deleteMembership
responses:
200:
description: >-
Successfully deleted the requested membership.
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/EmptyResponse'
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: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.memberships.delete_membership(membership_gid, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
memberships->deleteMembership($membership_gid, array('opt_pretty'
=> 'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.memberships.delete_membership(membership_gid: 'membership_gid',
options: {pretty: true})
put:
summary: Update a membership
description: >-
An existing membership can be updated by making a `PUT` request on the URL
for
that goal. Only the fields provided in the `data` block will be updated;
any unspecified fields will remain unchanged. Memberships on `project`, `portfolio`,
`team`, and `goals` can be updated.
tags:
- Memberships
operationId: updateMembership
requestBody:
description: The updated fields for the membership.
required: false
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/MembershipRequest'
responses:
200:
description: >-
Successfully updated the requested membership.
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/MembershipResponse'
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: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.memberships.update_membership(membership_gid, {'field':
'value', 'field': 'value'}, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
memberships->updateMembership($membership_gid, array('field'
=> 'value', 'field' => 'value'), array('opt_pretty' => 'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.memberships.update_membership(membership_gid: 'membership_gid',
field: "value", field: "value", options: {pretty: true})
/organization_exports:
parameters:
- $ref: '#/components/parameters/pretty'
- $ref: '#/components/parameters/fields'
- $ref: '#/components/parameters/limit'
- $ref: '#/components/parameters/offset'
post:
summary: Create an organization export request
description: >-
This method creates a request to export an Organization. Asana will
complete the export at some point after you create the request.
tags:
- Organization exports
operationId: createOrganizationExport
requestBody:
description: The organization to export.
required: true
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/OrganizationExportRequest'
responses:
201:
description: Successfully created organization export request.
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/OrganizationExportResponse'
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: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
OrganizationExport result = client.organizationexports.createOrganizationExport()
.data("field", "value")
.data("field", "value")
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.organizationexports.createOrganizationExport({field: "value",
field: "value", pretty: true})
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.organization_exports.create_organization_export({'field':
'value', 'field': 'value'}, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
organizationexports->createOrganizationExport(array('field'
=> 'value', 'field' => 'value'), array('opt_pretty' => 'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.organization_exports.create_organization_export(field:
"value", field: "value", options: {pretty: true})
/organization_exports/{organization_export_gid}:
parameters:
- $ref: '#/components/parameters/organization_export_path_gid'
- $ref: '#/components/parameters/pretty'
- $ref: '#/components/parameters/fields'
get:
summary: Get details on an org export request
description: >-
Returns details of a previously-requested Organization export.
tags:
- Organization exports
operationId: getOrganizationExport
responses:
200:
description: Successfully retrieved organization export object.
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/OrganizationExportResponse'
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: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
OrganizationExport result = client.organizationexports.getOrganizationExport(organizationExportGid)
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.organizationexports.getOrganizationExport(organizationExportGid,
{param: "value", param: "value", opt_pretty: true})
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.organization_exports.get_organization_export(organization_export_gid,
{'param': 'value', 'param': 'value'}, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
organizationexports->getOrganizationExport($organization_export_gid,
array('param' => 'value', 'param' => 'value'), array('opt_pretty' =>
'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.organization_exports.get_organization_export(organization_export_gid:
'organization_export_gid', param: "value", param: "value", options:
{pretty: true})
/portfolio_memberships:
parameters:
- $ref: '#/components/parameters/portfolio_query_param'
- $ref: '#/components/parameters/workspace_query_param'
- $ref: '#/components/parameters/user_query_param'
- $ref: '#/components/parameters/pretty'
- $ref: '#/components/parameters/fields'
- $ref: '#/components/parameters/limit'
- $ref: '#/components/parameters/offset'
get:
summary: Get multiple portfolio memberships
description: >-
Returns a list of portfolio memberships in compact representation. You must
specify `portfolio`, `portfolio` and `user`, or `workspace` and `user`.
tags:
- Portfolio memberships
operationId: getPortfolioMemberships
responses:
200:
description: Successfully retrieved portfolio memberships.
content:
application/json:
schema:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/PortfolioMembershipCompact'
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: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
List result = client.portfoliomemberships.getPortfolioMemberships(user,
workspace, portfolio)
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.portfoliomemberships.getPortfolioMemberships({param: "value",
param: "value", opt_pretty: true})
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.portfolio_memberships.get_portfolio_memberships({'param':
'value', 'param': 'value'}, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
portfoliomemberships->getPortfolioMemberships(array('param'
=> 'value', 'param' => 'value'), array('opt_pretty' => 'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.portfolio_memberships.get_portfolio_memberships(param:
"value", param: "value", options: {pretty: true})
/portfolio_memberships/{portfolio_membership_gid}:
parameters:
- $ref: '#/components/parameters/portfolio_membership_path_gid'
- $ref: '#/components/parameters/pretty'
- $ref: '#/components/parameters/fields'
get:
summary: Get a portfolio membership
description: >-
Returns the complete portfolio record for a single portfolio membership.
tags:
- Portfolio memberships
operationId: getPortfolioMembership
responses:
200:
description: >-
Successfully retrieved the requested portfolio membership.
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/PortfolioMembershipResponse'
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: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
PortfolioMembership result = client.portfoliomemberships.getPortfolioMembership(portfolioMembershipGid)
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.portfoliomemberships.getPortfolioMembership(portfolioMembershipGid,
{param: "value", param: "value", opt_pretty: true})
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.portfolio_memberships.get_portfolio_membership(portfolio_membership_gid,
{'param': 'value', 'param': 'value'}, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
portfoliomemberships->getPortfolioMembership($portfolio_membership_gid,
array('param' => 'value', 'param' => 'value'), array('opt_pretty' =>
'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.portfolio_memberships.get_portfolio_membership(portfolio_membership_gid:
'portfolio_membership_gid', param: "value", param: "value", options:
{pretty: true})
/portfolios/{portfolio_gid}/portfolio_memberships:
parameters:
- $ref: '#/components/parameters/portfolio_path_gid'
- $ref: '#/components/parameters/user_query_param'
- $ref: '#/components/parameters/pretty'
- $ref: '#/components/parameters/fields'
- $ref: '#/components/parameters/limit'
- $ref: '#/components/parameters/offset'
get:
summary: Get memberships from a portfolio
description: >-
Returns the compact portfolio membership records for the portfolio.
tags:
- Portfolio memberships
operationId: getPortfolioMembershipsForPortfolio
responses:
200:
description: >-
Successfully retrieved the requested portfolio's memberships.
content:
application/json:
schema:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/PortfolioMembershipCompact'
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: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
List result = client.portfoliomemberships.getPortfolioMembershipsForPortfolio(portfolioGid,
user)
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.portfoliomemberships.getPortfolioMembershipsForPortfolio(portfolioGid,
{param: "value", param: "value", opt_pretty: true})
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.portfolio_memberships.get_portfolio_memberships_for_portfolio(portfolio_gid,
{'param': 'value', 'param': 'value'}, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
portfoliomemberships->getPortfolioMembershipsForPortfolio($portfolio_gid,
array('param' => 'value', 'param' => 'value'), array('opt_pretty' =>
'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.portfolio_memberships.get_portfolio_memberships_for_portfolio(portfolio_gid:
'portfolio_gid', param: "value", param: "value", options: {pretty: true})
/portfolios:
parameters:
- $ref: '#/components/parameters/pretty'
- $ref: '#/components/parameters/fields'
get:
summary: Get multiple portfolios
description: >-
Returns a list of the portfolios in compact representation that are
owned by the current API user.
tags:
- Portfolios
operationId: getPortfolios
parameters:
- $ref: '#/components/parameters/limit'
- $ref: '#/components/parameters/offset'
- name: workspace
in: query
required: true
description: >-
The workspace or organization to filter portfolios on.
schema:
type: string
example: '1331'
- name: owner
in: query
required: true
description: The user who owns the portfolio. Currently, API users can only
get a list of portfolios that they themselves own.
schema:
type: string
example: '14916'
responses:
200:
description: Successfully retrieved portfolios.
content:
application/json:
schema:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/PortfolioCompact'
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: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
List result = client.portfolios.getPortfolios(owner, workspace)
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.portfolios.getPortfolios({param: "value", param: "value", opt_pretty:
true})
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.portfolios.get_portfolios({'param': 'value', 'param':
'value'}, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
portfolios->getPortfolios(array('param' => 'value',
'param' => 'value'), array('opt_pretty' => 'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.portfolios.get_portfolios(workspace: ''workspace_example'',
owner: ''owner_example'', param: "value", param: "value",
options: {pretty: true})
post:
summary: Create a portfolio
description: |-
Creates a new portfolio in the given workspace with the supplied name.
Note that portfolios created in the Asana UI may have some state
(like the “Priority” custom field) which is automatically added
to the portfolio when it is created. Portfolios created via our
API will *not* be created with the same initial state to allow
integrations to create their own starting state on a portfolio.
tags:
- Portfolios
operationId: createPortfolio
requestBody:
description: The portfolio to create.
required: true
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/PortfolioRequest'
responses:
201:
description: Successfully created portfolio.
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/PortfolioResponse'
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: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
Portfolio result = client.portfolios.createPortfolio()
.data("field", "value")
.data("field", "value")
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.portfolios.createPortfolio({field: "value", field: "value", pretty:
true})
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.portfolios.create_portfolio({'field': 'value', 'field':
'value'}, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
portfolios->createPortfolio(array('field' => 'value',
'field' => 'value'), array('opt_pretty' => 'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.portfolios.create_portfolio(field: "value", field: "value",
options: {pretty: true})
/portfolios/{portfolio_gid}:
parameters:
- $ref: '#/components/parameters/portfolio_path_gid'
- $ref: '#/components/parameters/pretty'
- $ref: '#/components/parameters/fields'
get:
summary: Get a portfolio
description: Returns the complete portfolio record for a single portfolio.
tags:
- Portfolios
operationId: getPortfolio
responses:
200:
description: Successfully retrieved the requested portfolio.
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/PortfolioResponse'
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: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
Portfolio result = client.portfolios.getPortfolio(portfolioGid)
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.portfolios.getPortfolio(portfolioGid, {param: "value", param:
"value", opt_pretty: true})
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.portfolios.get_portfolio(portfolio_gid, {'param': 'value',
'param': 'value'}, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
portfolios->getPortfolio($portfolio_gid, array('param'
=> 'value', 'param' => 'value'), array('opt_pretty' => 'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.portfolios.get_portfolio(portfolio_gid: 'portfolio_gid',
param: "value", param: "value", options: {pretty: true})
put:
summary: Update a portfolio
description: |-
An existing portfolio can be updated by making a PUT request on the URL for
that portfolio. Only the fields provided in the `data` block will be updated;
any unspecified fields will remain unchanged.
Returns the complete updated portfolio record.
tags:
- Portfolios
operationId: updatePortfolio
requestBody:
description: The updated fields for the portfolio.
required: true
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/PortfolioRequest'
responses:
200:
description: Successfully updated the portfolio.
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/PortfolioResponse'
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: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
Portfolio result = client.portfolios.updatePortfolio(portfolioGid)
.data("field", "value")
.data("field", "value")
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.portfolios.updatePortfolio(portfolioGid, {field: "value", field:
"value", pretty: true})
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.portfolios.update_portfolio(portfolio_gid, {'field':
'value', 'field': 'value'}, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
portfolios->updatePortfolio($portfolio_gid, array('field'
=> 'value', 'field' => 'value'), array('opt_pretty' => 'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.portfolios.update_portfolio(portfolio_gid: 'portfolio_gid',
field: "value", field: "value", options: {pretty: true})
delete:
summary: Delete a portfolio
description: |-
An existing portfolio can be deleted by making a DELETE request on
the URL for that portfolio.
Returns an empty data record.
tags:
- Portfolios
operationId: deletePortfolio
responses:
200:
description: Successfully deleted the specified portfolio.
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/EmptyResponse'
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: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
JsonElement result = client.portfolios.deletePortfolio(portfolioGid)
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.portfolios.deletePortfolio(portfolioGid)
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.portfolios.delete_portfolio(portfolio_gid, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
portfolios->deletePortfolio($portfolio_gid, array('opt_pretty'
=> 'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.portfolios.delete_portfolio(portfolio_gid: 'portfolio_gid',
options: {pretty: true})
/portfolios/{portfolio_gid}/items:
parameters:
- $ref: '#/components/parameters/portfolio_path_gid'
- $ref: '#/components/parameters/pretty'
- $ref: '#/components/parameters/fields'
- $ref: '#/components/parameters/limit'
- $ref: '#/components/parameters/offset'
get:
summary: Get portfolio items
description: >-
Get a list of the items in compact form in a portfolio.
tags:
- Portfolios
operationId: getItemsForPortfolio
responses:
200:
description: Successfully retrieved the requested portfolio's items.
content:
application/json:
schema:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/ProjectCompact'
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: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
List result = client.portfolios.getItemsForPortfolio(portfolioGid)
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.portfolios.getItemsForPortfolio(portfolioGid, {param: "value",
param: "value", opt_pretty: true})
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.portfolios.get_items_for_portfolio(portfolio_gid, {'param':
'value', 'param': 'value'}, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
portfolios->getItemsForPortfolio($portfolio_gid,
array('param' => 'value', 'param' => 'value'), array('opt_pretty' =>
'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.portfolios.get_items_for_portfolio(portfolio_gid: 'portfolio_gid',
param: "value", param: "value", options: {pretty: true})
/portfolios/{portfolio_gid}/addItem:
parameters:
- $ref: '#/components/parameters/portfolio_path_gid'
- $ref: '#/components/parameters/pretty'
- $ref: '#/components/parameters/fields'
post:
summary: Add a portfolio item
description: >-
Add an item to a portfolio.
Returns an empty data block.
tags:
- Portfolios
operationId: addItemForPortfolio
requestBody:
description: Information about the item being inserted.
required: true
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/PortfolioAddItemRequest'
responses:
200:
description: Successfully added the item to the portfolio.
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/EmptyResponse'
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: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
JsonElement result = client.portfolios.addItemForPortfolio(portfolioGid)
.data("field", "value")
.data("field", "value")
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.portfolios.addItemForPortfolio(portfolioGid, {field: "value",
field: "value", pretty: true})
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.portfolios.add_item_for_portfolio(portfolio_gid, {'field':
'value', 'field': 'value'}, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
portfolios->addItemForPortfolio($portfolio_gid, array('field'
=> 'value', 'field' => 'value'), array('opt_pretty' => 'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.portfolios.add_item_for_portfolio(portfolio_gid: 'portfolio_gid',
field: "value", field: "value", options: {pretty: true})
/portfolios/{portfolio_gid}/removeItem:
parameters:
- $ref: '#/components/parameters/portfolio_path_gid'
- $ref: '#/components/parameters/pretty'
- $ref: '#/components/parameters/fields'
post:
summary: Remove a portfolio item
description: >-
Remove an item from a portfolio.
Returns an empty data block.
tags:
- Portfolios
operationId: removeItemForPortfolio
requestBody:
description: Information about the item being removed.
required: true
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/PortfolioRemoveItemRequest'
responses:
200:
description: Successfully removed the item from the portfolio.
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/EmptyResponse'
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: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
JsonElement result = client.portfolios.removeItemForPortfolio(portfolioGid)
.data("field", "value")
.data("field", "value")
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.portfolios.removeItemForPortfolio(portfolioGid, {field: "value",
field: "value", pretty: true})
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.portfolios.remove_item_for_portfolio(portfolio_gid,
{'field': 'value', 'field': 'value'}, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
portfolios->removeItemForPortfolio($portfolio_gid,
array('field' => 'value', 'field' => 'value'), array('opt_pretty' =>
'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.portfolios.remove_item_for_portfolio(portfolio_gid:
'portfolio_gid', field: "value", field: "value", options: {pretty: true})
/portfolios/{portfolio_gid}/addCustomFieldSetting:
parameters:
- $ref: '#/components/parameters/portfolio_path_gid'
- $ref: '#/components/parameters/pretty'
post:
summary: Add a custom field to a portfolio
description: >-
Custom fields are associated with portfolios by way of custom field
settings. This method creates a setting for the portfolio.
tags:
- Portfolios
operationId: addCustomFieldSettingForPortfolio
requestBody:
description: Information about the custom field setting.
required: true
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/AddCustomFieldSettingRequest'
responses:
200:
description: Successfully added the custom field to the portfolio.
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/CustomFieldSettingResponse'
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: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
CustomFieldSetting result = client.portfolios.addCustomFieldSettingForPortfolio(portfolioGid)
.data("field", "value")
.data("field", "value")
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.portfolios.addCustomFieldSettingForPortfolio(portfolioGid, {field:
"value", field: "value", pretty: true})
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.portfolios.add_custom_field_setting_for_portfolio(portfolio_gid,
{'field': 'value', 'field': 'value'}, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
portfolios->addCustomFieldSettingForPortfolio($portfolio_gid,
array('field' => 'value', 'field' => 'value'), array('opt_pretty' =>
'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.portfolios.add_custom_field_setting_for_portfolio(portfolio_gid:
'portfolio_gid', field: "value", field: "value", options: {pretty: true})
/portfolios/{portfolio_gid}/removeCustomFieldSetting:
parameters:
- $ref: '#/components/parameters/portfolio_path_gid'
- $ref: '#/components/parameters/pretty'
post:
summary: Remove a custom field from a portfolio
description: >-
Removes a custom field setting from a portfolio.
tags:
- Portfolios
operationId: removeCustomFieldSettingForPortfolio
requestBody:
description: Information about the custom field setting being removed.
required: true
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/RemoveCustomFieldSettingRequest'
responses:
200:
description: Successfully removed the custom field from the portfolio.
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/EmptyResponse'
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: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
JsonElement result = client.portfolios.removeCustomFieldSettingForPortfolio(portfolioGid)
.data("field", "value")
.data("field", "value")
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.portfolios.removeCustomFieldSettingForPortfolio(portfolioGid,
{field: "value", field: "value", pretty: true})
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.portfolios.remove_custom_field_setting_for_portfolio(portfolio_gid,
{'field': 'value', 'field': 'value'}, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
portfolios->removeCustomFieldSettingForPortfolio($portfolio_gid,
array('field' => 'value', 'field' => 'value'), array('opt_pretty' =>
'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.portfolios.remove_custom_field_setting_for_portfolio(portfolio_gid:
'portfolio_gid', field: "value", field: "value", options: {pretty: true})
/portfolios/{portfolio_gid}/addMembers:
parameters:
- $ref: '#/components/parameters/portfolio_path_gid'
- $ref: '#/components/parameters/pretty'
- $ref: '#/components/parameters/fields'
post:
summary: Add users to a portfolio
description: >-
Adds the specified list of users as members of the portfolio.
Returns the updated portfolio record.
tags:
- Portfolios
operationId: addMembersForPortfolio
requestBody:
description: Information about the members being added.
required: true
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/AddMembersRequest'
responses:
200:
description: Successfully added members to the portfolio.
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/PortfolioResponse'
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: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
Portfolio result = client.portfolios.addMembersForPortfolio(portfolioGid)
.data("field", "value")
.data("field", "value")
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.portfolios.addMembersForPortfolio(portfolioGid, {field: "value",
field: "value", pretty: true})
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.portfolios.add_members_for_portfolio(portfolio_gid,
{'field': 'value', 'field': 'value'}, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
portfolios->addMembersForPortfolio($portfolio_gid,
array('field' => 'value', 'field' => 'value'), array('opt_pretty' =>
'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.portfolios.add_members_for_portfolio(portfolio_gid:
'portfolio_gid', field: "value", field: "value", options: {pretty: true})
/portfolios/{portfolio_gid}/removeMembers:
parameters:
- $ref: '#/components/parameters/portfolio_path_gid'
- $ref: '#/components/parameters/pretty'
- $ref: '#/components/parameters/fields'
post:
summary: Remove users from a portfolio
description: >-
Removes the specified list of users from members of the portfolio.
Returns the updated portfolio record.
tags:
- Portfolios
operationId: removeMembersForPortfolio
requestBody:
description: Information about the members being removed.
required: true
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/RemoveMembersRequest'
responses:
200:
description: Successfully removed the members from the portfolio.
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/PortfolioResponse'
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: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
Portfolio result = client.portfolios.removeMembersForPortfolio(portfolioGid)
.data("field", "value")
.data("field", "value")
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.portfolios.removeMembersForPortfolio(portfolioGid, {field: "value",
field: "value", pretty: true})
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.portfolios.remove_members_for_portfolio(portfolio_gid,
{'field': 'value', 'field': 'value'}, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
portfolios->removeMembersForPortfolio($portfolio_gid,
array('field' => 'value', 'field' => 'value'), array('opt_pretty' =>
'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.portfolios.remove_members_for_portfolio(portfolio_gid:
'portfolio_gid', field: "value", field: "value", options: {pretty: true})
/project_briefs/{project_brief_gid}:
parameters:
- $ref: '#/components/parameters/project_brief_path_gid'
- $ref: '#/components/parameters/pretty'
- $ref: '#/components/parameters/fields'
get:
summary: Get a project brief
description: Get the full record for a project brief.
tags:
- Project briefs
operationId: getProjectBrief
responses:
200:
description: Successfully retrieved the record for a project brief.
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/ProjectBriefResponse'
400:
$ref: '#/components/responses/BadRequest'
401:
$ref: '#/components/responses/Unauthorized'
402:
$ref: '#/components/responses/PaymentRequired'
403:
$ref: '#/components/responses/Forbidden'
404:
$ref: '#/components/responses/NotFound'
424:
$ref: '#/components/responses/TooManyRequests'
500:
$ref: '#/components/responses/InternalServerError'
501:
$ref: '#/components/responses/BadGateway'
503:
$ref: '#/components/responses/ServiceUnavailable'
504:
$ref: '#/components/responses/GatewayTimeout'
x-readme:
code-samples:
- language: java
install: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
JsonElement result = client.projectbriefs.getProjectBrief(projectBriefGid)
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.projectbriefs.getProjectBrief(projectBriefGid, {param: "value",
param: "value", opt_pretty: true})
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.project_briefs.get_project_brief(project_brief_gid,
{'param': 'value', 'param': 'value'}, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
projectbriefs->getProjectBrief($project_brief_gid,
array('param' => 'value', 'param' => 'value'), array('opt_pretty' =>
'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.project_briefs.get_project_brief(project_brief_gid:
'project_brief_gid', param: "value", param: "value", options: {pretty:
true})
put:
summary: Update a project brief
description: |-
An existing project brief can be updated by making a PUT request on the URL for
that project brief. Only the fields provided in the `data` block will be updated;
any unspecified fields will remain unchanged.
Returns the complete updated project brief record.
tags:
- Project briefs
operationId: updateProjectBrief
requestBody:
description: The updated fields for the project brief.
required: true
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/ProjectBriefRequest'
responses:
200:
description: Successfully updated the project brief.
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/ProjectBriefResponse'
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: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
JsonElement result = client.projectbriefs.updateProjectBrief(projectBriefGid)
.data("field", "value")
.data("field", "value")
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.projectbriefs.updateProjectBrief(projectBriefGid, {field: "value",
field: "value", pretty: true})
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.project_briefs.update_project_brief(project_brief_gid,
{'field': 'value', 'field': 'value'}, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
projectbriefs->updateProjectBrief($project_brief_gid,
array('field' => 'value', 'field' => 'value'), array('opt_pretty' =>
'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.project_briefs.update_project_brief(project_brief_gid:
'project_brief_gid', field: "value", field: "value", options: {pretty:
true})
delete:
summary: Delete a project brief
description: |-
Deletes a specific, existing project brief.
Returns an empty data record.
tags:
- Project briefs
operationId: deleteProjectBrief
responses:
200:
description: Successfully deleted the specified project brief.
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/EmptyResponse'
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: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
JsonElement result = client.projectbriefs.deleteProjectBrief(projectBriefGid)
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.projectbriefs.deleteProjectBrief(projectBriefGid)
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.project_briefs.delete_project_brief(project_brief_gid,
opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
projectbriefs->deleteProjectBrief($project_brief_gid,
array('opt_pretty' => 'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.project_briefs.delete_project_brief(project_brief_gid:
'project_brief_gid', options: {pretty: true})
/projects/{project_gid}/project_briefs:
parameters:
- $ref: '#/components/parameters/project_path_gid'
- $ref: '#/components/parameters/pretty'
- $ref: '#/components/parameters/fields'
post:
summary: Create a project brief
description: |-
Creates a new project brief.
Returns the full record of the newly created project brief.
tags:
- Project briefs
operationId: createProjectBrief
requestBody:
description: The project brief to create.
required: true
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/ProjectBriefRequest'
responses:
201:
description: Successfully created a new project brief.
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/ProjectBriefResponse'
400:
$ref: '#/components/responses/BadRequest'
401:
$ref: '#/components/responses/Unauthorized'
402:
$ref: '#/components/responses/PaymentRequired'
403:
$ref: '#/components/responses/Forbidden'
404:
$ref: '#/components/responses/NotFound'
500:
$ref: '#/components/responses/InternalServerError'
x-readme:
code-samples:
- language: java
install: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
JsonElement result = client.projectbriefs.createProjectBrief(projectGid)
.data("field", "value")
.data("field", "value")
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.projectbriefs.createProjectBrief(projectGid, {field: "value",
field: "value", pretty: true})
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.project_briefs.create_project_brief(project_gid, {'field':
'value', 'field': 'value'}, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
projectbriefs->createProjectBrief($project_gid, array('field'
=> 'value', 'field' => 'value'), array('opt_pretty' => 'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.project_briefs.create_project_brief(project_gid: 'project_gid',
field: "value", field: "value", options: {pretty: true})
/project_memberships/{project_membership_gid}:
parameters:
- $ref: '#/components/parameters/project_membership_path_gid'
- $ref: '#/components/parameters/pretty'
- $ref: '#/components/parameters/fields'
get:
summary: Get a project membership
description: >-
Returns the complete project record for a single project membership.
tags:
- Project memberships
operationId: getProjectMembership
responses:
200:
description: >-
Successfully retrieved the requested project membership.
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/ProjectMembershipResponse'
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: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
ProjectMembership result = client.projectmemberships.getProjectMembership(projectMembershipGid)
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.projectmemberships.getProjectMembership(projectMembershipGid,
{param: "value", param: "value", opt_pretty: true})
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.project_memberships.get_project_membership(project_membership_gid,
{'param': 'value', 'param': 'value'}, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
projectmemberships->getProjectMembership($project_membership_gid,
array('param' => 'value', 'param' => 'value'), array('opt_pretty' =>
'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.project_memberships.get_project_membership(project_membership_gid:
'project_membership_gid', param: "value", param: "value", options: {pretty:
true})
/projects/{project_gid}/project_memberships:
parameters:
- $ref: '#/components/parameters/project_path_gid'
- $ref: '#/components/parameters/user_query_param'
- $ref: '#/components/parameters/pretty'
- $ref: '#/components/parameters/fields'
- $ref: '#/components/parameters/limit'
- $ref: '#/components/parameters/offset'
get:
summary: Get memberships from a project
description: >-
Returns the compact project membership records for the project.
tags:
- Project memberships
operationId: getProjectMembershipsForProject
responses:
200:
description: >-
Successfully retrieved the requested project's memberships.
content:
application/json:
schema:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/ProjectMembershipCompact'
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: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
List result = client.projectmemberships.getProjectMembershipsForProject(projectGid,
user)
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.projectmemberships.getProjectMembershipsForProject(projectGid,
{param: "value", param: "value", opt_pretty: true})
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.project_memberships.get_project_memberships_for_project(project_gid,
{'param': 'value', 'param': 'value'}, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
projectmemberships->getProjectMembershipsForProject($project_gid,
array('param' => 'value', 'param' => 'value'), array('opt_pretty' =>
'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.project_memberships.get_project_memberships_for_project(project_gid:
'project_gid', param: "value", param: "value", options: {pretty: true})
/project_statuses/{project_status_gid}:
parameters:
- $ref: '#/components/parameters/project_status_path_gid'
- $ref: '#/components/parameters/pretty'
- $ref: '#/components/parameters/fields'
get:
summary: Get a project status
description: |-
*Deprecated: new integrations should prefer the `/status_updates/{status_gid}` route.*
Returns the complete record for a single status update.
tags:
- Project statuses
operationId: getProjectStatus
responses:
200:
description: Successfully retrieved the specified project's status updates.
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/ProjectStatusResponse'
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: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
ProjectStatus result = client.projectstatuses.getProjectStatus(projectStatusGid)
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.projectstatuses.getProjectStatus(projectStatusGid, {param: "value",
param: "value", opt_pretty: true})
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.project_statuses.get_project_status(project_status_gid,
{'param': 'value', 'param': 'value'}, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
projectstatuses->getProjectStatus($project_status_gid,
array('param' => 'value', 'param' => 'value'), array('opt_pretty' =>
'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.project_statuses.get_project_status(project_status_gid:
'project_status_gid', param: "value", param: "value", options: {pretty:
true})
delete:
summary: Delete a project status
description: |-
*Deprecated: new integrations should prefer the `/status_updates/{status_gid}` route.*
Deletes a specific, existing project status update.
Returns an empty data record.
tags:
- Project statuses
operationId: deleteProjectStatus
responses:
200:
description: Successfully deleted the specified project status.
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/EmptyResponse'
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: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
JsonElement result = client.projectstatuses.deleteProjectStatus(projectStatusGid)
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.projectstatuses.deleteProjectStatus(projectStatusGid)
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.project_statuses.delete_project_status(project_status_gid,
opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
projectstatuses->deleteProjectStatus($project_status_gid,
array('opt_pretty' => 'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.project_statuses.delete_project_status(project_status_gid:
'project_status_gid', options: {pretty: true})
/projects/{project_gid}/project_statuses:
parameters:
- $ref: '#/components/parameters/project_path_gid'
- $ref: '#/components/parameters/pretty'
- $ref: '#/components/parameters/fields'
get:
summary: Get statuses from a project
description: |-
*Deprecated: new integrations should prefer the `/status_updates` route.*
Returns the compact project status update records for all updates on the project.
tags:
- Project statuses
operationId: getProjectStatusesForProject
parameters:
- $ref: '#/components/parameters/project_path_gid'
- $ref: '#/components/parameters/pretty'
- $ref: '#/components/parameters/fields'
- $ref: '#/components/parameters/limit'
- $ref: '#/components/parameters/offset'
responses:
200:
description: Successfully retrieved the specified project's status updates.
content:
application/json:
schema:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/ProjectStatusCompact'
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: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
List result = client.projectstatuses.getProjectStatusesForProject(projectGid)
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.projectstatuses.getProjectStatusesForProject(projectGid, {param:
"value", param: "value", opt_pretty: true})
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.project_statuses.get_project_statuses_for_project(project_gid,
{'param': 'value', 'param': 'value'}, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
projectstatuses->getProjectStatusesForProject($project_gid,
array('param' => 'value', 'param' => 'value'), array('opt_pretty' =>
'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.project_statuses.get_project_statuses_for_project(project_gid:
'project_gid', param: "value", param: "value", options: {pretty: true})
post:
summary: Create a project status
description: |-
*Deprecated: new integrations should prefer the `/status_updates` route.*
Creates a new status update on the project.
Returns the full record of the newly created project status update.
tags:
- Project statuses
operationId: createProjectStatusForProject
requestBody:
description: The project status to create.
required: true
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/ProjectStatusRequest'
responses:
201:
description: Successfully created a new story.
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/ProjectStatusResponse'
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: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
ProjectStatus result = client.projectstatuses.createProjectStatusForProject(projectGid)
.data("field", "value")
.data("field", "value")
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.projectstatuses.createProjectStatusForProject(projectGid, {field:
"value", field: "value", pretty: true})
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.project_statuses.create_project_status_for_project(project_gid,
{'field': 'value', 'field': 'value'}, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
projectstatuses->createProjectStatusForProject($project_gid,
array('field' => 'value', 'field' => 'value'), array('opt_pretty' =>
'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.project_statuses.create_project_status_for_project(project_gid:
'project_gid', field: "value", field: "value", options: {pretty: true})
/project_templates/{project_template_gid}:
parameters:
- $ref: '#/components/parameters/project_template_path_gid'
- $ref: '#/components/parameters/pretty'
- $ref: '#/components/parameters/fields'
get:
summary: Get a project template
description: Returns the complete project template record for a single project
template.
tags:
- Project templates
operationId: getProjectTemplate
responses:
200:
description: Successfully retrieved the requested project template.
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/ProjectTemplateResponse'
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: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
JsonElement result = client.projecttemplates.getProjectTemplate(projectTemplateGid)
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.projecttemplates.getProjectTemplate(projectTemplateGid, {param:
"value", param: "value", opt_pretty: true})
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.project_templates.get_project_template(project_template_gid,
{'param': 'value', 'param': 'value'}, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
projecttemplates->getProjectTemplate($project_template_gid,
array('param' => 'value', 'param' => 'value'), array('opt_pretty' =>
'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.project_templates.get_project_template(project_template_gid:
'project_template_gid', param: "value", param: "value", options: {pretty:
true})
/project_templates:
parameters:
- $ref: '#/components/parameters/pretty'
- $ref: '#/components/parameters/fields'
get:
summary: Get multiple project templates
description: >-
Returns the compact project template records for all project templates in
the given team or workspace.
tags:
- Project templates
operationId: getProjectTemplates
parameters:
- $ref: '#/components/parameters/workspace_query_param'
- $ref: '#/components/parameters/team_query_param'
- $ref: '#/components/parameters/limit'
- $ref: '#/components/parameters/offset'
responses:
200:
description: Successfully retrieved the requested team's or workspace's
project templates.
content:
application/json:
schema:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/ProjectTemplateCompact'
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: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
List result = client.projecttemplates.getProjectTemplates(team,
workspace)
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.projecttemplates.getProjectTemplates({param: "value", param:
"value", opt_pretty: true})
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.project_templates.get_project_templates({'param': 'value',
'param': 'value'}, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
projecttemplates->getProjectTemplates(array('param'
=> 'value', 'param' => 'value'), array('opt_pretty' => 'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.project_templates.get_project_templates(param: "value",
param: "value", options: {pretty: true})
/teams/{team_gid}/project_templates:
parameters:
- $ref: '#/components/parameters/team_path_gid'
- $ref: '#/components/parameters/pretty'
- $ref: '#/components/parameters/fields'
get:
summary: Get a team's project templates
description: >-
Returns the compact project template records for all project templates in
the team.
tags:
- Project templates
operationId: getProjectTemplatesForTeam
parameters:
- $ref: '#/components/parameters/limit'
- $ref: '#/components/parameters/offset'
responses:
200:
description: Successfully retrieved the requested team's project templates.
content:
application/json:
schema:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/ProjectTemplateCompact'
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: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
List result = client.projecttemplates.getProjectTemplatesForTeam(teamGid)
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.projecttemplates.getProjectTemplatesForTeam(teamGid, {param:
"value", param: "value", opt_pretty: true})
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.project_templates.get_project_templates_for_team(team_gid,
{'param': 'value', 'param': 'value'}, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
projecttemplates->getProjectTemplatesForTeam($team_gid,
array('param' => 'value', 'param' => 'value'), array('opt_pretty' =>
'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.project_templates.get_project_templates_for_team(team_gid:
'team_gid', param: "value", param: "value", options: {pretty: true})
/project_templates/{project_template_gid}/instantiateProject:
parameters:
- $ref: '#/components/parameters/project_template_path_gid'
- $ref: '#/components/parameters/pretty'
- $ref: '#/components/parameters/fields'
post:
summary: Instantiate a project from a project template
description: >-
Creates and returns a job that will asynchronously handle the project instantiation.
To form this request, it is recommended to first make a request to
[get a project template](/reference/getprojecttemplate). Then, from the response,
copy the
`gid` from the object in the `requested_dates` array. This `gid` should be
used in
`requested_dates` to instantiate a project.
_Note: The body of this request will differ if your workspace is an organization.
To determine if your workspace is an organization, use the
[is_organization](/reference/workspaces) parameter._
tags:
- Project templates
operationId: instantiateProject
requestBody:
description: >-
Describes the inputs used for instantiating a project, such as the resulting
project's name,
which team it should be created in, and values for date variables.
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/ProjectTemplateInstantiateProjectRequest'
responses:
201:
description: Successfully created the job to handle project instantiation.
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/JobResponse'
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: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
Job result = client.projecttemplates.instantiateProject(projectTemplateGid)
.data("field", "value")
.data("field", "value")
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.projecttemplates.instantiateProject(projectTemplateGid, {field:
"value", field: "value", pretty: true})
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.project_templates.instantiate_project(project_template_gid,
{'field': 'value', 'field': 'value'}, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
projecttemplates->instantiateProject($project_template_gid,
array('field' => 'value', 'field' => 'value'), array('opt_pretty' =>
'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.project_templates.instantiate_project(project_template_gid:
'project_template_gid', field: "value", field: "value", options: {pretty:
true})
/projects:
parameters:
- $ref: '#/components/parameters/pretty'
- $ref: '#/components/parameters/fields'
get:
summary: Get multiple projects
description: >-
Returns the compact project records for some filtered set of projects.
Use one or more of the parameters provided to filter the projects
returned.
*Note: This endpoint may timeout for large domains. Try filtering by team!*
tags:
- Projects
operationId: getProjects
parameters:
- $ref: '#/components/parameters/limit'
- $ref: '#/components/parameters/offset'
- name: workspace
in: query
description: >-
The workspace or organization to filter projects on.
schema:
type: string
example: '1331'
- name: team
in: query
description: The team to filter projects on.
schema:
type: string
example: '14916'
- $ref: '#/components/parameters/archived_query_param'
responses:
200:
description: Successfully retrieved projects.
content:
application/json:
schema:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/ProjectCompact'
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: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
List result = client.projects.getProjects(archived, team, workspace)
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.projects.getProjects({param: "value", param: "value", opt_pretty:
true})
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.projects.get_projects({'param': 'value', 'param': 'value'},
opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
projects->getProjects(array('param' => 'value', 'param'
=> 'value'), array('opt_pretty' => 'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.projects.get_projects(param: "value", param: "value",
options: {pretty: true})
post:
summary: Create a project
description: |-
Create a new project in a workspace or team.
Every project is required to be created in a specific workspace or
organization, and this cannot be changed once set. Note that you can use
the `workspace` parameter regardless of whether or not it is an
organization.
If the workspace for your project is an organization, you must also
supply a `team` to share the project with.
Returns the full record of the newly created project.
tags:
- Projects
operationId: createProject
requestBody:
description: The project to create.
required: true
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/ProjectRequest'
responses:
201:
description: Successfully retrieved projects.
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/ProjectResponse'
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: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
Project result = client.projects.createProject()
.data("field", "value")
.data("field", "value")
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.projects.createProject({field: "value", field: "value", pretty:
true})
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.projects.create_project({'field': 'value', 'field':
'value'}, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
projects->createProject(array('field' => 'value',
'field' => 'value'), array('opt_pretty' => 'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.projects.create_project(field: "value", field: "value",
options: {pretty: true})
/projects/{project_gid}:
parameters:
- $ref: '#/components/parameters/project_path_gid'
- $ref: '#/components/parameters/pretty'
- $ref: '#/components/parameters/fields'
get:
summary: Get a project
description: Returns the complete project record for a single project.
tags:
- Projects
operationId: getProject
responses:
200:
description: Successfully retrieved the requested project.
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/ProjectResponse'
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: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
Project result = client.projects.getProject(projectGid)
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.projects.getProject(projectGid, {param: "value", param: "value",
opt_pretty: true})
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.projects.get_project(project_gid, {'param': 'value',
'param': 'value'}, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
projects->getProject($project_gid, array('param'
=> 'value', 'param' => 'value'), array('opt_pretty' => 'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.projects.get_project(project_gid: 'project_gid', param:
"value", param: "value", options: {pretty: true})
put:
summary: Update a project
description: |-
A specific, existing project can be updated by making a PUT request on
the URL for that project. Only the fields provided in the `data` block
will be updated; any unspecified fields will remain unchanged.
When using this method, it is best to specify only those fields you wish
to change, or else you may overwrite changes made by another user since
you last retrieved the task.
Returns the complete updated project record.
tags:
- Projects
operationId: updateProject
requestBody:
description: The updated fields for the project.
required: true
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/ProjectRequest'
responses:
200:
description: Successfully updated the project.
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/ProjectResponse'
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: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
Project result = client.projects.updateProject(projectGid)
.data("field", "value")
.data("field", "value")
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.projects.updateProject(projectGid, {field: "value", field: "value",
pretty: true})
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.projects.update_project(project_gid, {'field': 'value',
'field': 'value'}, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
projects->updateProject($project_gid, array('field'
=> 'value', 'field' => 'value'), array('opt_pretty' => 'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.projects.update_project(project_gid: 'project_gid',
field: "value", field: "value", options: {pretty: true})
delete:
summary: Delete a project
description: |-
A specific, existing project can be deleted by making a DELETE request on
the URL for that project.
Returns an empty data record.
tags:
- Projects
operationId: deleteProject
responses:
200:
description: Successfully deleted the specified project.
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/EmptyResponse'
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: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
JsonElement result = client.projects.deleteProject(projectGid)
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.projects.deleteProject(projectGid)
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.projects.delete_project(project_gid, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
projects->deleteProject($project_gid, array('opt_pretty'
=> 'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.projects.delete_project(project_gid: 'project_gid',
options: {pretty: true})
/projects/{project_gid}/duplicate:
parameters:
- $ref: '#/components/parameters/project_path_gid'
- $ref: '#/components/parameters/pretty'
- $ref: '#/components/parameters/fields'
post:
summary: Duplicate a project
description: >-
Creates and returns a job that will asynchronously handle the duplication.
tags:
- Projects
operationId: duplicateProject
requestBody:
description: >-
Describes the duplicate's name and the elements that will be duplicated.
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/ProjectDuplicateRequest'
responses:
201:
description: Successfully created the job to handle duplication.
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/JobResponse'
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: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
Job result = client.projects.duplicateProject(projectGid)
.data("field", "value")
.data("field", "value")
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.projects.duplicateProject(projectGid, {field: "value", field:
"value", pretty: true})
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.projects.duplicate_project(project_gid, {'field': 'value',
'field': 'value'}, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
projects->duplicateProject($project_gid, array('field'
=> 'value', 'field' => 'value'), array('opt_pretty' => 'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.projects.duplicate_project(project_gid: 'project_gid',
field: "value", field: "value", options: {pretty: true})
/tasks/{task_gid}/projects:
parameters:
- $ref: '#/components/parameters/task_path_gid'
- $ref: '#/components/parameters/pretty'
- $ref: '#/components/parameters/fields'
- $ref: '#/components/parameters/limit'
- $ref: '#/components/parameters/offset'
get:
summary: Get projects a task is in
description: >-
Returns a compact representation of all of the projects the task is in.
tags:
- Projects
operationId: getProjectsForTask
responses:
200:
description: >-
Successfully retrieved the projects for the given task.
content:
application/json:
schema:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/ProjectCompact'
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: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
List result = client.projects.getProjectsForTask(taskGid)
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.projects.getProjectsForTask(taskGid, {param: "value", param:
"value", opt_pretty: true})
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.projects.get_projects_for_task(task_gid, {'param': 'value',
'param': 'value'}, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
projects->getProjectsForTask($task_gid, array('param'
=> 'value', 'param' => 'value'), array('opt_pretty' => 'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.projects.get_projects_for_task(task_gid: 'task_gid',
param: "value", param: "value", options: {pretty: true})
/teams/{team_gid}/projects:
parameters:
- $ref: '#/components/parameters/team_path_gid'
- $ref: '#/components/parameters/pretty'
- $ref: '#/components/parameters/fields'
get:
summary: Get a team's projects
description: >-
Returns the compact project records for all projects in the team.
tags:
- Projects
operationId: getProjectsForTeam
parameters:
- $ref: '#/components/parameters/limit'
- $ref: '#/components/parameters/offset'
- $ref: '#/components/parameters/archived_query_param'
responses:
200:
description: Successfully retrieved the requested team's projects.
content:
application/json:
schema:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/ProjectCompact'
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: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
List result = client.projects.getProjectsForTeam(teamGid, archived)
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.projects.getProjectsForTeam(teamGid, {param: "value", param:
"value", opt_pretty: true})
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.projects.get_projects_for_team(team_gid, {'param': 'value',
'param': 'value'}, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
projects->getProjectsForTeam($team_gid, array('param'
=> 'value', 'param' => 'value'), array('opt_pretty' => 'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.projects.get_projects_for_team(team_gid: 'team_gid',
param: "value", param: "value", options: {pretty: true})
post:
summary: Create a project in a team
description: |-
Creates a project shared with the given team.
Returns the full record of the newly created project.
tags:
- Projects
operationId: createProjectForTeam
requestBody:
description: The new project to create.
required: true
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/ProjectRequest'
responses:
201:
description: Successfully created the specified project.
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/ProjectResponse'
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: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
Project result = client.projects.createProjectForTeam(teamGid)
.data("field", "value")
.data("field", "value")
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.projects.createProjectForTeam(teamGid, {field: "value", field:
"value", pretty: true})
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.projects.create_project_for_team(team_gid, {'field':
'value', 'field': 'value'}, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
projects->createProjectForTeam($team_gid, array('field'
=> 'value', 'field' => 'value'), array('opt_pretty' => 'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.projects.create_project_for_team(team_gid: 'team_gid',
field: "value", field: "value", options: {pretty: true})
/workspaces/{workspace_gid}/projects:
parameters:
- $ref: '#/components/parameters/workspace_path_gid'
- $ref: '#/components/parameters/pretty'
- $ref: '#/components/parameters/fields'
get:
summary: Get all projects in a workspace
description: >-
Returns the compact project records for all projects in the workspace.
*Note: This endpoint may timeout for large domains. Prefer the
`/teams/{team_gid}/projects` endpoint.*
tags:
- Projects
operationId: getProjectsForWorkspace
parameters:
- $ref: '#/components/parameters/limit'
- $ref: '#/components/parameters/offset'
- $ref: '#/components/parameters/archived_query_param'
responses:
200:
description: Successfully retrieved the requested workspace's projects.
content:
application/json:
schema:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/ProjectCompact'
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: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
List result = client.projects.getProjectsForWorkspace(workspaceGid,
archived)
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.projects.getProjectsForWorkspace(workspaceGid, {param: "value",
param: "value", opt_pretty: true})
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.projects.get_projects_for_workspace(workspace_gid, {'param':
'value', 'param': 'value'}, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
projects->getProjectsForWorkspace($workspace_gid,
array('param' => 'value', 'param' => 'value'), array('opt_pretty' =>
'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.projects.get_projects_for_workspace(workspace_gid: 'workspace_gid',
param: "value", param: "value", options: {pretty: true})
post:
summary: Create a project in a workspace
description: |-
Creates a project in the workspace.
If the workspace for your project is an organization, you must also
supply a team to share the project with.
Returns the full record of the newly created project.
tags:
- Projects
operationId: createProjectForWorkspace
requestBody:
description: The new project to create.
required: true
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/ProjectRequest'
responses:
201:
description: >-
Successfully created a new project in the specified workspace.
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/ProjectResponse'
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: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
Project result = client.projects.createProjectForWorkspace(workspaceGid)
.data("field", "value")
.data("field", "value")
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.projects.createProjectForWorkspace(workspaceGid, {field: "value",
field: "value", pretty: true})
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.projects.create_project_for_workspace(workspace_gid,
{'field': 'value', 'field': 'value'}, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
projects->createProjectForWorkspace($workspace_gid,
array('field' => 'value', 'field' => 'value'), array('opt_pretty' =>
'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.projects.create_project_for_workspace(workspace_gid:
'workspace_gid', field: "value", field: "value", options: {pretty: true})
/projects/{project_gid}/addCustomFieldSetting:
parameters:
- $ref: '#/components/parameters/project_path_gid'
- $ref: '#/components/parameters/pretty'
post:
summary: Add a custom field to a project
description: >-
Custom fields are associated with projects by way of custom field
settings. This method creates a setting for the project.
tags:
- Projects
operationId: addCustomFieldSettingForProject
requestBody:
description: Information about the custom field setting.
required: true
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/AddCustomFieldSettingRequest'
responses:
200:
description: Successfully added the custom field to the project.
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/CustomFieldSettingResponse'
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: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
CustomFieldSetting result = client.projects.addCustomFieldSettingForProject(projectGid)
.data("field", "value")
.data("field", "value")
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.projects.addCustomFieldSettingForProject(projectGid, {field:
"value", field: "value", pretty: true})
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.projects.add_custom_field_setting_for_project(project_gid,
{'field': 'value', 'field': 'value'}, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
projects->addCustomFieldSettingForProject($project_gid,
array('field' => 'value', 'field' => 'value'), array('opt_pretty' =>
'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.projects.add_custom_field_setting_for_project(project_gid:
'project_gid', field: "value", field: "value", options: {pretty: true})
/projects/{project_gid}/removeCustomFieldSetting:
parameters:
- $ref: '#/components/parameters/project_path_gid'
- $ref: '#/components/parameters/pretty'
post:
summary: Remove a custom field from a project
description: >-
Removes a custom field setting from a project.
tags:
- Projects
operationId: removeCustomFieldSettingForProject
requestBody:
description: Information about the custom field setting being removed.
required: true
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/RemoveCustomFieldSettingRequest'
responses:
200:
description: Successfully removed the custom field from the project.
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/EmptyResponse'
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: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
JsonElement result = client.projects.removeCustomFieldSettingForProject(projectGid)
.data("field", "value")
.data("field", "value")
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.projects.removeCustomFieldSettingForProject(projectGid, {field:
"value", field: "value", pretty: true})
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.projects.remove_custom_field_setting_for_project(project_gid,
{'field': 'value', 'field': 'value'}, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
projects->removeCustomFieldSettingForProject($project_gid,
array('field' => 'value', 'field' => 'value'), array('opt_pretty' =>
'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.projects.remove_custom_field_setting_for_project(project_gid:
'project_gid', field: "value", field: "value", options: {pretty: true})
/projects/{project_gid}/task_counts:
parameters:
- $ref: '#/components/parameters/project_path_gid'
- $ref: '#/components/parameters/pretty'
- $ref: '#/components/parameters/fields'
- $ref: '#/components/parameters/limit'
- $ref: '#/components/parameters/offset'
get:
summary: Get task count of a project
description: >-
Get an object that holds task count fields. **All fields are excluded by default**.
You must
[opt in](/docs/inputoutput-options) using `opt_fields` to get any information
from this endpoint.
This endpoint has an additional [rate limit](/docs/rate-limits) and each field
counts especially high
against our [cost limits](/docs/rate-limits#cost-limits).
Milestones are just tasks, so they are included in the `num_tasks`, `num_incomplete_tasks`,
and
`num_completed_tasks` counts.
tags:
- Projects
operationId: getTaskCountsForProject
responses:
200:
description: Successfully retrieved the requested project's task counts.
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/TaskCountResponse'
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: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
JsonElement result = client.projects.getTaskCountsForProject(projectGid)
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.projects.getTaskCountsForProject(projectGid, {param: "value",
param: "value", opt_pretty: true})
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.projects.get_task_counts_for_project(project_gid, {'param':
'value', 'param': 'value'}, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
projects->getTaskCountsForProject($project_gid, array('param'
=> 'value', 'param' => 'value'), array('opt_pretty' => 'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.projects.get_task_counts_for_project(project_gid: 'project_gid',
param: "value", param: "value", options: {pretty: true})
/projects/{project_gid}/addMembers:
parameters:
- $ref: '#/components/parameters/project_path_gid'
- $ref: '#/components/parameters/pretty'
- $ref: '#/components/parameters/fields'
post:
summary: Add users to a project
description: >-
Adds the specified list of users as members of the project. Note that
a user being added as a member may also be added as a *follower* as a
result of this operation. This is because the user's default notification
settings (i.e., in the "Notifcations" tab of "My Profile Settings") will
override this endpoint's default behavior of setting "Tasks added"
notifications to `false`.
Returns the updated project record.
tags:
- Projects
operationId: addMembersForProject
requestBody:
description: Information about the members being added.
required: true
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/AddMembersRequest'
responses:
200:
description: Successfully added members to the project.
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/ProjectResponse'
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: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
Project result = client.projects.addMembersForProject(projectGid)
.data("field", "value")
.data("field", "value")
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.projects.addMembersForProject(projectGid, {field: "value", field:
"value", pretty: true})
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.projects.add_members_for_project(project_gid, {'field':
'value', 'field': 'value'}, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
projects->addMembersForProject($project_gid, array('field'
=> 'value', 'field' => 'value'), array('opt_pretty' => 'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.projects.add_members_for_project(project_gid: 'project_gid',
field: "value", field: "value", options: {pretty: true})
/projects/{project_gid}/removeMembers:
parameters:
- $ref: '#/components/parameters/project_path_gid'
- $ref: '#/components/parameters/pretty'
- $ref: '#/components/parameters/fields'
post:
summary: Remove users from a project
description: >-
Removes the specified list of users from members of the project.
Returns the updated project record.
tags:
- Projects
operationId: removeMembersForProject
requestBody:
description: Information about the members being removed.
required: true
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/RemoveMembersRequest'
responses:
200:
description: Successfully removed the members from the project.
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/ProjectResponse'
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: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
Project result = client.projects.removeMembersForProject(projectGid)
.data("field", "value")
.data("field", "value")
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.projects.removeMembersForProject(projectGid, {field: "value",
field: "value", pretty: true})
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.projects.remove_members_for_project(project_gid, {'field':
'value', 'field': 'value'}, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
projects->removeMembersForProject($project_gid, array('field'
=> 'value', 'field' => 'value'), array('opt_pretty' => 'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.projects.remove_members_for_project(project_gid: 'project_gid',
field: "value", field: "value", options: {pretty: true})
/projects/{project_gid}/addFollowers:
parameters:
- $ref: '#/components/parameters/project_path_gid'
- $ref: '#/components/parameters/pretty'
- $ref: '#/components/parameters/fields'
post:
summary: Add followers to a project
description: >-
Adds the specified list of users as followers to the project. Followers
are a subset of members who have opted in to receive "tasks added"
notifications for a project. Therefore, if the users are not already
members of the project, they will also become members as a result of
this operation.
Returns the updated project record.
tags:
- Projects
operationId: addFollowersForProject
requestBody:
description: Information about the followers being added.
required: true
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/AddFollowersRequest'
responses:
200:
description: Successfully added followers to the project.
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/ProjectResponse'
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: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
Project result = client.projects.addFollowersForProject(projectGid)
.data("field", "value")
.data("field", "value")
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.projects.addFollowersForProject(projectGid, {field: "value",
field: "value", pretty: true})
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.projects.add_followers_for_project(project_gid, {'field':
'value', 'field': 'value'}, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
projects->addFollowersForProject($project_gid, array('field'
=> 'value', 'field' => 'value'), array('opt_pretty' => 'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.projects.add_followers_for_project(project_gid: 'project_gid',
field: "value", field: "value", options: {pretty: true})
/projects/{project_gid}/removeFollowers:
parameters:
- $ref: '#/components/parameters/project_path_gid'
- $ref: '#/components/parameters/pretty'
- $ref: '#/components/parameters/fields'
post:
summary: Remove followers from a project
description: >-
Removes the specified list of users from following the project, this will
not affect project membership status.
Returns the updated project record.
tags:
- Projects
operationId: removeFollowersForProject
requestBody:
description: Information about the followers being removed.
required: true
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/RemoveFollowersRequest'
responses:
200:
description: Successfully removed followers from the project.
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/ProjectResponse'
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: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
Project result = client.projects.removeFollowersForProject(projectGid)
.data("field", "value")
.data("field", "value")
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.projects.removeFollowersForProject(projectGid, {field: "value",
field: "value", pretty: true})
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.projects.remove_followers_for_project(project_gid, {'field':
'value', 'field': 'value'}, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
projects->removeFollowersForProject($project_gid,
array('field' => 'value', 'field' => 'value'), array('opt_pretty' =>
'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.projects.remove_followers_for_project(project_gid: 'project_gid',
field: "value", field: "value", options: {pretty: true})
/projects/{project_gid}/saveAsTemplate:
parameters:
- $ref: '#/components/parameters/project_path_gid'
- $ref: '#/components/parameters/pretty'
- $ref: '#/components/parameters/fields'
post:
summary: Create a project template from a project
description: |-
Creates and returns a job that will asynchronously handle the project template creation. Note that
while the resulting project template can be accessed with the API, it won't be visible in the Asana
UI until Project Templates 2.0 is launched in the app. See more in [this forum post](https://forum.asana.com/t/a-new-api-for-project-templates/156432).
tags:
- Projects
operationId: projectSaveAsTemplate
requestBody:
description: >-
Describes the inputs used for creating a project template, such as the resulting
project template's name,
which team it should be created in.
required: true
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/ProjectSaveAsTemplateRequest'
responses:
201:
description: Successfully created the job to handle project template creation.
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/JobResponse'
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: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
Job result = client.projects.projectSaveAsTemplate(projectGid)
.data("field", "value")
.data("field", "value")
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.projects.projectSaveAsTemplate(projectGid, {field: "value", field:
"value", pretty: true})
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.projects.project_save_as_template(project_gid, {'field':
'value', 'field': 'value'}, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
projects->projectSaveAsTemplate($project_gid, array('field'
=> 'value', 'field' => 'value'), array('opt_pretty' => 'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.projects.project_save_as_template(project_gid: 'project_gid',
field: "value", field: "value", options: {pretty: true})
/sections/{section_gid}:
parameters:
- $ref: '#/components/parameters/section_path_gid'
- $ref: '#/components/parameters/pretty'
- $ref: '#/components/parameters/fields'
get:
summary: Get a section
description: >-
Returns the complete record for a single section.
tags:
- Sections
operationId: getSection
responses:
200:
description: Successfully retrieved section.
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/SectionResponse'
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: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
Section result = client.sections.getSection(sectionGid)
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.sections.getSection(sectionGid, {param: "value", param: "value",
opt_pretty: true})
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.sections.get_section(section_gid, {'param': 'value',
'param': 'value'}, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
sections->getSection($section_gid, array('param'
=> 'value', 'param' => 'value'), array('opt_pretty' => 'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.sections.get_section(section_gid: 'section_gid', param:
"value", param: "value", options: {pretty: true})
put:
summary: Update a section
description: |-
A specific, existing section can be updated by making a PUT request on
the URL for that project. Only the fields provided in the `data` block
will be updated; any unspecified fields will remain unchanged. (note that
at this time, the only field that can be updated is the `name` field.)
When using this method, it is best to specify only those fields you wish
to change, or else you may overwrite changes made by another user since
you last retrieved the task.
Returns the complete updated section record.
tags:
- Sections
operationId: updateSection
requestBody:
description: The section to create.
required: true
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/SectionRequest'
responses:
200:
description: Successfully updated the specified section.
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/SectionResponse'
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: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
Section result = client.sections.updateSection(sectionGid)
.data("field", "value")
.data("field", "value")
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.sections.updateSection(sectionGid, {field: "value", field: "value",
pretty: true})
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.sections.update_section(section_gid, {'field': 'value',
'field': 'value'}, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
sections->updateSection($section_gid, array('field'
=> 'value', 'field' => 'value'), array('opt_pretty' => 'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.sections.update_section(section_gid: 'section_gid',
field: "value", field: "value", options: {pretty: true})
delete:
summary: Delete a section
description: |-
A specific, existing section can be deleted by making a DELETE request on
the URL for that section.
Note that sections must be empty to be deleted.
The last remaining section cannot be deleted.
Returns an empty data block.
tags:
- Sections
operationId: deleteSection
responses:
200:
description: Successfully deleted the specified section.
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/EmptyResponse'
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: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
JsonElement result = client.sections.deleteSection(sectionGid)
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.sections.deleteSection(sectionGid)
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.sections.delete_section(section_gid, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
sections->deleteSection($section_gid, array('opt_pretty'
=> 'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.sections.delete_section(section_gid: 'section_gid',
options: {pretty: true})
/projects/{project_gid}/sections:
parameters:
- $ref: '#/components/parameters/project_path_gid'
- $ref: '#/components/parameters/pretty'
- $ref: '#/components/parameters/fields'
get:
summary: Get sections in a project
description: >-
Returns the compact records for all sections in the specified project.
tags:
- Sections
operationId: getSectionsForProject
parameters:
- $ref: '#/components/parameters/limit'
- $ref: '#/components/parameters/offset'
responses:
200:
description: Successfully retrieved sections in project.
content:
application/json:
schema:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/SectionCompact'
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: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
List result = client.sections.getSectionsForProject(projectGid)
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.sections.getSectionsForProject(projectGid, {param: "value", param:
"value", opt_pretty: true})
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.sections.get_sections_for_project(project_gid, {'param':
'value', 'param': 'value'}, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
sections->getSectionsForProject($project_gid, array('param'
=> 'value', 'param' => 'value'), array('opt_pretty' => 'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.sections.get_sections_for_project(project_gid: 'project_gid',
param: "value", param: "value", options: {pretty: true})
post:
summary: Create a section in a project
description: >-
Creates a new section in a project.
Returns the full record of the newly created section.
tags:
- Sections
operationId: createSectionForProject
requestBody:
description: The section to create.
required: true
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/SectionRequest'
responses:
201:
description: Successfully created the specified section.
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/SectionResponse'
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: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
Section result = client.sections.createSectionForProject(projectGid)
.data("field", "value")
.data("field", "value")
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.sections.createSectionForProject(projectGid, {field: "value",
field: "value", pretty: true})
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.sections.create_section_for_project(project_gid, {'field':
'value', 'field': 'value'}, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
sections->createSectionForProject($project_gid, array('field'
=> 'value', 'field' => 'value'), array('opt_pretty' => 'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.sections.create_section_for_project(project_gid: 'project_gid',
field: "value", field: "value", options: {pretty: true})
/sections/{section_gid}/addTask:
parameters:
- $ref: '#/components/parameters/section_path_gid'
- $ref: '#/components/parameters/pretty'
- $ref: '#/components/parameters/fields'
post:
summary: Add task to section
description: |-
Add a task to a specific, existing section. This will remove the task from other sections of the project.
The task will be inserted at the top of a section unless an insert_before or insert_after parameter is declared.
This does not work for separators (tasks with the resource_subtype of section).
tags:
- Sections
operationId: addTaskForSection
requestBody:
description: The task and optionally the insert location.
required: true
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/SectionTaskInsertRequest'
responses:
200:
description: Successfully added the task.
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/EmptyResponse'
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: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
JsonElement result = client.sections.addTaskForSection(sectionGid)
.data("field", "value")
.data("field", "value")
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.sections.addTaskForSection(sectionGid, {field: "value", field:
"value", pretty: true})
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.sections.add_task_for_section(section_gid, {'field':
'value', 'field': 'value'}, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
sections->addTaskForSection($section_gid, array('field'
=> 'value', 'field' => 'value'), array('opt_pretty' => 'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.sections.add_task_for_section(section_gid: 'section_gid',
field: "value", field: "value", options: {pretty: true})
/projects/{project_gid}/sections/insert:
parameters:
- $ref: '#/components/parameters/project_path_gid'
- $ref: '#/components/parameters/pretty'
- $ref: '#/components/parameters/fields'
post:
summary: Move or Insert sections
description: |-
Move sections relative to each other. One of
`before_section` or `after_section` is required.
Sections cannot be moved between projects.
Returns an empty data block.
tags:
- Sections
operationId: insertSectionForProject
requestBody:
description: The section's move action.
required: true
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/ProjectSectionInsertRequest'
responses:
200:
description: Successfully moved the specified section.
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/EmptyResponse'
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: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
JsonElement result = client.sections.insertSectionForProject(projectGid)
.data("field", "value")
.data("field", "value")
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.sections.insertSectionForProject(projectGid, {field: "value",
field: "value", pretty: true})
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.sections.insert_section_for_project(project_gid, {'field':
'value', 'field': 'value'}, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
sections->insertSectionForProject($project_gid, array('field'
=> 'value', 'field' => 'value'), array('opt_pretty' => 'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.sections.insert_section_for_project(project_gid: 'project_gid',
field: "value", field: "value", options: {pretty: true})
/status_updates/{status_gid}:
parameters:
- $ref: '#/components/parameters/status_path_gid'
- $ref: '#/components/parameters/pretty'
- $ref: '#/components/parameters/fields'
get:
summary: Get a status update
description: >-
Returns the complete record for a single status update.
tags:
- Status updates
operationId: getStatus
responses:
200:
description: Successfully retrieved the specified object's status updates.
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/StatusUpdateResponse'
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: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
JsonElement result = client.statusupdates.getStatus(statusGid)
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.statusupdates.getStatus(statusGid, {param: "value", param: "value",
opt_pretty: true})
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.status_updates.get_status(status_gid, {'param': 'value',
'param': 'value'}, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
statusupdates->getStatus($status_gid, array('param'
=> 'value', 'param' => 'value'), array('opt_pretty' => 'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.status_updates.get_status(status_gid: 'status_gid',
param: "value", param: "value", options: {pretty: true})
delete:
summary: Delete a status update
description: |-
Deletes a specific, existing status update.
Returns an empty data record.
tags:
- Status updates
operationId: deleteStatus
responses:
200:
description: Successfully deleted the specified status.
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/EmptyResponse'
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: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
JsonElement result = client.statusupdates.deleteStatus(statusGid)
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.statusupdates.deleteStatus(statusGid)
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.status_updates.delete_status(status_gid, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
statusupdates->deleteStatus($status_gid, array('opt_pretty'
=> 'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.status_updates.delete_status(status_gid: 'status_gid',
options: {pretty: true})
/status_updates:
parameters:
- $ref: '#/components/parameters/pretty'
- $ref: '#/components/parameters/fields'
- $ref: '#/components/parameters/limit'
- $ref: '#/components/parameters/offset'
get:
summary: Get status updates from an object
description: >-
Returns the compact status update records for all updates on the object.
tags:
- Status updates
operationId: getStatusesForObject
parameters:
- name: parent
required: true
in: query
description: >-
Globally unique identifier for object to fetch statuses from. Must be
a GID
for a project, portfolio, or goal.
schema:
type: string
example: '159874'
- name: created_since
in: query
description: |-
Only return statuses that have been created since the given time.
schema:
type: string
format: date-time
example: '2012-02-22T02:06:58.158Z'
responses:
200:
description: Successfully retrieved the specified object's status updates.
content:
application/json:
schema:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/StatusUpdateCompact'
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: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
List result = client.statusupdates.getStatusesForObject(createdSince,
parent)
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.statusupdates.getStatusesForObject({param: "value", param: "value",
opt_pretty: true})
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.status_updates.get_statuses_for_object({'param': 'value',
'param': 'value'}, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
statusupdates->getStatusesForObject(array('param'
=> 'value', 'param' => 'value'), array('opt_pretty' => 'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.status_updates.get_statuses_for_object(parent: ''parent_example'',
param: "value", param: "value", options: {pretty: true})
post:
summary: Create a status update
description: >-
Creates a new status update on an object.
Returns the full record of the newly created status update.
tags:
- Status updates
operationId: createStatusForObject
requestBody:
description: The status update to create.
required: true
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/StatusUpdateRequest'
responses:
201:
description: Successfully created a new status update.
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/StatusUpdateResponse'
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: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
JsonElement result = client.statusupdates.createStatusForObject()
.data("field", "value")
.data("field", "value")
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.statusupdates.createStatusForObject({field: "value", field: "value",
pretty: true})
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.status_updates.create_status_for_object({'field': 'value',
'field': 'value'}, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
statusupdates->createStatusForObject(array('field'
=> 'value', 'field' => 'value'), array('opt_pretty' => 'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.status_updates.create_status_for_object(field: "value",
field: "value", options: {pretty: true})
/stories/{story_gid}:
parameters:
- $ref: '#/components/parameters/story_path_gid'
- $ref: '#/components/parameters/pretty'
- $ref: '#/components/parameters/fields'
get:
summary: Get a story
description: Returns the full record for a single story.
tags:
- Stories
operationId: getStory
parameters:
- $ref: '#/components/parameters/limit'
- $ref: '#/components/parameters/offset'
responses:
200:
description: Successfully retrieved the specified story.
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/StoryResponse'
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: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
Story result = client.stories.getStory(storyGid)
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.stories.getStory(storyGid, {param: "value", param: "value", opt_pretty:
true})
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.stories.get_story(story_gid, {'param': 'value', 'param':
'value'}, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
stories->getStory($story_gid, array('param' => 'value',
'param' => 'value'), array('opt_pretty' => 'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.stories.get_story(story_gid: 'story_gid', param: "value",
param: "value", options: {pretty: true})
put:
summary: Update a story
description: >-
Updates the story and returns the full record for the updated story. Only
comment stories can have their text updated, and only comment stories and
attachment stories can be pinned. Only one of `text` and `html_text` can be
specified.
tags:
- Stories
operationId: updateStory
requestBody:
description: The comment story to update.
required: true
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/StoryRequest'
responses:
200:
description: Successfully retrieved the specified story.
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/StoryResponse'
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: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
Story result = client.stories.updateStory(storyGid)
.data("field", "value")
.data("field", "value")
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.stories.updateStory(storyGid, {field: "value", field: "value",
pretty: true})
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.stories.update_story(story_gid, {'field': 'value', 'field':
'value'}, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
stories->updateStory($story_gid, array('field' =>
'value', 'field' => 'value'), array('opt_pretty' => 'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.stories.update_story(story_gid: 'story_gid', field:
"value", field: "value", options: {pretty: true})
delete:
summary: Delete a story
description: |-
Deletes a story. A user can only delete stories they have created.
Returns an empty data record.
tags:
- Stories
operationId: deleteStory
responses:
200:
description: Successfully deleted the specified story.
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/EmptyResponse'
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: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
JsonElement result = client.stories.deleteStory(storyGid)
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.stories.deleteStory(storyGid)
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.stories.delete_story(story_gid, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
stories->deleteStory($story_gid, array('opt_pretty'
=> 'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.stories.delete_story(story_gid: 'story_gid', options:
{pretty: true})
/tasks/{task_gid}/stories:
parameters:
- $ref: '#/components/parameters/task_path_gid'
- $ref: '#/components/parameters/pretty'
- $ref: '#/components/parameters/fields'
get:
summary: Get stories from a task
description: >-
Returns the compact records for all stories on the task.
tags:
- Stories
operationId: getStoriesForTask
parameters:
- $ref: '#/components/parameters/limit'
- $ref: '#/components/parameters/offset'
responses:
200:
description: Successfully retrieved the specified task's stories.
content:
application/json:
schema:
type: object
properties:
data:
items:
$ref: '#/components/schemas/StoryCompact'
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: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
List result = client.stories.getStoriesForTask(taskGid)
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.stories.getStoriesForTask(taskGid, {param: "value", param: "value",
opt_pretty: true})
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.stories.get_stories_for_task(task_gid, {'param': 'value',
'param': 'value'}, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
stories->getStoriesForTask($task_gid, array('param'
=> 'value', 'param' => 'value'), array('opt_pretty' => 'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.stories.get_stories_for_task(task_gid: 'task_gid', param:
"value", param: "value", options: {pretty: true})
post:
summary: Create a story on a task
description: |-
Adds a story to a task. This endpoint currently only allows for comment
stories to be created. The comment will be authored by the currently
authenticated user, and timestamped when the server receives the request.
Returns the full record for the new story added to the task.
tags:
- Stories
operationId: createStoryForTask
requestBody:
description: The story to create.
required: true
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/StoryRequest'
responses:
201:
description: Successfully created a new story.
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/StoryResponse'
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: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
Story result = client.stories.createStoryForTask(taskGid)
.data("field", "value")
.data("field", "value")
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.stories.createStoryForTask(taskGid, {field: "value", field: "value",
pretty: true})
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.stories.create_story_for_task(task_gid, {'field': 'value',
'field': 'value'}, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
stories->createStoryForTask($task_gid, array('field'
=> 'value', 'field' => 'value'), array('opt_pretty' => 'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.stories.create_story_for_task(task_gid: 'task_gid',
field: "value", field: "value", options: {pretty: true})
/tags:
parameters:
- $ref: '#/components/parameters/pretty'
- $ref: '#/components/parameters/fields'
get:
summary: Get multiple tags
description: >-
Returns the compact tag records for some filtered set of tags.
Use one or more of the parameters provided to filter the tags returned.
tags:
- Tags
operationId: getTags
parameters:
- $ref: '#/components/parameters/limit'
- $ref: '#/components/parameters/offset'
- name: workspace
in: query
description: >-
The workspace to filter tags on.
schema:
type: string
example: '1331'
responses:
200:
description: Successfully retrieved the specified set of tags.
content:
application/json:
schema:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/TagCompact'
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: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
List result = client.tags.getTags(workspace)
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.tags.getTags({param: "value", param: "value", opt_pretty: true})
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.tags.get_tags({'param': 'value', 'param': 'value'},
opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
tags->getTags(array('param' => 'value', 'param' =>
'value'), array('opt_pretty' => 'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.tags.get_tags(param: "value", param: "value", options:
{pretty: true})
post:
summary: Create a tag
description: |-
Creates a new tag in a workspace or organization.
Every tag is required to be created in a specific workspace or
organization, and this cannot be changed once set. Note that you can use
the workspace parameter regardless of whether or not it is an
organization.
Returns the full record of the newly created tag.
tags:
- Tags
operationId: createTag
requestBody:
description: The tag to create.
required: true
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/TagRequest'
responses:
201:
description: Successfully created the newly specified tag.
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/TagResponse'
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: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
Tag result = client.tags.createTag()
.data("field", "value")
.data("field", "value")
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.tags.createTag({field: "value", field: "value", pretty: true})
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.tags.create_tag({'field': 'value', 'field': 'value'},
opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
tags->createTag(array('field' => 'value', 'field'
=> 'value'), array('opt_pretty' => 'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.tags.create_tag(field: "value", field: "value", options:
{pretty: true})
/tags/{tag_gid}:
parameters:
- $ref: '#/components/parameters/tag_path_gid'
- $ref: '#/components/parameters/pretty'
- $ref: '#/components/parameters/fields'
- $ref: '#/components/parameters/limit'
- $ref: '#/components/parameters/offset'
get:
summary: Get a tag
description: Returns the complete tag record for a single tag.
tags:
- Tags
operationId: getTag
responses:
200:
description: Successfully retrieved the specified tag.
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/TagResponse'
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: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
Tag result = client.tags.getTag(tagGid)
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.tags.getTag(tagGid, {param: "value", param: "value", opt_pretty:
true})
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.tags.get_tag(tag_gid, {'param': 'value', 'param': 'value'},
opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
tags->getTag($tag_gid, array('param' => 'value',
'param' => 'value'), array('opt_pretty' => 'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.tags.get_tag(tag_gid: 'tag_gid', param: "value", param:
"value", options: {pretty: true})
put:
summary: Update a tag
description: |-
Updates the properties of a tag. Only the fields provided in the `data`
block will be updated; any unspecified fields will remain unchanged.
When using this method, it is best to specify only those fields you wish
to change, or else you may overwrite changes made by another user since
you last retrieved the tag.
Returns the complete updated tag record.
tags:
- Tags
operationId: updateTag
responses:
200:
description: Successfully updated the specified tag.
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/TagResponse'
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: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
Tag result = client.tags.updateTag(tagGid)
.data("field", "value")
.data("field", "value")
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.tags.updateTag(tagGid, {field: "value", field: "value", pretty:
true})
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.tags.update_tag(tag_gid, {'field': 'value', 'field':
'value'}, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
tags->updateTag($tag_gid, array('field' => 'value',
'field' => 'value'), array('opt_pretty' => 'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.tags.update_tag(tag_gid: 'tag_gid', field: "value",
field: "value", options: {pretty: true})
delete:
summary: Delete a tag
description: |-
A specific, existing tag can be deleted by making a DELETE request on
the URL for that tag.
Returns an empty data record.
tags:
- Tags
operationId: deleteTag
responses:
200:
description: Successfully deleted the specified tag.
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/EmptyResponse'
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: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
JsonElement result = client.tags.deleteTag(tagGid)
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.tags.deleteTag(tagGid)
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.tags.delete_tag(tag_gid, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
tags->deleteTag($tag_gid, array('opt_pretty' => 'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.tags.delete_tag(tag_gid: 'tag_gid', options: {pretty:
true})
/tasks/{task_gid}/tags:
parameters:
- $ref: '#/components/parameters/task_path_gid'
- $ref: '#/components/parameters/pretty'
- $ref: '#/components/parameters/fields'
- $ref: '#/components/parameters/limit'
- $ref: '#/components/parameters/offset'
get:
summary: Get a task's tags
description: >-
Get a compact representation of all of the tags the task has.
tags:
- Tags
operationId: getTagsForTask
responses:
200:
description: >-
Successfully retrieved the tags for the given task.
content:
application/json:
schema:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/TagCompact'
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: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
List result = client.tags.getTagsForTask(taskGid)
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.tags.getTagsForTask(taskGid, {param: "value", param: "value",
opt_pretty: true})
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.tags.get_tags_for_task(task_gid, {'param': 'value',
'param': 'value'}, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
tags->getTagsForTask($task_gid, array('param' =>
'value', 'param' => 'value'), array('opt_pretty' => 'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.tags.get_tags_for_task(task_gid: 'task_gid', param:
"value", param: "value", options: {pretty: true})
/workspaces/{workspace_gid}/tags:
parameters:
- $ref: '#/components/parameters/workspace_path_gid'
- $ref: '#/components/parameters/pretty'
- $ref: '#/components/parameters/fields'
get:
summary: Get tags in a workspace
description: >-
Returns the compact tag records for some filtered set of tags.
Use one or more of the parameters provided to filter the tags returned.
tags:
- Tags
operationId: getTagsForWorkspace
parameters:
- $ref: '#/components/parameters/limit'
- $ref: '#/components/parameters/offset'
responses:
200:
description: Successfully retrieved the specified set of tags.
content:
application/json:
schema:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/TagCompact'
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: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
List result = client.tags.getTagsForWorkspace(workspaceGid)
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.tags.getTagsForWorkspace(workspaceGid, {param: "value", param:
"value", opt_pretty: true})
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.tags.get_tags_for_workspace(workspace_gid, {'param':
'value', 'param': 'value'}, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
tags->getTagsForWorkspace($workspace_gid, array('param'
=> 'value', 'param' => 'value'), array('opt_pretty' => 'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.tags.get_tags_for_workspace(workspace_gid: 'workspace_gid',
param: "value", param: "value", options: {pretty: true})
post:
summary: Create a tag in a workspace
description: |-
Creates a new tag in a workspace or organization.
Every tag is required to be created in a specific workspace or
organization, and this cannot be changed once set. Note that you can use
the workspace parameter regardless of whether or not it is an
organization.
Returns the full record of the newly created tag.
tags:
- Tags
operationId: createTagForWorkspace
requestBody:
description: The tag to create.
required: true
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/TagResponse'
responses:
201:
description: Successfully created the newly specified tag.
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/TagResponse'
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: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
Tag result = client.tags.createTagForWorkspace(workspaceGid)
.data("field", "value")
.data("field", "value")
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.tags.createTagForWorkspace(workspaceGid, {field: "value", field:
"value", pretty: true})
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.tags.create_tag_for_workspace(workspace_gid, {'field':
'value', 'field': 'value'}, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
tags->createTagForWorkspace($workspace_gid, array('field'
=> 'value', 'field' => 'value'), array('opt_pretty' => 'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.tags.create_tag_for_workspace(workspace_gid: 'workspace_gid',
field: "value", field: "value", options: {pretty: true})
/tasks:
parameters:
- $ref: '#/components/parameters/pretty'
- $ref: '#/components/parameters/fields'
get:
summary: Get multiple tasks
description: >-
Returns the compact task records for some filtered set of tasks. Use one
or more of the parameters provided to filter the tasks returned. You must
specify a `project` or `tag` if you do not specify `assignee` and
`workspace`.
For more complex task retrieval, use
[workspaces/{workspace_gid}/tasks/search](/reference/searchtasksforworkspace).
tags:
- Tasks
operationId: getTasks
parameters:
- $ref: '#/components/parameters/limit'
- $ref: '#/components/parameters/offset'
- name: assignee
in: query
description: >-
The assignee to filter tasks on. If searching for unassigned tasks, assignee.any
= null can be specified.
*Note: If you specify `assignee`, you must also specify the
`workspace` to filter on.*
schema:
type: string
x-env-variable: assignee
example: '14641'
- name: project
in: query
description: >-
The project to filter tasks on.
schema:
type: string
example: '321654'
x-env-variable: project
- name: section
in: query
description: >-
The section to filter tasks on.
schema:
type: string
example: '321654'
x-env-variable: section
- name: workspace
in: query
description: >-
The workspace to filter tasks on.
*Note: If you specify `workspace`, you must also specify the
`assignee` to filter on.*
schema:
type: string
example: '321654'
x-env-variable: workspace
- name: completed_since
in: query
description: >-
Only return tasks that are either incomplete or that have been
completed since this time.
schema:
type: string
format: date-time
example: '2012-02-22T02:06:58.158Z'
- name: modified_since
in: query
description: |-
Only return tasks that have been modified since the given time.
*Note: A task is considered “modified” if any of its properties
change, or associations between it and other objects are modified
(e.g. a task being added to a project). A task is not considered
modified just because another object it is associated with (e.g. a
subtask) is modified. Actions that count as modifying the task
include assigning, renaming, completing, and adding stories.*
schema:
type: string
format: date-time
example: '2012-02-22T02:06:58.158Z'
responses:
200:
description: Successfully retrieved requested tasks.
content:
application/json:
schema:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/TaskCompact'
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: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
List result = client.tasks.getTasks(modifiedSince, completedSince,
workspace, section, project, assignee)
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.tasks.getTasks({param: "value", param: "value", opt_pretty: true})
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.tasks.get_tasks({'param': 'value', 'param': 'value'},
opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
tasks->getTasks(array('param' => 'value', 'param'
=> 'value'), array('opt_pretty' => 'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.tasks.get_tasks(param: "value", param: "value", options:
{pretty: true})
post:
summary: Create a task
description: |-
Creating a new task is as easy as POSTing to the `/tasks` endpoint with a
data block containing the fields you’d like to set on the task. Any
unspecified fields will take on default values.
Every task is required to be created in a specific workspace, and this
workspace cannot be changed once set. The workspace need not be set
explicitly if you specify `projects` or a `parent` task instead.
tags:
- Tasks
operationId: createTask
requestBody:
description: The task to create.
required: true
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/TaskRequest'
responses:
201:
description: Successfully created a new task.
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/TaskResponse'
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: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
Task result = client.tasks.createTask()
.data("field", "value")
.data("field", "value")
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.tasks.createTask({field: "value", field: "value", pretty: true})
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.tasks.create_task({'field': 'value', 'field': 'value'},
opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
tasks->createTask(array('field' => 'value', 'field'
=> 'value'), array('opt_pretty' => 'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.tasks.create_task(field: "value", field: "value", options:
{pretty: true})
/tasks/{task_gid}:
parameters:
- $ref: '#/components/parameters/task_path_gid'
- $ref: '#/components/parameters/pretty'
- $ref: '#/components/parameters/fields'
get:
summary: Get a task
description: Returns the complete task record for a single task.
tags:
- Tasks
operationId: getTask
responses:
200:
description: Successfully retrieved the specified task.
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/TaskResponse'
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: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
Task result = client.tasks.getTask(taskGid)
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.tasks.getTask(taskGid, {param: "value", param: "value", opt_pretty:
true})
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.tasks.get_task(task_gid, {'param': 'value', 'param':
'value'}, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
tasks->getTask($task_gid, array('param' => 'value',
'param' => 'value'), array('opt_pretty' => 'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.tasks.get_task(task_gid: 'task_gid', param: "value",
param: "value", options: {pretty: true})
put:
summary: Update a task
description: |-
A specific, existing task can be updated by making a PUT request on the
URL for that task. Only the fields provided in the `data` block will be
updated; any unspecified fields will remain unchanged.
When using this method, it is best to specify only those fields you wish
to change, or else you may overwrite changes made by another user since
you last retrieved the task.
Returns the complete updated task record.
tags:
- Tasks
operationId: updateTask
requestBody:
description: The task to update.
required: true
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/TaskRequest'
responses:
200:
description: Successfully updated the specified task.
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/TaskResponse'
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: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
Task result = client.tasks.updateTask(taskGid)
.data("field", "value")
.data("field", "value")
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.tasks.updateTask(taskGid, {field: "value", field: "value", pretty:
true})
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.tasks.update_task(task_gid, {'field': 'value', 'field':
'value'}, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
tasks->updateTask($task_gid, array('field' => 'value',
'field' => 'value'), array('opt_pretty' => 'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.tasks.update_task(task_gid: 'task_gid', field: "value",
field: "value", options: {pretty: true})
delete:
summary: Delete a task
description: |-
A specific, existing task can be deleted by making a DELETE request on
the URL for that task. Deleted tasks go into the “trash” of the user
making the delete request. Tasks can be recovered from the trash within a
period of 30 days; afterward they are completely removed from the system.
Returns an empty data record.
tags:
- Tasks
operationId: deleteTask
responses:
200:
description: Successfully deleted the specified task.
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/EmptyResponse'
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: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
JsonElement result = client.tasks.deleteTask(taskGid)
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.tasks.deleteTask(taskGid)
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.tasks.delete_task(task_gid, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
tasks->deleteTask($task_gid, array('opt_pretty' =>
'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.tasks.delete_task(task_gid: 'task_gid', options: {pretty:
true})
/tasks/{task_gid}/duplicate:
parameters:
- $ref: '#/components/parameters/task_path_gid'
- $ref: '#/components/parameters/pretty'
- $ref: '#/components/parameters/fields'
post:
summary: Duplicate a task
description: >-
Creates and returns a job that will asynchronously handle the duplication.
tags:
- Tasks
operationId: duplicateTask
requestBody:
description: >-
Describes the duplicate's name and the fields that will be duplicated.
required: true
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/TaskDuplicateRequest'
responses:
201:
description: Successfully created the job to handle duplication.
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/JobResponse'
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: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
Job result = client.tasks.duplicateTask(taskGid)
.data("field", "value")
.data("field", "value")
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.tasks.duplicateTask(taskGid, {field: "value", field: "value",
pretty: true})
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.tasks.duplicate_task(task_gid, {'field': 'value', 'field':
'value'}, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
tasks->duplicateTask($task_gid, array('field' =>
'value', 'field' => 'value'), array('opt_pretty' => 'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.tasks.duplicate_task(task_gid: 'task_gid', field: "value",
field: "value", options: {pretty: true})
/projects/{project_gid}/tasks:
parameters:
- $ref: '#/components/parameters/completed_since'
- $ref: '#/components/parameters/project_path_gid'
- $ref: '#/components/parameters/pretty'
- $ref: '#/components/parameters/fields'
- $ref: '#/components/parameters/limit'
- $ref: '#/components/parameters/offset'
get:
summary: Get tasks from a project
description: >-
Returns the compact task records for all tasks within the given project,
ordered by their priority within the project. Tasks can exist in more
than one project at a time.
tags:
- Tasks
operationId: getTasksForProject
responses:
200:
description: Successfully retrieved the requested project's tasks.
content:
application/json:
schema:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/TaskCompact'
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: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
List result = client.tasks.getTasksForProject(projectGid, completedSince)
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.tasks.getTasksForProject(projectGid, {param: "value", param:
"value", opt_pretty: true})
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.tasks.get_tasks_for_project(project_gid, {'param': 'value',
'param': 'value'}, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
tasks->getTasksForProject($project_gid, array('param'
=> 'value', 'param' => 'value'), array('opt_pretty' => 'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.tasks.get_tasks_for_project(project_gid: 'project_gid',
param: "value", param: "value", options: {pretty: true})
/sections/{section_gid}/tasks:
parameters:
- $ref: '#/components/parameters/section_path_gid'
- $ref: '#/components/parameters/pretty'
- $ref: '#/components/parameters/fields'
- $ref: '#/components/parameters/limit'
- $ref: '#/components/parameters/offset'
get:
summary: Get tasks from a section
description: >-
*Board view only*: Returns the compact section records for all tasks
within the given section.
tags:
- Tasks
operationId: getTasksForSection
responses:
200:
description: >-
Successfully retrieved the section's tasks.
content:
application/json:
schema:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/TaskCompact'
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: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
List result = client.tasks.getTasksForSection(sectionGid)
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.tasks.getTasksForSection(sectionGid, {param: "value", param:
"value", opt_pretty: true})
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.tasks.get_tasks_for_section(section_gid, {'param': 'value',
'param': 'value'}, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
tasks->getTasksForSection($section_gid, array('param'
=> 'value', 'param' => 'value'), array('opt_pretty' => 'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.tasks.get_tasks_for_section(section_gid: 'section_gid',
param: "value", param: "value", options: {pretty: true})
/tags/{tag_gid}/tasks:
parameters:
- $ref: '#/components/parameters/tag_path_gid'
- $ref: '#/components/parameters/pretty'
- $ref: '#/components/parameters/fields'
- $ref: '#/components/parameters/limit'
- $ref: '#/components/parameters/offset'
get:
summary: Get tasks from a tag
description: >-
Returns the compact task records for all tasks with the given tag. Tasks
can have more than one tag at a time.
tags:
- Tasks
operationId: getTasksForTag
responses:
200:
description: >-
Successfully retrieved the tasks associated with the specified tag.
content:
application/json:
schema:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/TaskCompact'
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: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
List result = client.tasks.getTasksForTag(tagGid)
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.tasks.getTasksForTag(tagGid, {param: "value", param: "value",
opt_pretty: true})
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.tasks.get_tasks_for_tag(tag_gid, {'param': 'value',
'param': 'value'}, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
tasks->getTasksForTag($tag_gid, array('param' =>
'value', 'param' => 'value'), array('opt_pretty' => 'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.tasks.get_tasks_for_tag(tag_gid: 'tag_gid', param: "value",
param: "value", options: {pretty: true})
/user_task_lists/{user_task_list_gid}/tasks:
parameters:
- $ref: '#/components/parameters/completed_since'
- $ref: '#/components/parameters/user_task_list_path_gid'
- $ref: '#/components/parameters/pretty'
- $ref: '#/components/parameters/fields'
- $ref: '#/components/parameters/limit'
- $ref: '#/components/parameters/offset'
get:
summary: Get tasks from a user task list
description: >-
Returns the compact list of tasks in a user’s My Tasks list.
*Note: Access control is enforced for this endpoint as with
all Asana API endpoints, meaning a user’s private tasks will be
filtered out if the API-authenticated user does not have access
to them.*
*Note: Both complete and incomplete tasks are returned by
default unless they are filtered out (for example, setting
`completed_since=now` will return only incomplete tasks, which
is the default view for “My Tasks” in Asana.)*
tags:
- Tasks
operationId: getTasksForUserTaskList
responses:
200:
description: >-
Successfully retrieved the user task list's tasks.
content:
application/json:
schema:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/TaskCompact'
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: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
List result = client.tasks.getTasksForUserTaskList(userTaskListGid,
completedSince)
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.tasks.getTasksForUserTaskList(userTaskListGid, {param: "value",
param: "value", opt_pretty: true})
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.tasks.get_tasks_for_user_task_list(user_task_list_gid,
{'param': 'value', 'param': 'value'}, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
tasks->getTasksForUserTaskList($user_task_list_gid,
array('param' => 'value', 'param' => 'value'), array('opt_pretty' =>
'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.tasks.get_tasks_for_user_task_list(user_task_list_gid:
'user_task_list_gid', param: "value", param: "value", options: {pretty:
true})
/tasks/{task_gid}/subtasks:
parameters:
- $ref: '#/components/parameters/task_path_gid'
- $ref: '#/components/parameters/pretty'
- $ref: '#/components/parameters/fields'
get:
summary: Get subtasks from a task
description: >-
Returns a compact representation of all of the subtasks of a task.
tags:
- Tasks
operationId: getSubtasksForTask
parameters:
- $ref: '#/components/parameters/limit'
- $ref: '#/components/parameters/offset'
responses:
200:
description: Successfully retrieved the specified task's subtasks.
content:
application/json:
schema:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/TaskCompact'
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: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
List result = client.tasks.getSubtasksForTask(taskGid)
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.tasks.getSubtasksForTask(taskGid, {param: "value", param: "value",
opt_pretty: true})
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.tasks.get_subtasks_for_task(task_gid, {'param': 'value',
'param': 'value'}, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
tasks->getSubtasksForTask($task_gid, array('param'
=> 'value', 'param' => 'value'), array('opt_pretty' => 'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.tasks.get_subtasks_for_task(task_gid: 'task_gid', param:
"value", param: "value", options: {pretty: true})
post:
summary: Create a subtask
description: >-
Creates a new subtask and adds it to the parent task. Returns the full
record for the newly created subtask.
tags:
- Tasks
operationId: createSubtaskForTask
requestBody:
description: The new subtask to create.
required: true
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/TaskRequest'
responses:
201:
description: Successfully created the specified subtask.
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/TaskResponse'
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: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
Task result = client.tasks.createSubtaskForTask(taskGid)
.data("field", "value")
.data("field", "value")
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.tasks.createSubtaskForTask(taskGid, {field: "value", field: "value",
pretty: true})
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.tasks.create_subtask_for_task(task_gid, {'field': 'value',
'field': 'value'}, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
tasks->createSubtaskForTask($task_gid, array('field'
=> 'value', 'field' => 'value'), array('opt_pretty' => 'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.tasks.create_subtask_for_task(task_gid: 'task_gid',
field: "value", field: "value", options: {pretty: true})
/tasks/{task_gid}/setParent:
parameters:
- $ref: '#/components/parameters/task_path_gid'
- $ref: '#/components/parameters/pretty'
- $ref: '#/components/parameters/fields'
post:
summary: Set the parent of a task
description: >-
parent, or no parent task at all. Returns an empty data block. When using
`insert_before` and `insert_after`, at most one of those two options can
be specified, and they must already be subtasks of the parent.
tags:
- Tasks
operationId: setParentForTask
requestBody:
description: The new parent of the subtask.
required: true
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/TaskSetParentRequest'
responses:
200:
description: Successfully changed the parent of the specified subtask.
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/TaskResponse'
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: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
Task result = client.tasks.setParentForTask(taskGid)
.data("field", "value")
.data("field", "value")
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.tasks.setParentForTask(taskGid, {field: "value", field: "value",
pretty: true})
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.tasks.set_parent_for_task(task_gid, {'field': 'value',
'field': 'value'}, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
tasks->setParentForTask($task_gid, array('field'
=> 'value', 'field' => 'value'), array('opt_pretty' => 'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.tasks.set_parent_for_task(task_gid: 'task_gid', field:
"value", field: "value", options: {pretty: true})
/tasks/{task_gid}/dependencies:
parameters:
- $ref: '#/components/parameters/task_path_gid'
- $ref: '#/components/parameters/pretty'
- $ref: '#/components/parameters/fields'
- $ref: '#/components/parameters/limit'
- $ref: '#/components/parameters/offset'
get:
summary: Get dependencies from a task
description: >-
Returns the compact representations of all of the dependencies of a task.
tags:
- Tasks
operationId: getDependenciesForTask
responses:
200:
description: Successfully retrieved the specified task's dependencies.
content:
application/json:
schema:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/TaskCompact'
400:
$ref: '#/components/responses/BadRequest'
401:
$ref: '#/components/responses/Unauthorized'
402:
$ref: '#/components/responses/PaymentRequired'
403:
$ref: '#/components/responses/Forbidden'
404:
$ref: '#/components/responses/NotFound'
500:
$ref: '#/components/responses/InternalServerError'
x-readme:
code-samples:
- language: java
install: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
List result = client.tasks.getDependenciesForTask(taskGid)
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.tasks.getDependenciesForTask(taskGid, {param: "value", param:
"value", opt_pretty: true})
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.tasks.get_dependencies_for_task(task_gid, {'param':
'value', 'param': 'value'}, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
tasks->getDependenciesForTask($task_gid, array('param'
=> 'value', 'param' => 'value'), array('opt_pretty' => 'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.tasks.get_dependencies_for_task(task_gid: 'task_gid',
param: "value", param: "value", options: {pretty: true})
/tasks/{task_gid}/addDependencies:
parameters:
- $ref: '#/components/parameters/task_path_gid'
- $ref: '#/components/parameters/pretty'
- $ref: '#/components/parameters/fields'
post:
summary: Set dependencies for a task
description: >-
Marks a set of tasks as dependencies of this task, if they are not
already dependencies. *A task can have at most 30 dependents and dependencies
combined*.
tags:
- Tasks
operationId: addDependenciesForTask
requestBody:
description: The list of tasks to set as dependencies.
required: true
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/ModifyDependenciesRequest'
responses:
200:
description: Successfully set the specified dependencies on the task.
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/EmptyResponse'
400:
$ref: '#/components/responses/BadRequest'
401:
$ref: '#/components/responses/Unauthorized'
402:
$ref: '#/components/responses/PaymentRequired'
403:
$ref: '#/components/responses/Forbidden'
404:
$ref: '#/components/responses/NotFound'
500:
$ref: '#/components/responses/InternalServerError'
x-readme:
code-samples:
- language: java
install: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
JsonElement result = client.tasks.addDependenciesForTask(taskGid)
.data("field", "value")
.data("field", "value")
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.tasks.addDependenciesForTask(taskGid, {field: "value", field:
"value", pretty: true})
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.tasks.add_dependencies_for_task(task_gid, {'field':
'value', 'field': 'value'}, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
tasks->addDependenciesForTask($task_gid, array('field'
=> 'value', 'field' => 'value'), array('opt_pretty' => 'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.tasks.add_dependencies_for_task(task_gid: 'task_gid',
field: "value", field: "value", options: {pretty: true})
/tasks/{task_gid}/removeDependencies:
parameters:
- $ref: '#/components/parameters/task_path_gid'
- $ref: '#/components/parameters/pretty'
- $ref: '#/components/parameters/fields'
post:
summary: Unlink dependencies from a task
description: Unlinks a set of dependencies from this task.
tags:
- Tasks
operationId: removeDependenciesForTask
requestBody:
description: The list of tasks to unlink as dependencies.
required: true
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/ModifyDependenciesRequest'
responses:
200:
description: >-
Successfully unlinked the dependencies from the specified task.
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/EmptyResponse'
400:
$ref: '#/components/responses/BadRequest'
401:
$ref: '#/components/responses/Unauthorized'
402:
$ref: '#/components/responses/PaymentRequired'
403:
$ref: '#/components/responses/Forbidden'
404:
$ref: '#/components/responses/NotFound'
500:
$ref: '#/components/responses/InternalServerError'
x-readme:
code-samples:
- language: java
install: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
JsonElement result = client.tasks.removeDependenciesForTask(taskGid)
.data("field", "value")
.data("field", "value")
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.tasks.removeDependenciesForTask(taskGid, {field: "value", field:
"value", pretty: true})
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.tasks.remove_dependencies_for_task(task_gid, {'field':
'value', 'field': 'value'}, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
tasks->removeDependenciesForTask($task_gid, array('field'
=> 'value', 'field' => 'value'), array('opt_pretty' => 'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.tasks.remove_dependencies_for_task(task_gid: 'task_gid',
field: "value", field: "value", options: {pretty: true})
/tasks/{task_gid}/dependents:
parameters:
- $ref: '#/components/parameters/task_path_gid'
- $ref: '#/components/parameters/pretty'
- $ref: '#/components/parameters/fields'
- $ref: '#/components/parameters/limit'
- $ref: '#/components/parameters/offset'
get:
summary: Get dependents from a task
description: >-
Returns the compact representations of all of the dependents of a task.
tags:
- Tasks
operationId: getDependentsForTask
responses:
200:
description: >-
Successfully retrieved the specified dependents of the task.
content:
application/json:
schema:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/TaskCompact'
400:
$ref: '#/components/responses/BadRequest'
401:
$ref: '#/components/responses/Unauthorized'
402:
$ref: '#/components/responses/PaymentRequired'
403:
$ref: '#/components/responses/Forbidden'
404:
$ref: '#/components/responses/NotFound'
500:
$ref: '#/components/responses/InternalServerError'
x-readme:
code-samples:
- language: java
install: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
List result = client.tasks.getDependentsForTask(taskGid)
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.tasks.getDependentsForTask(taskGid, {param: "value", param: "value",
opt_pretty: true})
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.tasks.get_dependents_for_task(task_gid, {'param': 'value',
'param': 'value'}, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
tasks->getDependentsForTask($task_gid, array('param'
=> 'value', 'param' => 'value'), array('opt_pretty' => 'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.tasks.get_dependents_for_task(task_gid: 'task_gid',
param: "value", param: "value", options: {pretty: true})
/tasks/{task_gid}/addDependents:
parameters:
- $ref: '#/components/parameters/task_path_gid'
- $ref: '#/components/parameters/pretty'
- $ref: '#/components/parameters/fields'
post:
summary: Set dependents for a task
description: >-
Marks a set of tasks as dependents of this task, if they are not already
dependents. *A task can have at most 30 dependents and dependencies combined*.
tags:
- Tasks
operationId: addDependentsForTask
requestBody:
description: The list of tasks to add as dependents.
required: true
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/ModifyDependentsRequest'
responses:
200:
description: >-
Successfully set the specified dependents on the given task.
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/EmptyResponse'
400:
$ref: '#/components/responses/BadRequest'
401:
$ref: '#/components/responses/Unauthorized'
402:
$ref: '#/components/responses/PaymentRequired'
403:
$ref: '#/components/responses/Forbidden'
404:
$ref: '#/components/responses/NotFound'
500:
$ref: '#/components/responses/InternalServerError'
x-readme:
code-samples:
- language: java
install: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
JsonElement result = client.tasks.addDependentsForTask(taskGid)
.data("field", "value")
.data("field", "value")
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.tasks.addDependentsForTask(taskGid, {field: "value", field: "value",
pretty: true})
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.tasks.add_dependents_for_task(task_gid, {'field': 'value',
'field': 'value'}, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
tasks->addDependentsForTask($task_gid, array('field'
=> 'value', 'field' => 'value'), array('opt_pretty' => 'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.tasks.add_dependents_for_task(task_gid: 'task_gid',
field: "value", field: "value", options: {pretty: true})
/tasks/{task_gid}/removeDependents:
parameters:
- $ref: '#/components/parameters/task_path_gid'
- $ref: '#/components/parameters/pretty'
- $ref: '#/components/parameters/fields'
post:
summary: Unlink dependents from a task
description: >-
Unlinks a set of dependents from this task.
tags:
- Tasks
operationId: removeDependentsForTask
requestBody:
description: The list of tasks to remove as dependents.
required: true
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/ModifyDependentsRequest'
responses:
200:
description: >-
Successfully unlinked the specified tasks as dependents.
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/EmptyResponse'
400:
$ref: '#/components/responses/BadRequest'
401:
$ref: '#/components/responses/Unauthorized'
402:
$ref: '#/components/responses/PaymentRequired'
403:
$ref: '#/components/responses/Forbidden'
404:
$ref: '#/components/responses/NotFound'
500:
$ref: '#/components/responses/InternalServerError'
x-readme:
code-samples:
- language: java
install: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
JsonElement result = client.tasks.removeDependentsForTask(taskGid)
.data("field", "value")
.data("field", "value")
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.tasks.removeDependentsForTask(taskGid, {field: "value", field:
"value", pretty: true})
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.tasks.remove_dependents_for_task(task_gid, {'field':
'value', 'field': 'value'}, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
tasks->removeDependentsForTask($task_gid, array('field'
=> 'value', 'field' => 'value'), array('opt_pretty' => 'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.tasks.remove_dependents_for_task(task_gid: 'task_gid',
field: "value", field: "value", options: {pretty: true})
/tasks/{task_gid}/addProject:
parameters:
- $ref: '#/components/parameters/task_path_gid'
- $ref: '#/components/parameters/pretty'
- $ref: '#/components/parameters/fields'
post:
summary: Add a project to a task
description: |-
Adds the task to the specified project, in the optional location
specified. If no location arguments are given, the task will be added to
the end of the project.
`addProject` can also be used to reorder a task within a project or
section that already contains it.
At most one of `insert_before`, `insert_after`, or `section` should be
specified. Inserting into a section in an non-order-dependent way can be
done by specifying section, otherwise, to insert within a section in a
particular place, specify `insert_before` or `insert_after` and a task
within the section to anchor the position of this task.
Returns an empty data block.
tags:
- Tasks
operationId: addProjectForTask
requestBody:
description: The project to add the task to.
required: true
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/TaskAddProjectRequest'
responses:
200:
description: >-
Successfully added the specified project to the task.
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/EmptyResponse'
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: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
JsonElement result = client.tasks.addProjectForTask(taskGid)
.data("field", "value")
.data("field", "value")
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.tasks.addProjectForTask(taskGid, {field: "value", field: "value",
pretty: true})
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.tasks.add_project_for_task(task_gid, {'field': 'value',
'field': 'value'}, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
tasks->addProjectForTask($task_gid, array('field'
=> 'value', 'field' => 'value'), array('opt_pretty' => 'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.tasks.add_project_for_task(task_gid: 'task_gid', field:
"value", field: "value", options: {pretty: true})
/tasks/{task_gid}/removeProject:
parameters:
- $ref: '#/components/parameters/task_path_gid'
- $ref: '#/components/parameters/pretty'
- $ref: '#/components/parameters/fields'
post:
summary: Remove a project from a task
description: |-
Removes the task from the specified project. The task will still exist in
the system, but it will not be in the project anymore.
Returns an empty data block.
tags:
- Tasks
operationId: removeProjectForTask
requestBody:
description: The project to remove the task from.
required: true
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/TaskRemoveProjectRequest'
responses:
200:
description: >-
Successfully removed the specified project from the task.
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/EmptyResponse'
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: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
JsonElement result = client.tasks.removeProjectForTask(taskGid)
.data("field", "value")
.data("field", "value")
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.tasks.removeProjectForTask(taskGid, {field: "value", field: "value",
pretty: true})
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.tasks.remove_project_for_task(task_gid, {'field': 'value',
'field': 'value'}, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
tasks->removeProjectForTask($task_gid, array('field'
=> 'value', 'field' => 'value'), array('opt_pretty' => 'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.tasks.remove_project_for_task(task_gid: 'task_gid',
field: "value", field: "value", options: {pretty: true})
/tasks/{task_gid}/addTag:
parameters:
- $ref: '#/components/parameters/task_path_gid'
- $ref: '#/components/parameters/pretty'
- $ref: '#/components/parameters/fields'
post:
summary: Add a tag to a task
description: >-
Adds a tag to a task. Returns an empty data block.
tags:
- Tasks
operationId: addTagForTask
requestBody:
description: The tag to add to the task.
required: true
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/TaskAddTagRequest'
responses:
200:
description: >-
Successfully added the specified tag to the task.
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/EmptyResponse'
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: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
JsonElement result = client.tasks.addTagForTask(taskGid)
.data("field", "value")
.data("field", "value")
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.tasks.addTagForTask(taskGid, {field: "value", field: "value",
pretty: true})
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.tasks.add_tag_for_task(task_gid, {'field': 'value',
'field': 'value'}, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
tasks->addTagForTask($task_gid, array('field' =>
'value', 'field' => 'value'), array('opt_pretty' => 'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.tasks.add_tag_for_task(task_gid: 'task_gid', field:
"value", field: "value", options: {pretty: true})
/tasks/{task_gid}/removeTag:
parameters:
- $ref: '#/components/parameters/task_path_gid'
- $ref: '#/components/parameters/pretty'
- $ref: '#/components/parameters/fields'
post:
summary: Remove a tag from a task
description: >-
Removes a tag from a task. Returns an empty data block.
tags:
- Tasks
operationId: removeTagForTask
requestBody:
description: The tag to remove from the task.
required: true
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/TaskRemoveTagRequest'
responses:
200:
description: >-
Successfully removed the specified tag from the task.
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/EmptyResponse'
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: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
JsonElement result = client.tasks.removeTagForTask(taskGid)
.data("field", "value")
.data("field", "value")
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.tasks.removeTagForTask(taskGid, {field: "value", field: "value",
pretty: true})
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.tasks.remove_tag_for_task(task_gid, {'field': 'value',
'field': 'value'}, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
tasks->removeTagForTask($task_gid, array('field'
=> 'value', 'field' => 'value'), array('opt_pretty' => 'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.tasks.remove_tag_for_task(task_gid: 'task_gid', field:
"value", field: "value", options: {pretty: true})
/tasks/{task_gid}/addFollowers:
parameters:
- $ref: '#/components/parameters/task_path_gid'
- $ref: '#/components/parameters/pretty'
- $ref: '#/components/parameters/fields'
post:
summary: Add followers to a task
description: >-
Adds followers to a task. Returns an empty data block.
Each task can be associated with zero or more followers in the system.
Requests to add/remove followers, if successful, will return the complete
updated task record, described above.
tags:
- Tasks
operationId: addFollowersForTask
requestBody:
description: The followers to add to the task.
required: true
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/TaskAddFollowersRequest'
responses:
200:
description: >-
Successfully added the specified followers to the task.
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/TaskResponse'
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: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
Task result = client.tasks.addFollowersForTask(taskGid)
.data("field", "value")
.data("field", "value")
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.tasks.addFollowersForTask(taskGid, {field: "value", field: "value",
pretty: true})
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.tasks.add_followers_for_task(task_gid, {'field': 'value',
'field': 'value'}, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
tasks->addFollowersForTask($task_gid, array('field'
=> 'value', 'field' => 'value'), array('opt_pretty' => 'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.tasks.add_followers_for_task(task_gid: 'task_gid', field:
"value", field: "value", options: {pretty: true})
/tasks/{task_gid}/removeFollowers:
parameters:
- $ref: '#/components/parameters/task_path_gid'
- $ref: '#/components/parameters/pretty'
- $ref: '#/components/parameters/fields'
post:
summary: Remove followers from a task
description: >-
Removes each of the specified followers from the task if they are
following. Returns the complete, updated record for the affected task.
tags:
- Tasks
operationId: removeFollowerForTask
requestBody:
description: The followers to remove from the task.
required: true
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/TaskRemoveFollowersRequest'
responses:
200:
description: >-
Successfully removed the specified followers from the task.
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/TaskResponse'
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: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
Task result = client.tasks.removeFollowerForTask(taskGid)
.data("field", "value")
.data("field", "value")
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.tasks.removeFollowerForTask(taskGid, {field: "value", field:
"value", pretty: true})
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.tasks.remove_follower_for_task(task_gid, {'field': 'value',
'field': 'value'}, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
tasks->removeFollowerForTask($task_gid, array('field'
=> 'value', 'field' => 'value'), array('opt_pretty' => 'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.tasks.remove_follower_for_task(task_gid: 'task_gid',
field: "value", field: "value", options: {pretty: true})
/workspaces/{workspace_gid}/tasks/search:
parameters:
- $ref: '#/components/parameters/workspace_path_gid'
- $ref: '#/components/parameters/pretty'
- $ref: '#/components/parameters/fields'
- name: text
in: query
description: >-
Performs full-text search on both task name and description
schema:
type: string
example: Bug
- name: resource_subtype
in: query
description: >-
Filters results by the task's resource_subtype
schema:
type: string
enum:
- default_task
- milestone
default: milestone
- name: assignee.any
in: query
description: >-
Comma-separated list of user identifiers
schema:
type: string
example: 12345,23456,34567
- name: assignee.not
in: query
description: >-
Comma-separated list of user identifiers
schema:
type: string
example: 12345,23456,34567
- name: portfolios.any
in: query
description: >-
Comma-separated list of portfolio IDs
schema:
type: string
example: 12345,23456,34567
- name: projects.any
in: query
description: >-
Comma-separated list of project IDs
schema:
type: string
example: 12345,23456,34567
- name: projects.not
in: query
description: >-
Comma-separated list of project IDs
schema:
type: string
example: 12345,23456,34567
- name: projects.all
in: query
description: >-
Comma-separated list of project IDs
schema:
type: string
example: 12345,23456,34567
- name: sections.any
in: query
description: >-
Comma-separated list of section or column IDs
schema:
type: string
example: 12345,23456,34567
- name: sections.not
in: query
description: >-
Comma-separated list of section or column IDs
schema:
type: string
example: 12345,23456,34567
- name: sections.all
in: query
description: >-
Comma-separated list of section or column IDs
schema:
type: string
example: 12345,23456,34567
- name: tags.any
in: query
description: >-
Comma-separated list of tag IDs
schema:
type: string
example: 12345,23456,34567
- name: tags.not
in: query
description: >-
Comma-separated list of tag IDs
schema:
type: string
example: 12345,23456,34567
- name: tags.all
in: query
description: >-
Comma-separated list of tag IDs
schema:
type: string
example: 12345,23456,34567
- name: teams.any
in: query
description: >-
Comma-separated list of team IDs
schema:
type: string
example: 12345,23456,34567
- name: followers.not
in: query
description: >-
Comma-separated list of user identifiers
schema:
type: string
example: 12345,23456,34567
- name: created_by.any
in: query
description: >-
Comma-separated list of user identifiers
schema:
type: string
example: 12345,23456,34567
- name: created_by.not
in: query
description: >-
Comma-separated list of user identifiers
schema:
type: string
example: 12345,23456,34567
- name: assigned_by.any
in: query
description: >-
Comma-separated list of user identifiers
schema:
type: string
example: 12345,23456,34567
- name: assigned_by.not
in: query
description: >-
Comma-separated list of user identifiers
schema:
type: string
example: 12345,23456,34567
- name: liked_by.not
in: query
description: >-
Comma-separated list of user identifiers
schema:
type: string
example: 12345,23456,34567
- name: commented_on_by.not
in: query
description: >-
Comma-separated list of user identifiers
schema:
type: string
example: 12345,23456,34567
- name: due_on.before
in: query
description: >-
ISO 8601 date string
schema:
type: string
format: date
example: '2019-09-15'
- name: due_on.after
in: query
description: >-
ISO 8601 date string
schema:
type: string
format: date
example: '2019-09-15'
- name: due_on
in: query
description: >-
ISO 8601 date string or `null`
schema:
type: string
format: date
nullable: true
example: '2019-09-15'
- name: due_at.before
in: query
description: >-
ISO 8601 datetime string
schema:
type: string
format: date-time
example: '2019-04-15T01:01:46.055Z'
- name: due_at.after
in: query
description: >-
ISO 8601 datetime string
schema:
type: string
format: date-time
example: '2019-04-15T01:01:46.055Z'
- name: start_on.before
in: query
description: >-
ISO 8601 date string
schema:
type: string
format: date
example: '2019-09-15'
- name: start_on.after
in: query
description: >-
ISO 8601 date string
schema:
type: string
format: date
example: '2019-09-15'
- name: start_on
in: query
description: >-
ISO 8601 date string or `null`
schema:
type: string
format: date
nullable: true
example: '2019-09-15'
- name: created_on.before
in: query
description: >-
ISO 8601 date string
schema:
type: string
format: date
example: '2019-09-15'
- name: created_on.after
in: query
description: >-
ISO 8601 date string
schema:
type: string
format: date
example: '2019-09-15'
- name: created_on
in: query
description: >-
ISO 8601 date string or `null`
schema:
type: string
format: date
nullable: true
example: '2019-09-15'
- name: created_at.before
in: query
description: >-
ISO 8601 datetime string
schema:
type: string
format: date-time
example: '2019-04-15T01:01:46.055Z'
- name: created_at.after
in: query
description: >-
ISO 8601 datetime string
schema:
type: string
format: date-time
example: '2019-04-15T01:01:46.055Z'
- name: completed_on.before
in: query
description: >-
ISO 8601 date string
schema:
type: string
format: date
example: '2019-09-15'
- name: completed_on.after
in: query
description: >-
ISO 8601 date string
schema:
type: string
format: date
example: '2019-09-15'
- name: completed_on
in: query
description: >-
ISO 8601 date string or `null`
schema:
type: string
format: date
nullable: true
example: '2019-09-15'
- name: completed_at.before
in: query
description: >-
ISO 8601 datetime string
schema:
type: string
format: date-time
example: '2019-04-15T01:01:46.055Z'
- name: completed_at.after
in: query
description: >-
ISO 8601 datetime string
schema:
type: string
format: date-time
example: '2019-04-15T01:01:46.055Z'
- name: modified_on.before
in: query
description: >-
ISO 8601 date string
schema:
type: string
format: date
example: '2019-09-15'
- name: modified_on.after
in: query
description: >-
ISO 8601 date string
schema:
type: string
format: date
example: '2019-09-15'
- name: modified_on
in: query
description: >-
ISO 8601 date string or `null`
schema:
type: string
format: date
nullable: true
example: '2019-09-15'
- name: modified_at.before
in: query
description: >-
ISO 8601 datetime string
schema:
type: string
format: date-time
example: '2019-04-15T01:01:46.055Z'
- name: modified_at.after
in: query
description: >-
ISO 8601 datetime string
schema:
type: string
format: date-time
example: '2019-04-15T01:01:46.055Z'
- name: is_blocking
in: query
description: >-
Filter to incomplete tasks with dependents
schema:
type: boolean
example: false
- name: is_blocked
in: query
description: >-
Filter to tasks with incomplete dependencies
schema:
type: boolean
example: false
- name: has_attachment
in: query
description: >-
Filter to tasks with attachments
schema:
type: boolean
example: false
- name: completed
in: query
description: >-
Filter to completed tasks
schema:
type: boolean
example: false
- name: is_subtask
in: query
description: >-
Filter to subtasks
schema:
type: boolean
example: false
- name: sort_by
in: query
description: >-
One of `due_date`, `created_at`, `completed_at`, `likes`, or
`modified_at`, defaults to `modified_at`
schema:
type: string
enum:
- due_date
- created_at
- completed_at
- likes
- modified_at
default: modified_at
example: likes
- name: sort_ascending
in: query
description: >-
Default `false`
schema:
type: boolean
default: false
example: true
get:
summary: Search tasks in a workspace
description: >-
To mirror the functionality of the Asana web app's advanced search feature,
the Asana API has a task search endpoint that allows you to build complex
filters to find and retrieve the exact data you need.
#### Premium access
Like the Asana web product's advance search feature, this search endpoint
will
only be available to premium Asana users. A user is premium if any of the
following is true:
- The workspace in which the search is being performed is a premium workspace
- The user is a member of a premium team inside the workspace
Even if a user is only a member of a premium team inside a non-premium
workspace, search will allow them to find data anywhere in the workspace,
not just inside the premium team. Making a search request using credentials
of a non-premium user will result in a `402 Payment Required` error.
#### Pagination
Search results are not stable; repeating the same query multiple times may
return the data in a different order, even if the data do not change. Because
of this, the traditional [pagination](https://developers.asana.com/docs/#pagination)
available elsewhere in the Asana API is not available here. However, you can
paginate manually by sorting the search results by their creation time and
then
modifying each subsequent query to exclude data you have already seen. Page
sizes
are limited to a maximum of 100 items, and can be specified by the `limit`
query parameter.
#### Eventual consistency
Changes in Asana (regardless of whether they’re made though the web product
or the API) are forwarded to our search infrastructure to be indexed. This
process can take between 10 and 60 seconds to complete under normal operation,
and longer during some production incidents. Making a change to a task that
would alter its presence in a particular search query will not be reflected
immediately. This is also true of the advanced search feature in the web product.
#### Rate limits
You may receive a `429 Too Many Requests` response if you hit any of our
[rate limits](https://developers.asana.com/docs/#rate-limits).
#### Custom field parameters
| Parameter name | Custom field type | Accepted type |
|---|---|---|
| custom_fields.{gid}.is_set | All | Boolean |
| custom_fields.{gid}.value | Text | String |
| custom_fields.{gid}.value | Number | Number |
| custom_fields.{gid}.value | Enum | Enum option ID |
| custom_fields.{gid}.starts_with | Text only | String |
| custom_fields.{gid}.ends_with | Text only | String |
| custom_fields.{gid}.contains | Text only | String |
| custom_fields.{gid}.less_than | Number only | Number |
| custom_fields.{gid}.greater_than | Number only | Number |
For example, if the gid of the custom field is 12345, these query parameter
to
find tasks where it is set would be `custom_fields.12345.is_set=true`. To
match
an exact value for an enum custom field, use the gid of the desired enum option
and not the name of the enum option: `custom_fields.12345.value=67890`.
**Not Supported**: searching for multiple exact matches of a custom field,
searching for multi-enum custom field
*Note: If you specify `projects.any` and `sections.any`, you will receive
tasks for the project **and** tasks for the section. If you're looking for
only tasks in a section, omit the `projects.any` from the request.*
tags:
- Tasks
operationId: searchTasksForWorkspace
responses:
200:
description: >-
Successfully retrieved the section's tasks.
content:
application/json:
schema:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/TaskCompact'
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: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
List result = client.tasks.searchTasksForWorkspace(workspaceGid,
sortAscending, sortBy, isSubtask, completed, hasAttachment, isBlocked,
isBlocking, modifiedAtAfter, modifiedAtBefore, dueOn, modifiedOn, modifiedOnAfter,
modifiedOnBefore, completedAtAfter, completedAtBefore, completedOn,
completedOnAfter, completedOnBefore, createdAtAfter, dueOnAfter, createdAtBefore,
createdOn, createdOnAfter, createdOnBefore, startOn, startOnAfter, startOnBefore,
dueAtAfter, dueAtBefore, dueOnBefore, commentedOnByNot, likedByNot,
assignedByNot, assignedByAny, createdByNot, createdByAny, followersNot,
teamsAny, tagsAll, tagsNot, tagsAny, sectionsAll, sectionsNot, sectionsAny,
projectsAll, projectsNot, projectsAny, portfoliosAny, assigneeNot, assigneeAny,
resourceSubtype, text)
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.tasks.searchTasksForWorkspace(workspaceGid, {param: "value",
param: "value", opt_pretty: true})
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.tasks.search_tasks_for_workspace(workspace_gid, {'param':
'value', 'param': 'value'}, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
tasks->searchTasksForWorkspace($workspace_gid, array('param'
=> 'value', 'param' => 'value'), array('opt_pretty' => 'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.tasks.search_tasks_for_workspace(workspace_gid: 'workspace_gid',
param: "value", param: "value", options: {pretty: true})
/team_memberships/{team_membership_gid}:
parameters:
- $ref: '#/components/parameters/team_membership_path_gid'
- $ref: '#/components/parameters/pretty'
- $ref: '#/components/parameters/fields'
get:
summary: Get a team membership
description: >-
Returns the complete team membership record for a single team membership.
tags:
- Team memberships
operationId: getTeamMembership
responses:
200:
description: >-
Successfully retrieved the requested team membership.
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/TeamMembershipResponse'
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: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
JsonElement result = client.teammemberships.getTeamMembership(teamMembershipGid)
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.teammemberships.getTeamMembership(teamMembershipGid, {param:
"value", param: "value", opt_pretty: true})
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.team_memberships.get_team_membership(team_membership_gid,
{'param': 'value', 'param': 'value'}, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
teammemberships->getTeamMembership($team_membership_gid,
array('param' => 'value', 'param' => 'value'), array('opt_pretty' =>
'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.team_memberships.get_team_membership(team_membership_gid:
'team_membership_gid', param: "value", param: "value", options: {pretty:
true})
/team_memberships:
parameters:
- $ref: '#/components/parameters/pretty'
- $ref: '#/components/parameters/fields'
- $ref: '#/components/parameters/limit'
- $ref: '#/components/parameters/offset'
get:
summary: Get team memberships
description: >-
Returns compact team membership records.
tags:
- Team memberships
operationId: getTeamMemberships
parameters:
- name: team
in: query
description: Globally unique identifier for the team.
schema:
type: string
example: '159874'
- name: user
in: query
description: >-
A string identifying a user. This can either be the string "me", an
email, or the gid of a user.
This parameter must be used with the workspace parameter.
schema:
type: string
example: '512241'
- name: workspace
in: query
description: >-
Globally unique identifier for the workspace. This parameter must be
used with the user parameter.
schema:
type: string
example: '31326'
responses:
200:
description: >-
Successfully retrieved the requested team memberships.
content:
application/json:
schema:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/TeamMembershipCompact'
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: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
List result = client.teammemberships.getTeamMemberships(workspace,
user, team)
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.teammemberships.getTeamMemberships({param: "value", param: "value",
opt_pretty: true})
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.team_memberships.get_team_memberships({'param': 'value',
'param': 'value'}, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
teammemberships->getTeamMemberships(array('param'
=> 'value', 'param' => 'value'), array('opt_pretty' => 'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.team_memberships.get_team_memberships(param: "value",
param: "value", options: {pretty: true})
/teams/{team_gid}/team_memberships:
parameters:
- $ref: '#/components/parameters/team_path_gid'
- $ref: '#/components/parameters/pretty'
- $ref: '#/components/parameters/fields'
- $ref: '#/components/parameters/limit'
- $ref: '#/components/parameters/offset'
get:
summary: Get memberships from a team
description: >-
Returns the compact team memberships for the team.
tags:
- Team memberships
operationId: getTeamMembershipsForTeam
responses:
200:
description: >-
Successfully retrieved the requested team's memberships.
content:
application/json:
schema:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/TeamMembershipCompact'
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: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
List result = client.teammemberships.getTeamMembershipsForTeam(teamGid)
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.teammemberships.getTeamMembershipsForTeam(teamGid, {param: "value",
param: "value", opt_pretty: true})
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.team_memberships.get_team_memberships_for_team(team_gid,
{'param': 'value', 'param': 'value'}, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
teammemberships->getTeamMembershipsForTeam($team_gid,
array('param' => 'value', 'param' => 'value'), array('opt_pretty' =>
'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.team_memberships.get_team_memberships_for_team(team_gid:
'team_gid', param: "value", param: "value", options: {pretty: true})
/users/{user_gid}/team_memberships:
parameters:
- $ref: '#/components/parameters/user_path_gid'
- $ref: '#/components/parameters/pretty'
- $ref: '#/components/parameters/fields'
- $ref: '#/components/parameters/limit'
- $ref: '#/components/parameters/offset'
get:
summary: Get memberships from a user
description: >-
Returns the compact team membership records for the user.
tags:
- Team memberships
operationId: getTeamMembershipsForUser
parameters:
- name: workspace
description: >-
Globally unique identifier for the workspace.
in: query
schema:
type: string
example: '31326'
required: true
responses:
200:
description: >-
Successfully retrieved the requested users's memberships.
content:
application/json:
schema:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/TeamMembershipCompact'
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: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
List result = client.teammemberships.getTeamMembershipsForUser(userGid,
workspace)
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.teammemberships.getTeamMembershipsForUser(userGid, {param: "value",
param: "value", opt_pretty: true})
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.team_memberships.get_team_memberships_for_user(user_gid,
{'param': 'value', 'param': 'value'}, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
teammemberships->getTeamMembershipsForUser($user_gid,
array('param' => 'value', 'param' => 'value'), array('opt_pretty' =>
'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.team_memberships.get_team_memberships_for_user(user_gid:
'user_gid', workspace: ''workspace_example'', param: "value",
param: "value", options: {pretty: true})
/teams:
parameters:
- $ref: '#/components/parameters/pretty'
- $ref: '#/components/parameters/fields'
- $ref: '#/components/parameters/limit'
- $ref: '#/components/parameters/offset'
post:
summary: Create a team
description: |-
Creates a team within the current workspace.
tags:
- Teams
operationId: createTeam
requestBody:
description: The team to create.
required: true
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/TeamRequest'
responses:
201:
description: Successfully created a new team.
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/TeamResponse'
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: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
Team result = client.teams.createTeam()
.data("field", "value")
.data("field", "value")
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.teams.createTeam({field: "value", field: "value", pretty: true})
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.teams.create_team({'field': 'value', 'field': 'value'},
opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
teams->createTeam(array('field' => 'value', 'field'
=> 'value'), array('opt_pretty' => 'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.teams.create_team(field: "value", field: "value", options:
{pretty: true})
put:
summary: Update a team
description: |-
Updates a team within the current workspace.
tags:
- Teams
operationId: updateTeam
requestBody:
description: The team to update.
required: true
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/TeamRequest'
responses:
200:
description: Successfully updated the team.
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/TeamResponse'
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: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
Team result = client.teams.updateTeam()
.data("field", "value")
.data("field", "value")
.option("pretty", true)
.execute();
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.teams.update_team({'field': 'value', 'field': 'value'},
opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
teams->updateTeam(array('field' => 'value', 'field'
=> 'value'), array('opt_pretty' => 'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.teams.update_team(field: "value", field: "value", options:
{pretty: true})
/teams/{team_gid}:
parameters:
- $ref: '#/components/parameters/team_path_gid'
- $ref: '#/components/parameters/pretty'
- $ref: '#/components/parameters/fields'
- $ref: '#/components/parameters/limit'
- $ref: '#/components/parameters/offset'
get:
summary: Get a team
description: Returns the full record for a single team.
tags:
- Teams
operationId: getTeam
responses:
200:
description: Successfully retrieved the record for a single team.
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/TeamResponse'
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: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
Team result = client.teams.getTeam(teamGid)
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.teams.getTeam(teamGid, {param: "value", param: "value", opt_pretty:
true})
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.teams.get_team(team_gid, {'param': 'value', 'param':
'value'}, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
teams->getTeam($team_gid, array('param' => 'value',
'param' => 'value'), array('opt_pretty' => 'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.teams.get_team(team_gid: 'team_gid', param: "value",
param: "value", options: {pretty: true})
/workspaces/{workspace_gid}/teams:
parameters:
- $ref: '#/components/parameters/workspace_path_gid'
- $ref: '#/components/parameters/pretty'
- $ref: '#/components/parameters/fields'
- $ref: '#/components/parameters/limit'
- $ref: '#/components/parameters/offset'
get:
summary: Get teams in a workspace
description: >-
Returns the compact records for all teams in the workspace visible to
the authorized user.
tags:
- Teams
operationId: getTeamsForWorkspace
responses:
200:
description: >-
Returns the team records for all teams in the organization or
workspace accessible to the authenticated user.
content:
application/json:
schema:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/TeamCompact'
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: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
List result = client.teams.getTeamsForWorkspace(workspaceGid)
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.teams.getTeamsForWorkspace(workspaceGid, {param: "value", param:
"value", opt_pretty: true})
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.teams.get_teams_for_workspace(workspace_gid, {'param':
'value', 'param': 'value'}, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
teams->getTeamsForWorkspace($workspace_gid, array('param'
=> 'value', 'param' => 'value'), array('opt_pretty' => 'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.teams.get_teams_for_workspace(workspace_gid: 'workspace_gid',
param: "value", param: "value", options: {pretty: true})
/users/{user_gid}/teams:
parameters:
- $ref: '#/components/parameters/user_path_gid'
- $ref: '#/components/parameters/pretty'
- $ref: '#/components/parameters/fields'
- $ref: '#/components/parameters/limit'
- $ref: '#/components/parameters/offset'
- name: organization
in: query
description: The workspace or organization to filter teams on.
required: true
schema:
type: string
example: '1331'
get:
summary: Get teams for a user
description: >-
Returns the compact records for all teams to which the given user is assigned.
tags:
- Teams
operationId: getTeamsForUser
responses:
200:
description: >-
Returns the team records for all teams in the organization or
workspace to which the given user is assigned.
content:
application/json:
schema:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/TeamCompact'
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: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
List result = client.teams.getTeamsForUser(userGid, organization)
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.teams.getTeamsForUser(userGid, {param: "value", param: "value",
opt_pretty: true})
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.teams.get_teams_for_user(user_gid, {'param': 'value',
'param': 'value'}, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
teams->getTeamsForUser($user_gid, array('param' =>
'value', 'param' => 'value'), array('opt_pretty' => 'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.teams.get_teams_for_user(user_gid: 'user_gid', organization:
''organization_example'', param: "value", param: "value",
options: {pretty: true})
/teams/{team_gid}/addUser:
parameters:
- $ref: '#/components/parameters/team_path_gid'
- $ref: '#/components/parameters/pretty'
- $ref: '#/components/parameters/fields'
post:
summary: Add a user to a team
description: >-
The user making this call must be a member of the team in order to add
others. The user being added must exist in the same organization as the
team.
Returns the complete team membership record for the newly added user.
tags:
- Teams
operationId: addUserForTeam
requestBody:
description: The user to add to the team.
required: true
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/TeamAddUserRequest'
responses:
200:
description: >-
Successfully added user to the team.
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/TeamMembershipResponse'
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: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
JsonElement result = client.teams.addUserForTeam(teamGid)
.data("field", "value")
.data("field", "value")
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.teams.addUserForTeam(teamGid, {field: "value", field: "value",
pretty: true})
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.teams.add_user_for_team(team_gid, {'field': 'value',
'field': 'value'}, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
teams->addUserForTeam($team_gid, array('field' =>
'value', 'field' => 'value'), array('opt_pretty' => 'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.teams.add_user_for_team(team_gid: 'team_gid', field:
"value", field: "value", options: {pretty: true})
/teams/{team_gid}/removeUser:
parameters:
- $ref: '#/components/parameters/team_path_gid'
- $ref: '#/components/parameters/pretty'
- $ref: '#/components/parameters/fields'
post:
summary: Remove a user from a team
description: >-
The user making this call must be a member of the team in order to remove
themselves or others.
tags:
- Teams
operationId: removeUserForTeam
requestBody:
description: The user to remove from the team.
required: true
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/TeamRemoveUserRequest'
responses:
204:
description: >-
Returns an empty data record
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/EmptyResponse'
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: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
JsonElement result = client.teams.removeUserForTeam(teamGid)
.data("field", "value")
.data("field", "value")
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.teams.removeUserForTeam(teamGid, {field: "value", field: "value",
pretty: true})
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.teams.remove_user_for_team(team_gid, {'field': 'value',
'field': 'value'}, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
teams->removeUserForTeam($team_gid, array('field'
=> 'value', 'field' => 'value'), array('opt_pretty' => 'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.teams.remove_user_for_team(team_gid: 'team_gid', field:
"value", field: "value", options: {pretty: true})
/time_periods/{time_period_gid}:
parameters:
- $ref: '#/components/parameters/time_period_path_gid'
- $ref: '#/components/parameters/pretty'
- $ref: '#/components/parameters/fields'
get:
summary: Get a time period
description: Returns the full record for a single time period.
operationId: getTimePeriod
tags:
- Time periods
responses:
200:
description: Successfully retrieved the record for a single time period.
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/TimePeriodResponse'
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: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
JsonElement result = client.timeperiods.getTimePeriod(timePeriodGid)
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.timeperiods.getTimePeriod(timePeriodGid, {param: "value", param:
"value", opt_pretty: true})
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.time_periods.get_time_period(time_period_gid, {'param':
'value', 'param': 'value'}, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
timeperiods->getTimePeriod($time_period_gid, array('param'
=> 'value', 'param' => 'value'), array('opt_pretty' => 'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.time_periods.get_time_period(time_period_gid: 'time_period_gid',
param: "value", param: "value", options: {pretty: true})
/time_periods:
parameters:
- $ref: '#/components/parameters/pretty'
- $ref: '#/components/parameters/fields'
- $ref: '#/components/parameters/limit'
- $ref: '#/components/parameters/offset'
get:
summary: Get time periods
description: >-
Returns compact time period records.
tags:
- Time periods
operationId: getTimePeriods
parameters:
- name: start_on
in: query
description: >-
ISO 8601 date string
schema:
type: string
format: date
example: '2019-09-15'
- name: end_on
in: query
description: >-
ISO 8601 date string
schema:
type: string
format: date
example: '2019-09-15'
- name: workspace
in: query
required: true
description: Globally unique identifier for the workspace.
schema:
type: string
example: '31326'
responses:
200:
description: >-
Successfully retrieved the requested time periods.
content:
application/json:
schema:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/TimePeriodCompact'
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: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
List result = client.timeperiods.getTimePeriods(endOn,
startOn, workspace)
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.timeperiods.getTimePeriods({param: "value", param: "value", opt_pretty:
true})
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.time_periods.get_time_periods({'param': 'value', 'param':
'value'}, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
timeperiods->getTimePeriods(array('param' => 'value',
'param' => 'value'), array('opt_pretty' => 'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.time_periods.get_time_periods(workspace: ''workspace_example'',
param: "value", param: "value", options: {pretty: true})
/workspaces/{workspace_gid}/typeahead:
parameters:
- $ref: '#/components/parameters/workspace_path_gid'
- name: resource_type
in: query
description: >-
The type of values the typeahead should return. You can choose from one
of the following: `custom_field`, `project`, `project_template`,
`portfolio`, `tag`, `task`, and `user`. Note that unlike in the names
of endpoints, the types listed here are in singular form (e.g. `task`).
Using multiple types is not yet supported.
required: true
schema:
type: string
enum:
- custom_field
- project
- project_template
- portfolio
- tag
- task
- user
default: user
- name: type
in: query
description: >-
*Deprecated: new integrations should prefer the resource_type field.*
required: false
schema:
type: string
enum:
- custom_field
- portfolio
- project
- tag
- task
- user
default: user
- name: query
in: query
description: >-
The string that will be used to search for relevant objects. If an
empty string is passed in, the API will return results.
schema:
type: string
example: Greg
- name: count
in: query
description: >-
The number of results to return. The default is 20 if this parameter is
omitted, with a minimum of 1 and a maximum of 100. If there are fewer
results found than requested, all will be returned.
schema:
type: integer
example: 20
- $ref: '#/components/parameters/pretty'
- $ref: '#/components/parameters/fields'
get:
summary: Get objects via typeahead
description: |-
Retrieves objects in the workspace based via an auto-completion/typeahead
search algorithm. This feature is meant to provide results quickly, so do
not rely on this API to provide extremely accurate search results. The
result set is limited to a single page of results with a maximum size, so
you won’t be able to fetch large numbers of results.
The typeahead search API provides search for objects from a single
workspace. This endpoint should be used to query for objects when
creating an auto-completion/typeahead search feature. This API is meant
to provide results quickly and should not be relied upon for accurate or
exhaustive search results. The results sets are limited in size and
cannot be paginated.
Queries return a compact representation of each object which is typically
the gid and name fields. Interested in a specific set of fields or all of
the fields?! Of course you are. Use field selectors to manipulate what
data is included in a response.
Resources with type `user` are returned in order of most contacted to
least contacted. This is determined by task assignments, adding the user
to projects, and adding the user as a follower to tasks, messages,
etc.
Resources with type `project` are returned in order of recency. This is
determined when the user visits the project, is added to the project, and
completes tasks in the project.
Resources with type `task` are returned with priority placed on tasks
the user is following, but no guarantee on the order of those tasks.
Resources with type `project_template` are returned with priority
placed on favorited project templates.
Leaving the `query` string empty or omitted will give you results, still
following the resource ordering above. This could be used to list users or
projects that are relevant for the requesting user's api token.
tags:
- Typeahead
operationId: typeaheadForWorkspace
responses:
200:
description: >-
Successfully retrieved objects via a typeahead search algorithm.
content:
application/json:
schema:
type: object
description: >-
A generic list of objects, such as those returned by the typeahead
search
endpoint.
properties:
data:
type: array
items:
$ref: '#/components/schemas/AsanaNamedResource'
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: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
List result = client.typeahead.typeaheadForWorkspace(workspaceGid,
count, query, type, resourceType)
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.typeahead.typeaheadForWorkspace(workspaceGid, {param: "value",
param: "value", opt_pretty: true})
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.typeahead.typeahead_for_workspace(workspace_gid, {'param':
'value', 'param': 'value'}, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
typeahead->typeaheadForWorkspace($workspace_gid,
array('param' => 'value', 'param' => 'value'), array('opt_pretty' =>
'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.typeahead.typeahead_for_workspace(workspace_gid: 'workspace_gid',
resource_type: ''resource_type_example'', param: "value",
param: "value", options: {pretty: true})
/user_task_lists/{user_task_list_gid}:
parameters:
- $ref: '#/components/parameters/user_task_list_path_gid'
- $ref: '#/components/parameters/pretty'
- $ref: '#/components/parameters/fields'
get:
summary: Get a user task list
description: >-
Returns the full record for a user task list.
tags:
- User task lists
operationId: getUserTaskList
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: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
UserTaskList result = client.usertasklists.getUserTaskList(userTaskListGid)
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.usertasklists.getUserTaskList(userTaskListGid, {param: "value",
param: "value", opt_pretty: true})
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
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)
- language: php
install: composer require asana/asana
code: >-
usertasklists->getUserTaskList($user_task_list_gid,
array('param' => 'value', 'param' => 'value'), array('opt_pretty' =>
'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = 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'
- $ref: '#/components/parameters/fields'
- name: workspace
in: query
required: true
description: >-
The workspace in which to get the user task list.
schema:
type: string
example: '1234'
get:
summary: Get a user's task list
description: >-
Returns the full record for a user's task list.
tags:
- User task lists
operationId: getUserTaskListForUser
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: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
UserTaskList result = client.usertasklists.getUserTaskListForUser(userGid,
workspace)
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.usertasklists.getUserTaskListForUser(userGid, {param: "value",
param: "value", opt_pretty: true})
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
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)
- language: php
install: composer require asana/asana
code: >-
usertasklists->getUserTaskListForUser($user_gid,
array('param' => 'value', 'param' => 'value'), array('opt_pretty' =>
'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.user_task_lists.get_user_task_list_for_user(user_gid:
'user_gid', workspace: ''workspace_example'', param: "value",
param: "value", options: {pretty: true})
/users:
parameters:
- name: workspace
in: query
description: >-
The workspace or organization ID to filter users on.
schema:
type: string
example: '1331'
- name: team
in: query
description: >-
The team ID to filter users on.
schema:
type: string
example: '15627'
- $ref: '#/components/parameters/pretty'
- $ref: '#/components/parameters/fields'
- $ref: '#/components/parameters/limit'
- $ref: '#/components/parameters/offset'
get:
summary: Get multiple users
description: >-
Returns the user records for all users in all workspaces and
organizations accessible to the authenticated user. Accepts an optional
workspace ID parameter.
Results are sorted by user ID.
tags:
- Users
operationId: getUsers
responses:
200:
description: >-
Successfully retrieved the requested user records.
content:
application/json:
schema:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/UserCompact'
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: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
List result = client.users.getUsers(team, workspace)
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.users.getUsers({param: "value", param: "value", opt_pretty: true})
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.users.get_users({'param': 'value', 'param': 'value'},
opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
users->getUsers(array('param' => 'value', 'param'
=> 'value'), array('opt_pretty' => 'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.users.get_users(param: "value", param: "value", options:
{pretty: true})
/users/{user_gid}:
parameters:
- $ref: '#/components/parameters/user_path_gid'
- $ref: '#/components/parameters/pretty'
- $ref: '#/components/parameters/fields'
get:
summary: Get a user
description: >-
Returns the full user record for the single user with the provided ID.
tags:
- Users
operationId: getUser
responses:
200:
description: Returns the user specified.
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/UserResponse'
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: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
User result = client.users.getUser(userGid)
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.users.getUser(userGid, {param: "value", param: "value", opt_pretty:
true})
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.users.get_user(user_gid, {'param': 'value', 'param':
'value'}, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
users->getUser($user_gid, array('param' => 'value',
'param' => 'value'), array('opt_pretty' => 'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.users.get_user(user_gid: 'user_gid', param: "value",
param: "value", options: {pretty: true})
/users/{user_gid}/favorites:
parameters:
- $ref: '#/components/parameters/user_path_gid'
- $ref: '#/components/parameters/pretty'
- $ref: '#/components/parameters/fields'
- name: resource_type
in: query
required: true
description: >-
The resource type of favorites to be returned.
schema:
type: string
enum:
- portfolio
- project
- tag
- task
- user
- project_template
default: project
- name: workspace
in: query
required: true
description: >-
The workspace in which to get favorites.
schema:
type: string
example: '1234'
get:
summary: Get a user's favorites
description: >-
Returns all of a user's favorites in the given workspace, of the given type.
Results are given in order (The same order as Asana's sidebar).
tags:
- Users
operationId: getFavoritesForUser
responses:
200:
description: Returns the specified user's favorites.
content:
application/json:
schema:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/AsanaNamedResource'
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: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
List result = client.users.getFavoritesForUser(userGid,
workspace, resourceType)
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.users.getFavoritesForUser(userGid, {param: "value", param: "value",
opt_pretty: true})
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.users.get_favorites_for_user(user_gid, {'param': 'value',
'param': 'value'}, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
users->getFavoritesForUser($user_gid, array('param'
=> 'value', 'param' => 'value'), array('opt_pretty' => 'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.users.get_favorites_for_user(user_gid: 'user_gid', resource_type:
''resource_type_example'', workspace: ''workspace_example'',
param: "value", param: "value", options: {pretty: true})
/teams/{team_gid}/users:
parameters:
- $ref: '#/components/parameters/team_path_gid'
- $ref: '#/components/parameters/pretty'
- $ref: '#/components/parameters/fields'
- $ref: '#/components/parameters/offset'
get:
summary: Get users in a team
description: >-
Returns the compact records for all users that are members of the team.
Results are sorted alphabetically and limited to 2000. For more results
use the `/users` endpoint.
tags:
- Users
operationId: getUsersForTeam
responses:
200:
description: >-
Returns the user records for all the members of the team, including
guests and limited access users
content:
application/json:
schema:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/UserCompact'
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: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
List result = client.users.getUsersForTeam(teamGid)
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.users.getUsersForTeam(teamGid, {param: "value", param: "value",
opt_pretty: true})
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.users.get_users_for_team(team_gid, {'param': 'value',
'param': 'value'}, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
users->getUsersForTeam($team_gid, array('param' =>
'value', 'param' => 'value'), array('opt_pretty' => 'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.users.get_users_for_team(team_gid: 'team_gid', param:
"value", param: "value", options: {pretty: true})
/workspaces/{workspace_gid}/users:
parameters:
- $ref: '#/components/parameters/workspace_path_gid'
- $ref: '#/components/parameters/pretty'
- $ref: '#/components/parameters/fields'
- $ref: '#/components/parameters/offset'
get:
summary: >-
Get users in a workspace or organization
description: >-
Returns the compact records for all users in the specified workspace or
organization.
Results are sorted alphabetically and limited to 2000. For more results
use the `/users` endpoint.
tags:
- Users
operationId: getUsersForWorkspace
responses:
200:
description: Return the users in the specified workspace or org.
content:
application/json:
schema:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/UserCompact'
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: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
List result = client.users.getUsersForWorkspace(workspaceGid)
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.users.getUsersForWorkspace(workspaceGid, {param: "value", param:
"value", opt_pretty: true})
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.users.get_users_for_workspace(workspace_gid, {'param':
'value', 'param': 'value'}, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
users->getUsersForWorkspace($workspace_gid, array('param'
=> 'value', 'param' => 'value'), array('opt_pretty' => 'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.users.get_users_for_workspace(workspace_gid: 'workspace_gid',
param: "value", param: "value", options: {pretty: true})
/webhooks:
parameters:
- $ref: '#/components/parameters/pretty'
- $ref: '#/components/parameters/fields'
get:
summary: >-
Get multiple webhooks
description: >-
Get the compact representation of all webhooks your app has registered
for the authenticated user in the given workspace.
tags:
- Webhooks
operationId: getWebhooks
parameters:
- $ref: '#/components/parameters/limit'
- $ref: '#/components/parameters/offset'
- name: workspace
in: query
required: true
description: >-
The workspace to query for webhooks in.
schema:
type: string
example: '1331'
- name: resource
in: query
description: Only return webhooks for the given resource.
schema:
type: string
example: '51648'
responses:
200:
description: Successfully retrieved the requested webhooks.
content:
application/json:
schema:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/WebhookResponse'
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: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
List result = client.webhooks.getWebhooks(resource, workspace)
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.webhooks.getWebhooks({param: "value", param: "value", opt_pretty:
true})
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.webhooks.get_webhooks({'param': 'value', 'param': 'value'},
opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
webhooks->getWebhooks(array('param' => 'value', 'param'
=> 'value'), array('opt_pretty' => 'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.webhooks.get_webhooks(workspace: ''workspace_example'',
param: "value", param: "value", options: {pretty: true})
post:
summary: >-
Establish a webhook
description: |-
Establishing a webhook is a two-part process. First, a simple HTTP POST
request initiates the creation similar to creating any other resource.
Next, in the middle of this request comes the confirmation handshake.
When a webhook is created, we will send a test POST to the target with an
`X-Hook-Secret` header. The target must respond with a `200 OK` or `204
No Content` and a matching `X-Hook-Secret` header to confirm that this
webhook subscription is indeed expected. We strongly recommend storing
this secret to be used to verify future webhook event signatures.
The POST request to create the webhook will then return with the status
of the request. If you do not acknowledge the webhook’s confirmation
handshake it will fail to setup, and you will receive an error in
response to your attempt to create it. This means you need to be able to
receive and complete the webhook *while* the POST request is in-flight
(in other words, have a server that can handle requests asynchronously).
Invalid hostnames like localhost will recieve a 403 Forbidden status code.
```
# Request
curl -H "Authorization: Bearer " \
-X POST https://app.asana.com/api/1.0/webhooks \
-d "resource=8675309" \
-d "target=https://example.com/receive-webhook/7654"
```
```
# Handshake sent to https://example.com/
POST /receive-webhook/7654
X-Hook-Secret: b537207f20cbfa02357cf448134da559e8bd39d61597dcd5631b8012eae53e81
```
```
# Handshake response sent by example.com
HTTP/1.1 200
X-Hook-Secret: b537207f20cbfa02357cf448134da559e8bd39d61597dcd5631b8012eae53e81
```
```
# Response
HTTP/1.1 201
{
"data": {
"gid": "43214",
"resource": {
"gid": "8675309",
"name": "Bugs"
},
"target": "https://example.com/receive-webhook/7654",
"active": false,
"last_success_at": null,
"last_failure_at": null,
"last_failure_content": null
}
}
```
tags:
- Webhooks
operationId: createWebhook
requestBody:
description: The webhook workspace and target.
required: true
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/WebhookRequest'
responses:
201:
description: Successfully created the requested webhook.
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/WebhookResponse'
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: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
Webhook result = client.webhooks.createWebhook()
.data("field", "value")
.data("field", "value")
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.webhooks.createWebhook({field: "value", field: "value", pretty:
true})
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.webhooks.create_webhook({'field': 'value', 'field':
'value'}, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
webhooks->createWebhook(array('field' => 'value',
'field' => 'value'), array('opt_pretty' => 'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.webhooks.create_webhook(field: "value", field: "value",
options: {pretty: true})
/webhooks/{webhook_gid}:
parameters:
- $ref: '#/components/parameters/webhook_path_gid'
- $ref: '#/components/parameters/pretty'
- $ref: '#/components/parameters/fields'
get:
summary: >-
Get a webhook
description: >-
Returns the full record for the given webhook.
tags:
- Webhooks
operationId: getWebhook
responses:
200:
description: Successfully retrieved the requested webhook.
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/WebhookResponse'
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: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
Webhook result = client.webhooks.getWebhook(webhookGid)
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.webhooks.getWebhook(webhookGid, {param: "value", param: "value",
opt_pretty: true})
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.webhooks.get_webhook(webhook_gid, {'param': 'value',
'param': 'value'}, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
webhooks->getWebhook($webhook_gid, array('param'
=> 'value', 'param' => 'value'), array('opt_pretty' => 'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.webhooks.get_webhook(webhook_gid: 'webhook_gid', param:
"value", param: "value", options: {pretty: true})
put:
summary: >-
Update a webhook
description: >-
An existing webhook's filters can be updated by making a PUT request on the
URL for that webhook. Note that the webhook's previous `filters` array will
be completely overwritten by the `filters` sent in the PUT request.
tags:
- Webhooks
operationId: updateWebhook
requestBody:
description: The updated filters for the webhook.
required: true
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/WebhookUpdateRequest'
responses:
200:
description: Successfully updated the webhook.
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/WebhookResponse'
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: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
Webhook result = client.webhooks.updateWebhook(webhookGid)
.data("field", "value")
.data("field", "value")
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.webhooks.updateWebhook(webhookGid, {field: "value", field: "value",
pretty: true})
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.webhooks.update_webhook(webhook_gid, {'field': 'value',
'field': 'value'}, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
webhooks->updateWebhook($webhook_gid, array('field'
=> 'value', 'field' => 'value'), array('opt_pretty' => 'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.webhooks.update_webhook(webhook_gid: 'webhook_gid',
field: "value", field: "value", options: {pretty: true})
delete:
summary: Delete a webhook
description: >-
This method *permanently* removes a webhook. Note that it may be possible
to receive a request that was already in flight after deleting the
webhook, but no further requests will be issued.
tags:
- Webhooks
operationId: deleteWebhook
responses:
200:
description: Successfully retrieved the requested webhook.
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/EmptyResponse'
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: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
JsonElement result = client.webhooks.deleteWebhook(webhookGid)
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.webhooks.deleteWebhook(webhookGid)
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.webhooks.delete_webhook(webhook_gid, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
webhooks->deleteWebhook($webhook_gid, array('opt_pretty'
=> 'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.webhooks.delete_webhook(webhook_gid: 'webhook_gid',
options: {pretty: true})
/workspace_memberships/{workspace_membership_gid}:
parameters:
- $ref: '#/components/parameters/workspace_membership_path_gid'
- $ref: '#/components/parameters/pretty'
- $ref: '#/components/parameters/fields'
get:
summary: Get a workspace membership
description: >-
Returns the complete workspace record for a single workspace membership.
tags:
- Workspace memberships
operationId: getWorkspaceMembership
responses:
200:
description: >-
Successfully retrieved the requested workspace membership.
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/WorkspaceMembershipResponse'
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: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
JsonElement result = client.workspacememberships.getWorkspaceMembership(workspaceMembershipGid)
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.workspacememberships.getWorkspaceMembership(workspaceMembershipGid,
{param: "value", param: "value", opt_pretty: true})
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.workspace_memberships.get_workspace_membership(workspace_membership_gid,
{'param': 'value', 'param': 'value'}, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
workspacememberships->getWorkspaceMembership($workspace_membership_gid,
array('param' => 'value', 'param' => 'value'), array('opt_pretty' =>
'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.workspace_memberships.get_workspace_membership(workspace_membership_gid:
'workspace_membership_gid', param: "value", param: "value", options:
{pretty: true})
/users/{user_gid}/workspace_memberships:
parameters:
- $ref: '#/components/parameters/user_path_gid'
- $ref: '#/components/parameters/pretty'
- $ref: '#/components/parameters/fields'
- $ref: '#/components/parameters/limit'
- $ref: '#/components/parameters/offset'
get:
summary: Get workspace memberships for a user
description: >-
Returns the compact workspace membership records for the user.
tags:
- Workspace memberships
operationId: getWorkspaceMembershipsForUser
responses:
200:
description: >-
Successfully retrieved the requested user's workspace memberships.
content:
application/json:
schema:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/WorkspaceMembershipCompact'
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: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
List result = client.workspacememberships.getWorkspaceMembershipsForUser(userGid)
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.workspacememberships.getWorkspaceMembershipsForUser(userGid,
{param: "value", param: "value", opt_pretty: true})
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.workspace_memberships.get_workspace_memberships_for_user(user_gid,
{'param': 'value', 'param': 'value'}, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
workspacememberships->getWorkspaceMembershipsForUser($user_gid,
array('param' => 'value', 'param' => 'value'), array('opt_pretty' =>
'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.workspace_memberships.get_workspace_memberships_for_user(user_gid:
'user_gid', param: "value", param: "value", options: {pretty: true})
/workspaces/{workspace_gid}/workspace_memberships:
parameters:
- $ref: '#/components/parameters/workspace_path_gid'
- $ref: '#/components/parameters/user_query_param'
- $ref: '#/components/parameters/pretty'
- $ref: '#/components/parameters/fields'
- $ref: '#/components/parameters/limit'
- $ref: '#/components/parameters/offset'
get:
summary: Get the workspace memberships for a workspace
description: >-
Returns the compact workspace membership records for the workspace.
tags:
- Workspace memberships
operationId: getWorkspaceMembershipsForWorkspace
responses:
200:
description: >-
Successfully retrieved the requested workspace's memberships.
content:
application/json:
schema:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/WorkspaceMembershipCompact'
x-readme:
code-samples:
- language: java
install: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
List result = client.workspacememberships.getWorkspaceMembershipsForWorkspace(workspaceGid,
user)
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.workspacememberships.getWorkspaceMembershipsForWorkspace(workspaceGid,
{param: "value", param: "value", opt_pretty: true})
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.workspace_memberships.get_workspace_memberships_for_workspace(workspace_gid,
{'param': 'value', 'param': 'value'}, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
workspacememberships->getWorkspaceMembershipsForWorkspace($workspace_gid,
array('param' => 'value', 'param' => 'value'), array('opt_pretty' =>
'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.workspace_memberships.get_workspace_memberships_for_workspace(workspace_gid:
'workspace_gid', param: "value", param: "value", options: {pretty: true})
/workspaces:
parameters:
- $ref: '#/components/parameters/pretty'
- $ref: '#/components/parameters/fields'
- $ref: '#/components/parameters/limit'
- $ref: '#/components/parameters/offset'
get:
summary: Get multiple workspaces
description: >-
Returns the compact records for all workspaces visible to the
authorized user.
tags:
- Workspaces
operationId: getWorkspaces
responses:
200:
description: Return all workspaces visible to the authorized user.
content:
application/json:
schema:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/WorkspaceCompact'
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: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
List result = client.workspaces.getWorkspaces()
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.workspaces.getWorkspaces({param: "value", param: "value", opt_pretty:
true})
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.workspaces.get_workspaces({'param': 'value', 'param':
'value'}, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
workspaces->getWorkspaces(array('param' => 'value',
'param' => 'value'), array('opt_pretty' => 'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.workspaces.get_workspaces(param: "value", param: "value",
options: {pretty: true})
/workspaces/{workspace_gid}:
parameters:
- $ref: '#/components/parameters/workspace_path_gid'
- $ref: '#/components/parameters/pretty'
- $ref: '#/components/parameters/fields'
get:
summary: Get a workspace
description: >-
Returns the full workspace record for a single workspace.
tags:
- Workspaces
operationId: getWorkspace
responses:
200:
description: Return the full workspace record.
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/WorkspaceResponse'
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: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
Workspace result = client.workspaces.getWorkspace(workspaceGid)
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.workspaces.getWorkspace(workspaceGid, {param: "value", param:
"value", opt_pretty: true})
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.workspaces.get_workspace(workspace_gid, {'param': 'value',
'param': 'value'}, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
workspaces->getWorkspace($workspace_gid, array('param'
=> 'value', 'param' => 'value'), array('opt_pretty' => 'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.workspaces.get_workspace(workspace_gid: 'workspace_gid',
param: "value", param: "value", options: {pretty: true})
put:
summary: Update a workspace
description: >-
A specific, existing workspace can be updated by making a PUT request
on the URL for that workspace. Only the fields provided in the data
block will be updated; any unspecified fields will remain unchanged.
Currently the only field that can be modified for a workspace is its
name.
Returns the complete, updated workspace record.
tags:
- Workspaces
operationId: updateWorkspace
requestBody:
description: The workspace object with all updated properties.
required: true
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/WorkspaceRequest'
responses:
200:
description: Update for the workspace was successful.
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/WorkspaceResponse'
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: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
Workspace result = client.workspaces.updateWorkspace(workspaceGid)
.data("field", "value")
.data("field", "value")
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.workspaces.updateWorkspace(workspaceGid, {field: "value", field:
"value", pretty: true})
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.workspaces.update_workspace(workspace_gid, {'field':
'value', 'field': 'value'}, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
workspaces->updateWorkspace($workspace_gid, array('field'
=> 'value', 'field' => 'value'), array('opt_pretty' => 'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.workspaces.update_workspace(workspace_gid: 'workspace_gid',
field: "value", field: "value", options: {pretty: true})
/workspaces/{workspace_gid}/addUser:
parameters:
- $ref: '#/components/parameters/workspace_path_gid'
- $ref: '#/components/parameters/pretty'
- $ref: '#/components/parameters/fields'
post:
summary: Add a user to a workspace or organization
description: >-
Add a user to a workspace or organization.
The user can be referenced by their globally unique user ID or their
email address. Returns the full user record for the invited user.
tags:
- Workspaces
operationId: addUserForWorkspace
requestBody:
description: The user to add to the workspace.
required: true
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/WorkspaceAddUserRequest'
responses:
200:
description: >-
The user was added successfully to the workspace or organization.
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/UserBaseResponse'
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: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
JsonElement result = client.workspaces.addUserForWorkspace(workspaceGid)
.data("field", "value")
.data("field", "value")
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.workspaces.addUserForWorkspace(workspaceGid, {field: "value",
field: "value", pretty: true})
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.workspaces.add_user_for_workspace(workspace_gid, {'field':
'value', 'field': 'value'}, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
workspaces->addUserForWorkspace($workspace_gid, array('field'
=> 'value', 'field' => 'value'), array('opt_pretty' => 'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.workspaces.add_user_for_workspace(workspace_gid: 'workspace_gid',
field: "value", field: "value", options: {pretty: true})
/workspaces/{workspace_gid}/removeUser:
parameters:
- $ref: '#/components/parameters/workspace_path_gid'
- $ref: '#/components/parameters/pretty'
- $ref: '#/components/parameters/fields'
post:
summary: Remove a user from a workspace or organization
description: >-
Remove a user from a workspace or organization.
The user making this call must be an admin in the workspace. The user can
be referenced by their globally unique user ID or their email address.
Returns an empty data record.
tags:
- Workspaces
operationId: removeUserForWorkspace
requestBody:
description: The user to remove from the workspace.
required: true
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/WorkspaceRemoveUserRequest'
responses:
204:
description: >-
The user was removed successfully to the workspace or organization.
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/EmptyResponse'
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: >-
com.asanaasana1.0.0
code: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
JsonElement result = client.workspaces.removeUserForWorkspace(workspaceGid)
.data("field", "value")
.data("field", "value")
.option("pretty", true)
.execute();
- language: node
install: npm install asana
code: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.workspaces.removeUserForWorkspace(workspaceGid, {field: "value",
field: "value", pretty: true})
.then((result) => {
console.log(result);
});
- language: python
install: pip install asana
code: >-
import asana
client = asana.Client.access_token('PERSONAL_ACCESS_TOKEN')
result = client.workspaces.remove_user_for_workspace(workspace_gid,
{'field': 'value', 'field': 'value'}, opt_pretty=True)
- language: php
install: composer require asana/asana
code: >-
workspaces->removeUserForWorkspace($workspace_gid,
array('field' => 'value', 'field' => 'value'), array('opt_pretty' =>
'true'))
- language: ruby
install: gem install asana
code: >-
require 'asana'
client = Asana::Client.new do |c|
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
end
result = client.workspaces.remove_user_for_workspace(workspace_gid:
'workspace_gid', field: "value", field: "value", options: {pretty: true})