Example 6: Project Versioning Workflow
This workflow maintains and compares multiple versions of a project, supporting detailed change tracking.
Steps:
-
Create Project:
Use theexternal_reference_id
parameter in the Create Project API to link the magicplan project to your local system. -
Export Trigger:
-
Once the project appears in the user's app, they can open the magicplan app.
-
Upon completing the project, the user presses the Custom Export button, signaling that the project is ready for export.
-
-
Webhook Notification:
magicplan sends aPOST
request to yourwebhook_url
, including:-
The
listing
parameter, which identifies the local project linked to the magicplan project. -
File URLs (valid for 60 minutes).
-
Additional project metadata.
-
-
Version Comparison:
Compare the newly downloaded files with previously stored versions to track changes. -
Version Management:
Save the updated files with versioning metadata (e.g., version number, timestamp). -
Webhook Response:
-
Status
0
: Indicates success to magicplan. -
Other statuses: Prompts an error in the app, allowing users to retry.
-
Use Case Example
An architecture firm tracks iterative updates to floor plans and maintains a comprehensive version history.