Tags: Demonstration, External API
This task script demonstrates using the "http" action to retrieve external data, using a GET request. It also demonstrates saving the retrieved data to the Mechanic cache, where it can be used for future task runs.
- View in the task library: tasks.mechanic.dev/demonstration-fetch-an-external-configuration-file
- Task JSON, for direct import: task.json
- Preview task code: script.liquid
{
"save_data_to_cache__boolean": null
}
Learn about task options in Mechanic
mechanic/user/trigger
mechanic/actions/perform
Learn about event subscriptions in Mechanic
This task script demonstrates using the "http" action to retrieve external data, using a GET request. It also demonstrates saving the retrieved data to the Mechanic cache, where it can be used for future task runs.
Learn more about this technique: Can I load data from external sources?
Find this task in the library at tasks.mechanic.dev, and use the "Try this task" button. Or, import this task's JSON export – see Importing and exporting tasks to learn how imports work.
Found a bug? Got an improvement to add? Start here: ../../CONTRIBUTING.md.
Submit your task requests for consideration by the Mechanic community, and they may be chosen for development and inclusion in the task library!