Step 1 - Start Job
Send a POST request to start your job.
Endpoint: https://packagebuilder.herokuapp.com/api/package/
Payload:
{
"accessToken": "VALID_SALESFORCE_ACCESS_TOKEN",
"instanceUrl": "SALESFORCE_ORG_URL",
"componentOption": "all" // Should be "all", "unmanaged" or "none"
}
You will then receive an ID for the job. You use this ID to check the status of your job, and ultimately retrieve the results.
{
"id": "6210f461-0a4b-437d-be39-f885d6f3e543",
"success": true
}
Step 2 - Check Progress
The API runs asynchronously, as jobs can take some time to run depending on the size of your code base. You need to check the status of the job, and when complete you can get your results. Send a GET request to:
Endpoint: https://packagebuilder.herokuapp.com/api/package/status/PACKAGE_ID (eg. https://packagebuilder.herokuapp.com/api/package/status/6210f461-0a4b-437d-be39-f885d6f3e543)
Response:
{
"status": "Processing",
"done": false,
"success": false,
"error": null
}
The done and success variables will help you determine when your job is complete, and if it's successful.
Step 3 - Get Results
And finally, you can get your results. Send a GET request to:
Endpoint: https://packagebuilder.herokuapp.com/api/package/PACKAGE_ID (eg. https://packagebuilder.herokuapp.com/api/package/6210f461-0a4b-437d-be39-f885d6f3e543)
Response:
[
{
"id": "6210f461-0a4b-437,d-be39-f885d6f3e543",
"status" "Finished"
"componentOption": "all" // The selected option for the package
"xml": "...." // The full package XML
},
]