Cleanest way of getting new SNAPSHOT reference after running snapsync via database/${reference}/sync

  • 0
  • 1
  • Question
  • Updated 4 years ago
  • Answered
  • (Edited)

I kicked off a sync job in order to generate a new Snapshot. The API call for database/reference/sync returns an object containing a Job reference. When I query the Job based on this parameter, the Job object returned does not contain any references to the new snapshot. I also checked the associated Action, but did not see a snapshot reference there either.

I'm not looking for code, but just a high level overview of which endpoints I would need to look at in order to get the information.

I could spend some time snooping around the network activity generated by Delphix's UI, but I figured it would be easier to just ask the community.

In summary, I want to:

  • Kick off snapsync
  • Get the snapshot reference of the newly generated snapshot

Thanks for advice.

EDIT: I forgot to mention that I was referring to the Job object when the percentComplete attribute was equal to 100.
Photo of Avindra Goolcharan

Avindra Goolcharan

  • 424 Points 250 badge 2x thumb

Posted 4 years ago

  • 0
  • 1
Photo of Eyal Kaspi

Eyal Kaspi, Employee

  • 1,280 Points 1k badge 2x thumb
Official Response

Unfortunately, the Delphix Engine API does not let you directly retrieve the snapshot that has been created by a job. There are a few ways to find the newly created snapshot. The simplest solution is to use the snapshot API and, after the sync job has completed, find the most recent snapshot. In the CLI:
snapshot> list database=<db-name> pageSize=1
or directly with the API:
GET /resources/json/delphix/snapshot?database=<container-reference>&pageSize=1