_ ____ _ / \ ___ __ _ _ __ __ _ | _ \ __ _| |_ __ _ / _ \ / __|/ _` | '_ \ / _` | | | | |/ _` | __/ _` | / ___ \\__ \ (_| | | | | (_| | | |_| | (_| | || (_| | /_/ \_\___/\__,_|_| |_|\__,_| |____/ \__,_|\__\__,_| _____ _ | ____|_ ___ __ ___ _ __| |_ ___ _ __ | _| \ \/ / '_ \ / _ \| '__| __/ _ \ '__| | |___ > <| |_) | (_) | | | || __/ | |_____/_/\_\ .__/ \___/|_| \__\___|_| |_|
A free (LGPL2.1) data export library for use with Asana.
This package provides an exporter client to implement API calls to receive data from Asana.
- PHP 8
- zip extension
- sqlite3 extension
- curl extension
- CURL
- Install libraries
composer install
- Setup Authentication
Provide your personal access token (PAT) using one of these options:
- Save your personal access token to the first line in a new file here: config/.asana_token .
- Use the optional parameter when running the commandline: --token
- Provide your PAT when prompted when executing the commandline
See Personal access token (PAT) for more details on how to generate your token.
- Add the ConfigProvider class to the config aggregator (typically found in config/config.php)
$aggregator = new ConfigAggregator([ ... \Criterion9\AsanaDataExporter\ConfigProvider::class, ...
- Then use the client in your handlers/middleware as needed for your use cases.
There should be no additional steps beyond adding to your project's composer.json required to begin using the library.
There should be no additional steps beyond adding to your project's composer.json required to begin using the library.
Config keys typically used in a config/autoload/*.local.php file to provide application specific configuration:
- asanadataexporter
- output
- createifnotexist: whether to attempt to create the output directories
- include_subtasks: whether to include subtasks or stop with the top level tasks (cards on a board)
- include_attachments: whether to download attachments
- include_statusupdates: whether to include project status updates
- include_json: whether to output json files
- include_csv: whether to output csv files
- defaultlocation: the location to use as a working space for local cache and outputs
- compress: whether to compress the output
- cleanaftercompress: whether to remove temporary working files after export completes
- adapter: which export adaptor to use (experimental)
- useLocalSession: whether to use a local cache of fetched task data (particularly helpful when attempting to restarting a failed export without fetching all content that had previously been retrieved)
- token: your PAT
- output
See Personal access token (PAT) for more details on how to generate your token.
This package is built to support mezzio and laminas as well as be available as a stand alone library including a command line option.
Run the console application
bin/console asanadataexporter:export
Arguments & Parameters
- <token>
- Your Asana Personal Access Token (PAT)
- <output>
- Folder to output the exported data
- --outputsubfolder
- Working directory to output exported data. Defaults to the current timestamp. Use this option to continue an export that failed to complete.
- --workspace
- The workspace to export, automatically selected if you only have access to 1 workspace.
- --team
- The team to export
- --project
- The project to export
- --include_subtasks
- Whether to export subtasks, default is true
- --include_attachments
- Whether to export attachments, default is true
- --include_projectstatus
- Whether to export project statuses, default is true
- --compress_output
- Whether to compress the output, default is true
- --keep_raw_output
- Whether to keep the raw output or remove all working files after compression, default is false
- --speed
- The speed (one of "slow", "normal", or "fast") to run the export requests, the default is "normal"