APIPythonOpen-Source Solutions

Expand all | Collapse all

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

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

    Posted 12-15-2014 01:37:00 PM
    Hi,

    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.


  • 2.  RE: Cleanest way of getting new SNAPSHOT reference after running snapsync via database/${reference}/sync
    Best Answer

    Posted 12-16-2014 07:38:00 AM
    Avindra,

    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  


  • 3.  RE: Cleanest way of getting new SNAPSHOT reference after running snapsync via database/${reference}/sync

    Posted 12-16-2014 05:13:00 PM
    Perfect. I can now see the snapshot created by querying with snapshot with the database parameter and setting the pageSize to 1.

    And there shouldn't be issues when multiple users are interfacing with Delphix because vdb operations are locked during SnapSync ( I think ).