How to use Object Copy API to export to a file? | Community
Skip to main content
New Participant
October 27, 2022
Question

How to use Object Copy API to export to a file?

  • October 27, 2022
  • 2 replies
  • 1021 views

Hello,

 

I've a question regarding Object Copy API 

I understand that with /exim/snapshots/copy I can copy objects from one sandbox to another. This works fine.

But how can I "dump" an object to a local JSON file? I tried with /exim/snapshots/export but I only get some "correlationId". How can I download my stuff (e.g. a Journey in JSON format) based on this "correlationId"?

 

Thank you!

 

 

 

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

2 replies

mdonkeAuthor
New Participant
May 2, 2023

Thank you @akshaaga 

 

I tried, but it doesn't work ...

 

Step 1: Export - OK

Step 2: check status (I'm using a different URL, not yours) OK

 

Step 3: download. FAIL. 404

Any idea what I miss here?

 

Thanks!

akshaaga
Employee
May 2, 2023

@mdonke ,

The "correlationId" you receive when making a request to the /exim/snapshots/export endpoint is a unique identifier for the export job that you initiated. This identifier can be used to check the status of the export job and download the exported data.

You can make a GET request to the /exim/snapshots/export/{correlationId} endpoint, where {correlationId} is the unique identifier for your export job.

If the export job has completed successfully, you can download the exported data by making a GET request to the /exim/snapshots/export/{correlationId}/download endpoint.

This will return the exported data in a JSON format that you can save to a local file.