Inquiry about Valid POST Body Values for REST Endpoint rest/insight/1.0/objectschemaexport/export/server

Hello Atlassian Community,

I am currently working with the Insight - Asset Management app in Jira and looking to automate the export of object schemas using the REST API. I am particularly interested in utilizing the rest/insight/1.0/objectschemaexport/export/server endpoint to export schemas to a server.

I have consulted the developer community topics, but I am still unclear about the valid values and structure for the POST body when calling this endpoint. Could someone provide me with a detailed example of a valid POST body for this API call, including any required fields and optional parameters that can be set?

My goal is to specify in the POST body that only certain columns be included in the export.

Thank you in advance for your assistance!

Best regards,

Hi @LszlKiss,

This endpoint isn’t part of the public REST API, which does mean that breaking changes could be made to it at a later date, so just beware of this.

However, to answer your question, this export does not support filtering of the object attributes to include in the export. The body of the API is:

  "fileName": ",
  "objectSchemaId": 123,
  "objectSchemaName": "example",
  "password": "optionalPasswordToEncryptZipWith",
  "includeObjects": true,
  "totalObjectsInExport": 1000,

For the totalObjectsInExport, you can set that to a value > 0.

However, depending on what your requirements is, if you are looking to just export the objects and not the schema info, there is an export by AQL endpoint which might be more suitable. For example:

/rest/insight-am/1/export?schema=1&criteriaType=AQL&attributes=Key,Object Type,Label

You can see how this endpoint works using the export feature in the ‘Assets’ → ‘Search for objects’ screen where it will include the columns that are visible on the search. But note that this is also not part of the public API.

Principal Engineer, JSM DC.