Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to export Assets data automatically (once a day)?

Abhijeet Sonawane
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 3, 2025

Use Case / Requirements:

  1. Automatically export all Assets data (including all object types and objects) to an S3 bucket (or any external storage).

  2. 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:

{
    "fileName": "object_schema.zip",
    "objectSchemaId": 1,
    "includeObjects": "true",
    "password": "12345",
    "objectSchemaName": "objectSchema",
    "totalObjectsInExport": "1"
}

Response:

{
    "resourceId": "6",
    "category": "exportobjectschema",
    "status": "START_PROGRESS",
    "currentWorkUnits": 0,
    "currentStepTotalWorkUnits": 0,
    "totalWorkUnits": 0,
    "resultData": {
        "exportFileName": "object_schema(2).zip",
        "objectSchemaId": 1,
        "objectSchemaName": "objectSchema",
        "includeObjects": true
    }
}



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!




1 answer

0 votes
Tuncay Senturk _Snapbytes_
Community Champion
July 5, 2025

Hi @Abhijeet Sonawane 

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.

  1. The API Export Endpoint you mentioned is correct
    POST /rest/assets/1.0/objectschemaexport/export/server

    This API starts the export but doesn't immediately provide the ZIP file. You'll need to poll for the export's completion. Once finished, you can download the file using a different endpoint.

  2. After the job is complete, the exported ZIP is stored temporarily on the server.
    Use the following endpoint to download the file
    GET /rest/assets/1.0/objectschemaexport/export/server/{resourceId}/download

    resourceId is the value returned in the POST response ("resourceId": "6" in your example).

  3. To upload to S3, you may use the AWS CLI
    aws s3 cp object_schema.zip s3://your-bucket-name/path/

    Alternatively, if you prefer using libraries, in Python you can use boto3 (https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/s3.html):

    something like the below
    import boto3
    s3 = boto3.client('s3')
    s3.upload_file('object_schema.zip', 'your-bucket-name', 'path/object_schema.zip')
  4. The final step is to set up a cron job to run this script daily.

 

I hope this information is helpful.

You might also consider posting such questions in the Atlassian Developer Community for more targeted responses.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events