JSON for Restore API?

  • 0
  • 1
  • Question
  • Updated 3 years ago
  • Answered
Need to understand the JSON structure for the API to restore a Jetstream container to a bookmark: POST /resources/json/delphix/jetstream/container/{ref}/restore
Photo of Jim Daniels

Jim Daniels

  • 150 Points 100 badge 2x thumb

Posted 3 years ago

  • 0
  • 1
Photo of Jatinder Luthra

Jatinder Luthra, Employee

  • 3,058 Points 3k badge 2x thumb
Official Response
Hello Jim,
You can restore container using any of three options:

1. Using bookmark
2. Latest point in time
3. At specific time

Using bookmark:

POST /resources/json/delphix/jetstream/container//restore
{
"type": "JSTimelinePointBookmarkInput",
"bookmark": ""
};

Using LatestPoint:

POST /resources/json/delphix/jetstream/container//restore
{
"type": "JSTimelinePointLatestTimeInput",
"sourceDataLayout": ""
};

Using Specific Time:

POST /resources/json/delphix/jetstream/container//restore
{
"type": "JSTimelinePointTimeInput",
"branch": "",
"time": "
};

You can find bookmarkReference from CLI, using below command:

DelphixEngine> jetstream bookmark list display=name,reference

You can find containerReference from CLI, using below command:

DelphixEngine> jetstream container list display=name,reference

You can find templateReference from CLI, using below command:

DelphixEngine> jetstream template list display=name,reference

You can find branchReference from CLI, using below command:

DelphixEngine> jetstream branch list display=name,reference

Hope this will provide some insight.
Photo of Jim Daniels

Jim Daniels

  • 150 Points 100 badge 2x thumb
Is there a way to limit the output for the api call "GET /resources/json/delphix/jetstream/bookmark"?
Photo of Jatinder Luthra

Jatinder Luthra, Employee

  • 3,058 Points 3k badge 2x thumb
Could you please provide some information on, what you trying to achieve, by limiting the output for GET api call?

You can capture the result in some variable as part of your script and extract the required information.
Photo of Jim Daniels

Jim Daniels

  • 150 Points 100 badge 2x thumb
Wanted to limit the output, mimic the CLI call. Additionally, would like to know if you could limit it to a single bookmark...
Photo of Jatinder Luthra

Jatinder Luthra, Employee

  • 3,058 Points 3k badge 2x thumb
Unfortunately, we can't limit the output of api call, to mimic CLI call.

You need to use unix tricks to extract the required data from the output.