Exports are a way to download data from Asana. The following types of exports are available:
- Graph exports: Export of data about objects starting from a parent object, such as a team, portfolio, or project.
- Organization exports: Exports the complete data of an organization in JSON format. Please refer to Organization exports for more details.
- Resource exports: Bulk exports of resources such as tasks, teams, and messages for a workspace.
Graph exports
Availability
Graph exports are currently available to users in an Enterprise/Enterprise+ organization.
A graph_export
object represents a request to export the
data about objects starting from a parent object. Parent object can be a team, portfolio, or project.
To create an export using this API:
- Create a
graph_export
request and store the ID that is returned. - Request the jobs endpoint every few minutes, until
status
field contains 'succeeded'. - 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 portfolios.
File format
The result of the export will provide a presigned S3 URL that expires in 1 hour. With this URL, a user can download the file. The file is gzipped and in JSONL format. Each line in the file represents a different object in JSON format. Each object has a resource_type
. The resource types that can be presented in the file are:
resource_type | Description |
---|---|
portfolio | Portfolio data |
project | Project data |
task | Task data |
section | Section of project data |
portfolio_to_portfolio | Relation between portfolios |
project_to_portfolio | Relation between project and portfolio |
allocation | Allocation for a project |
time_tracking_entry | Record of the actual time spent on the task |
➡️ For a definitive list of properties exposed per resource_type
, please review this documentation.
Below is the schema of the graph export object itself.
GraphExport
Property | Type | Description |
---|---|---|
gid | string | Globally unique identifier of the resource, as a string. |
resource_type | string | The base type of this resource. |
resource_subtype | string | A graph_export object represents a request to export the data starting from a parent object |
status | string | The current status of this job. Click to show all enum values
|
new_graph_export | object | A graph_export object represents a request to export the data starting from a parent object |
new_graph_export.gid | string | Globally unique identifier of the resource, as a string. |
new_graph_export.resource_type | string | The base type of this resource. |
new_graph_export.created_at | string (date-time) | The time at which this resource was created. |
new_graph_export.download_url | string (uri) | Download this URL to retrieve the full export 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. |
new_graph_export.completed_at | string (date-time) | The time at which this resource was completed. |
Example JSON for GraphExport
:
{
"gid": "12345",
"resource_type": "job",
"resource_subtype": "graph_export_request",
"status": "succeeded",
"new_graph_export": {
"gid": "12345",
"resource_type": "graph_export",
"created_at": "2012-02-22T02:06:58.147Z",
"download_url": "https://asana-export-us-east-1.s3.us-east-1.amazonaws.com/2563645399633793/domain_export/7588024658887731/download/ domain_export_2563645399633793_7588024658887731_2023018-201726.json.gz?X-Amz-Algorithm=AWS4-HMAC-SHA256& X-Amz-Content-Sha256=xxxxxxxx&X-Amz-Date=xxxxxxxx&X-Amz-Expires=300&X-Amz-Security-Token=xxxxxxxx& X-Amz-Signature=xxxxxxxx&X-Amz-SignedHeaders=host&x-id=GetObject#_=_",
"completed_at": "2012-02-22T03:06:58.147Z"
}
}
ResourceExport
Property | Type | Description |
---|---|---|
gid | string | Globally unique identifier of the resource, as a string. |
resource_type | string | The base type of this resource. |
resource_subtype | string | A resource_export object represents a request to bulk export objects for one or more resources. |
status | string | The current status of this job. Click to show all enum values
|
new_resource_export | object | A resource_export object represents a request to bulk export objects for one or more resources. |
new_resource_export.gid | string | Globally unique identifier of the resource, as a string. |
new_resource_export.resource_type | string | The base type of this resource. |
new_resource_export.created_at | string (date-time) | The time at which the resource export object was created. |
new_resource_export.download_url | string (uri) | Download this URL to retrieve the full export in JSON Lines format. It will be compressed in a gzip (.gz) container. Note: May be null if the export is still in progress or failed. |
new_resource_export.completed_at | string (date-time) | The time at which this resource was completed. This will be null if the export is still in progress. |
Example JSON for ResourceExport
:
{
"gid": "12345",
"resource_type": "job",
"resource_subtype": "export_request",
"status": "succeeded",
"new_resource_export": {
"gid": "12345",
"resource_type": "export_request",
"created_at": "2012-02-22T02:06:58.147Z",
"download_url": "https://asana-export-us-east-1.s3.us-east-1.amazonaws.com/2563645399633793/object_export/7588024658887731/download/ object_export_2563645399633793_7588024658887731_2023018-201726.jsonl.gz?X-Amz-Algorithm=AWS4-HMAC-SHA256& X-Amz-Credential=xxxxxxxx&X-Amz-Date=xxxxxxxx&X-Amz-Expires=300&X-Amz-Security-Token=xxxxxxxx& X-Amz-Signature=xxxxxxxx&X-Amz-SignedHeaders=host",
"completed_at": "2012-02-22T03:06:58.147Z"
}
}