Skip to main content
Skip table of contents

Delphix self-service use cases for APIs

Create Delphix self-service template

Jet Stream is now known as Delphix Self-Service.

Filename: jetstream_template.sh or jetstream_template_jq.sh

Edit the file to update the parameters as required for your environment.

Required for Delphix Self-Service Template ...

CODE

TPL_NAME="jstpl"            # JetStream Template Name
DATASOURCE_NAME="jsds"        # JetStream Data Source Name
DATASOURCE_VDB="VBITT"        # JetStream Data Source VDB or dSource

Sample Output

CODE

$ ./jetstream_template.sh# or ./Jetstream_template_jq.sh
Authenticating on http://172.16.160.195/resources/json/delphix
Session and Login Successful ...
Getting Database Container Reference Value ...
container reference: ORACLE_DB_CONTAINER-45
Create JetStream Template jstpl with Data Source DB VBITT ...
Database: {"type":"OKResult","status":"OK","result":"JS_DATA_TEMPLATE-3","job":null,"action":"ACTION-547"} 


Done ... (no job required for this action)

Create Delphix self-service data container

Filename: jetstream_container.sh# or jetstream_container_jq.sh

Edit the file to update the parameters as required for your environment.

Required for Delphix Self-Service Container ...

CODE

TPL_NAME="jstpl"        # JetStream Template Name
DS_NAME="jsds"            # JetStream Data Source Name 


DC_NAME="jsdc"            # JetStream Data Container Name
DC_VDB="VBITT2"            # JetStream Data Container VDB

Sample Output

CODE

$ ./jetstream_container.sh# or ./jetstream_container_jq.sh
Authenticating on http://172.16.160.195/resources/json/delphix
Session and Login Successful ...
Getting Database Container Reference Value ...
container reference: ORACLE_DB_CONTAINER-46 
JetStream Data Template: JS_DATA_TEMPLATE-4 
JetStream sourceDataLayout: JS_DATA_TEMPLATE-4 
Create JetStream Container jsdc with Data Source DB VBITT2 ...
JetStream Data Container Creation Results: {"type":"OKResult","status":"OK","result":"JS_DATA_CONTAINER-4","job":"JOB-240","action":"ACTION-569"}
Job: JOB-240
Current status as of Wed Aug 17 04:11:54 EDT 2016 : RUNNING 0.0% Completed
Current status as of Wed Aug 17 04:11:54 EDT 2016 : RUNNING 0.0% Completed
Current status as of Wed Aug 17 04:12:04 EDT 2016 : RUNNING 5.0% Completed
Current status as of Wed Aug 17 04:12:14 EDT 2016 : RUNNING 5.0% Completed
Current status as of Wed Aug 17 04:12:24 EDT 2016 : RUNNING 30.0% Completed
Current status as of Wed Aug 17 04:12:34 EDT 2016 : RUNNING 31.0% Completed
Current status as of Wed Aug 17 04:12:44 EDT 2016 : RUNNING 53.0% Completed
Current status as of Wed Aug 17 04:12:54 EDT 2016 : RUNNING 57.0% Completed
Current status as of Wed Aug 17 04:13:04 EDT 2016 : RUNNING 57.0% Completed
Current status as of Wed Aug 17 04:13:14 EDT 2016 : RUNNING 57.0% Completed
Current status as of Wed Aug 17 04:13:24 EDT 2016 : RUNNING 59.0% Completed
Current status as of Wed Aug 17 04:13:34 EDT 2016 : RUNNING 60.0% Completed
Current status as of Wed Aug 17 04:13:44 EDT 2016 : RUNNING 77.0% Completed
Current status as of Wed Aug 17 04:13:54 EDT 2016 : RUNNING 77.0% Completed
Current status as of Wed Aug 17 04:14:04 EDT 2016 : RUNNING 77.0% Completed
Current status as of Wed Aug 17 04:14:14 EDT 2016 : RUNNING 77.0% Completed
Job: JOB-240 COMPLETED 100.0% Completed ... 


Done ...

Create Delphix self-service bookmark

Filename: jetstream_api_examples.txt (part 1)

Create Bookmark ...

Change parameters as required and desired.

CODE

curl -X POST -k --data @-
http://172.16.160.177/resources/json/delphix/jetstream/bookmark \
    -b cookies.txt -H "Content-Type: application/json" <<EOF
{
    "type": "JSBookmarkCreateParameters",
    "bookmark": {
        "type": "JSBookmark",
        "name": "aalen",
        "branch": "JS_BRANCH-5",
        "shared": false,
        "tags": [
            "A",
            "B",
            "C"
        ]
    },
    "timelinePointParameters": {
        "type": "JSTimelinePointLatestTimeInput",
        "sourceDataLayout": "JS_DATA_CONTAINER-2"
    }
}
EOF
{"type":"OKResult","status":"OK","result":"JS_BOOKMARK-5","job":"JOB-512","action":"ACTION-921"}

The timelinePointParameters type "JSTimelinePointLatestTimeInput" is the last point / latest time in the branch!

Filename: jetstream_bookmark.sh or jetstream_bookmark_jq.sh

Edit the file to update the parameters as required for your environment.

CODE

DT=`date '+%Y%m%d%H%M%S'`

Required for Delphix Self-Service Bookmark ...

CODE

JS_BRANCH="default"            # JetStream Branch
BM_NAME="aalen_${DT}"        # JetStream Bookmark Name appended timestamp
SHARED="false"                # Share Bookmark true/false
TAGS='"API","Created"'        # Tags Array Values

Sample Output

CODE

$ ./jetstream_bookmark.sh # or ./jetstream_bookmark_jq.sh
Authenticating on http://172.16.160.195/resources/json/delphix
Session and Login Successful ...
Getting Jetstream Branch Reference Value ...
branch reference: JS_BRANCH-7 
dataLayout container reference: JS_DATA_CONTAINER-4 
JetStream Bookmark Creation Results: {"type":"OKResult","status":"OK","result":"JS_BOOKMARK-4","job":"JOB-251","action":"ACTION-591"}
Job: JOB-251
Current status as of Wed Aug 17 04:59:53 EDT 2016 : COMPLETED 100.0% Completed
Job: JOB-251 COMPLETED 100.0% Completed ... 


Done ...

Delphix self-service refresh

Filename: jetstream_api_examples.txt (part 2)

Use CLI command to get Delphix Self-Service Container Reference

CODE

/jetstream/container/list 

            ...
            "reference": " JS_DATA_CONTAINER-4 ",
            "namespace": null,
            "name": " jsdc ",
            ...

Refresh Container Information ...

CODE

=== POST /resources/json/delphix/jetstream/container/ JS_DATA_CONTAINER-4 /refresh 


curl -X POST -k --data @http://172.16.160.177/resources/json/delphix/jetstream/container/ JS_DATA_CONTAINER-4 /refresh \ -b cookies.txt -H "Content-Type: application/json" <<EOF
{}
EOF 


=== RESPONSE ===
{
    "type": "OKResult",
    "status": "OK",
    "result": "",
    "job": "JOB-514",
    "action": "ACTION-924"
}
=== END ===

Filename: jetstream_refresh.sh or jetstream_refresh_jq.sh

Edit the file to update the parameters as required for your environment.

Required for Delphix Self-Service Refresh ...

CODE

CONTAINER_NAME="jsdc"        # Jetstream Container Name

Sample Output

CODE

$ ./jetstream_refresh.sh # or ./jetstream_refresh_jq.sh
Authenticating on http://172.16.160.195/resources/json/delphix
Session and Login Successful ...
Getting Jetstream Container Reference Value ...
container reference: JS_DATA_CONTAINER-4 
abitterman-mbpro:JetStream abitterman$ vi jetstream_refresh.sh
abitterman-mbpro:JetStream abitterman$ ./jetstream_refresh.sh
Authenticating on http://172.16.160.195/resources/json/delphix
Session and Login Successful ...
Getting Jetstream Container Reference Value ...
container reference: JS_DATA_CONTAINER-4
JetStream Refresh API Results: {"type":"OKResult","status":"OK","result":"","job":"JOB-257","action":"ACTION-602"}
Job: JOB-257
Current status as of Wed Aug 17 05:13:15 EDT 2016 : RUNNING 2.0% Completed
Current status as of Wed Aug 17 05:13:15 EDT 2016 : RUNNING 2.0% Completed
Current status as of Wed Aug 17 05:13:25 EDT 2016 : RUNNING 5.0% Completed
Current status as of Wed Aug 17 05:13:35 EDT 2016 : RUNNING 5.0% Completed
Current status as of Wed Aug 17 05:13:45 EDT 2016 : RUNNING 30.0% Completed
Current status as of Wed Aug 17 05:13:55 EDT 2016 : RUNNING 42.0% Completed
Current status as of Wed Aug 17 05:14:05 EDT 2016 : RUNNING 55.0% Completed
Current status as of Wed Aug 17 05:14:15 EDT 2016 : RUNNING 58.0% Completed
Current status as of Wed Aug 17 05:14:25 EDT 2016 : RUNNING 58.0% Completed
Current status as of Wed Aug 17 05:14:35 EDT 2016 : RUNNING 58.0% Completed
Current status as of Wed Aug 17 05:14:45 EDT 2016 : RUNNING 60.0% Completed
Current status as of Wed Aug 17 05:14:55 EDT 2016 : RUNNING 62.0% Completed
Current status as of Wed Aug 17 05:15:05 EDT 2016 : RUNNING 77.0% Completed
Current status as of Wed Aug 17 05:15:15 EDT 2016 : RUNNING 77.0% Completed
Job: JOB-257 COMPLETED 100.0% Completed ... 


Done ...
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.