Asana: Initiate a resource export
Asana exports.createResourceExport: arguments, response, policy and SDK examples.
← Exports operations · Get started
Operation asana.createresourceexport
Provider route: POST /exports/resource. Alter supplies the connection’s credentials and routing.
Call through Alter
Section titled “Call through Alter”Install @alter-ai/sdk @alter-ai/asana with npm, or alter-sdk-asana with pip. Supply your connected customer’s grant ID and the arguments described below.
import { App } from "@alter-ai/sdk";import { AsanaIntegration } from "@alter-ai/asana";
async function execute(input: Parameters<AsanaIntegration["exports"]["createResourceExport"]>[0]) { const app = new App({ apiKey: process.env.ALTER_API_KEY! }); try { const provider = new AsanaIntegration(app, { grantId: process.env.PROVIDER_GRANT_ID! }); const call = await provider.exports.createResourceExport(input); const result = await call.wait(); return result.bodyJson(); } finally { await app.close(); }}import osfrom alter_sdk import Appfrom alter_sdk_asana import AsanaIntegration
async def execute(arguments): async with App(api_key=os.environ["ALTER_API_KEY"]) as app: provider = AsanaIntegration(app, {"grant_id": os.environ["PROVIDER_GRANT_ID"]}) call = await provider.exports.create_resource_export(arguments) result = await call.wait() return result.body_json()| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Additional keys: not allowed |
body | object | Required within parent | |
body.data | Model | Optional | Expand Initiate a resource export — request body — body data |
Referenced models: Initiate a resource export — request body — body data
Response
Section titled “Response”Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | JSON | Root | |
$ (allOf 1) | object | All variants apply | |
$ (allOf 1).data | Model | Optional | Expand Initiate a resource export — response body — data data — Resource Export Response |
$ (allOf 2) | Model | All variants apply | Expand Initiate a resource export — response body — data |
Referenced models: Initiate a resource export — response body — data data — Resource Export Response, Initiate a resource export — response body — data
Schemas
Section titled “Schemas”Initiate a resource export — response body — data data — Resource Export Response
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | A generic Asana Resource, containing a globally unique identifier. |
gid | string | Optional | Globally unique identifier of the resource, as a string. Read only: true |
resource_type | string | Optional | The base type of this resource. Read only: true |
resource_subtype | string | Optional | A *resource_export* object represents a request to bulk export objects for one or more resources. Read only: true |
status | string | Optional | The current status of this job. Known values: not_started, in_progress, succeeded, failed Read only: true |
new_resource_export | Model | Optional | Expand Get a job by id — response body — data data new resource export — Resource Export Compact |
Referenced models: Get a job by id — response body — data data new resource export — Resource Export Compact
Initiate a resource export — response body — data
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
data | Model | Required within parent | Expand Initiate a resource export — response body — data data — sdk__Resource Export Response |
Referenced models: Initiate a resource export — response body — data data — sdk__Resource Export Response
Initiate a resource export — request body — body data
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | A *resource_export* request starts a job to bulk export objects for one or more resources. |
workspace | string | Optional | Gid of a workspace. |
export_request_parameters | array | Optional | An object containing the parameters for the export request. The keys of this object are the GIDs of the resources to be exported. The values are objects with additional parameters for each resource. |
export_request_parameters[] | Model | Each item | Expand Initiate a resource export — request body — body data export request parameters item |
Referenced models: Initiate a resource export — request body — body data export request parameters item
Get a job by id — response body — data data new resource export — Resource Export Compact
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | A *resource_export* object represents a request to bulk export objects for one or more resources. |
gid | string | Optional | Globally unique identifier of the resource, as a string. Read only: true |
resource_type | string | Optional | The base type of this resource. Read only: true |
created_at | string | Optional | The time at which the resource export object was created. Format: date-time Read only: true |
download_url | JSON | Optional | |
download_url (anyOf 1) | string | Alternative | Download this URL to retrieve the full export in [JSON Lines](https://jsonlines.org/) format. It will be compressed in a gzip (.gz) container. *Note: May be null if the export is still in progress or failed.* Format: uri Read only: true |
download_url (anyOf 2) | null | Alternative | |
completed_at | string | Optional | The time at which this resource was completed. This will be null if the export is still in progress. Format: date-time Read only: true |
Initiate a resource export — response body — data data — sdk__Resource Export Response
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | A generic Asana Resource, containing a globally unique identifier. |
gid | string | Optional | Globally unique identifier of the resource, as a string. Read only: true |
resource_type | string | Optional | The base type of this resource. Read only: true |
resource_subtype | string | Optional | A *resource_export* object represents a request to bulk export objects for one or more resources. Read only: true |
status | string | Optional | The current status of this job. Known values: not_started, in_progress, succeeded, failed Read only: true |
new_resource_export | Model | Optional | Expand Get a job by id — response body — data data new resource export — shared_new-resource-export_3a6d78247490 |
Referenced models: Get a job by id — response body — data data new resource export — shared_new-resource-export_3a6d78247490
Initiate a resource export — request body — body data export request parameters item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
resource_type | string | Optional | The type of the resource to be exported. This can be a task, team, or message. |
filters | Model | Optional | Expand Initiate a resource export — request body — body data export request parameters item filters |
fields | array | Optional | An array of fields to include for the resource type. If not provided, all non-optional fields for the resource type will be included. This conforms to the fields optional parameter available for all Asana endpoints which is documented [here](https://developers.asana.com/docs/inputoutput-options) |
fields[] | string | Each item |
Referenced models: Initiate a resource export — request body — body data export request parameters item filters
Get a job by id — response body — data data new resource export — shared_new-resource-export_3a6d78247490
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | A generic Asana Resource, containing a globally unique identifier.A generic Asana Resource, containing a globally unique identifier. A *resource_export* object represents a request to bulk export objects for one or more resources. |
gid | string | Optional | Globally unique identifier of the resource, as a string. Read only: true |
resource_type | string | Optional | The base type of this resource. Read only: true |
created_at | string | Optional | The time at which the resource export object was created. Format: date-time Read only: true |
download_url | JSON | Optional | |
download_url (anyOf 1) | string | Alternative | Download this URL to retrieve the full export in [JSON Lines](https://jsonlines.org/) format. It will be compressed in a gzip (.gz) container. *Note: May be null if the export is still in progress or failed.* Format: uri Read only: true |
download_url (anyOf 2) | null | Alternative | |
completed_at | string | Optional | The time at which this resource was completed. This will be null if the export is still in progress. Format: date-time Read only: true |
Initiate a resource export — request body — body data export request parameters item filters
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Filters to apply to a resource that will be exported. These filters can be used to narrow down the resources that are included in the export. |
assigned_by.any | array | Optional | Filter by the users who assigned the resource. This array accepts a list of user GIDs. This is only applicable to tasks. |
assigned_by.any[] | string | Each item | |
assignee.any | array | Optional | Filter by the users who are assigned to the resource. This array accepts a list of user GIDs. This is only applicable to tasks. |
assignee.any[] | string | Each item | |
commented_on_by.any | array | Optional | Filter by the users who commented on the resource. This array accepts a list of user GIDs. |
commented_on_by.any[] | string | Each item | |
created_at.after | string | Optional | Filter results to resources created after a specified date and time. Format: date-time |
created_at.before | string | Optional | Filter results to resources created before a specified date and time. Format: date-time |
created_by.any | array | Optional | Filter by the users who created the resource. This array accepts a list of user GIDs. |
created_by.any[] | string | Each item | |
followers.any | array | Optional | Filter by the users who are following the resource. This array accepts a list of user GIDs. |
followers.any[] | string | Each item | |
liked_by.any | array | Optional | Filter by the users who liked the resource. This array accepts a list of user GIDs. |
liked_by.any[] | string | Each item | |
modified_at.after | string | Optional | Filter results to resources modified after a specified date and time. Format: date-time |
modified_at.before | string | Optional | Filter results to resources modified before a specified date and time. Format: date-time |
Policy, approvals and errors
Section titled “Policy, approvals and errors”SDK function policy ID: asana.createresourceexport. Catalog operation: asana:createResourceExport. Rules can name either ID; function rules distinguish managed calls and conservatively cover raw calls sharing the route. Existing grant permissions and policy rules apply. wait() returns an immediate result or waits for a required approval; it never approves the request itself. Persist the approval ID to resume after a restart.
Provider errors retain their response; JSON decoding raises ProviderAPIError for provider failures. ManagedOperationError identifies contract/input/retention errors. See error handling and provider-specific behavior. Sensitive input may be refused before approval storage. A decoding error never resubmits a write.