Use Case / Requirements:
Automatically export all Assets data (including all object types and objects) to an S3 bucket (or any external storage).
This should be a scheduled job that runs daily.
What I’ve tried so far:
I came across this community post: https://community.atlassian.com/forums/Jira-Service-Management/Automation-of-Object-schema-export/qaq-p/750997 which mentions an API call & script that can be used for exporting the object schema:
POST https://example.com/rest/assets/1.0/objectschemaexport/export/server
With the following params:
Response:
The problem is — I'm not sure where this ZIP file is getting stored (if anywhere), or whether this approach is officially supported/reliable.
Looking for help:
Has anyone implemented a working solution for scheduled exports of Assets data?
Is there a better/supported way to export object schema data on a schedule and push it to S3 (or any external storage)?
Any ideas or tips around automating this process would be super helpful.
Thanks in advance!
I haven't implemented a fully working solution yet, but you can automate daily exports of Assets data by using the internal export API, downloading the ZIP, and uploading it to S3. Although not officially documented or supported (afaik), some teams use this sort of solution in their production environments.
POST /rest/assets/1.0/objectschemaexport/export/server
GET /rest/assets/1.0/objectschemaexport/export/server/{resourceId}/download
aws s3 cp object_schema.zip s3://your-bucket-name/path/
import boto3
s3 = boto3.client('s3')
s3.upload_file('object_schema.zip', 'your-bucket-name', 'path/object_schema.zip')
I hope this information is helpful.
You might also consider posting such questions in the Atlassian Developer Community for more targeted responses.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.