Skip to main content
Skip table of contents

API cookbook: update a bookmark in Delphix self-service

This API cookbook recipe describes how to update a Bookmark in Delphix Self-Service (Jet Stream). Note that the following example includes updating the "tags" on a Delphix Self-Service bookmark.

The following script is for educational and demonstration purposes only and is not supported by Delphix.

CODE
#!/bin/bash
#
# sample script to update a bookmark on a Jet Stream container.
#
# Please set the following variables to suit your purposes.
# set this to the FQDN or IP address of the Delphix Engine
DE="ars-dlpx-6010-3.dlpxdc.co"
# set this to the Delphix admin user name
DELPHIX_ADMIN="admin"
# set this to the password for the Delphix admin user
DELPHIX_PASS="delphix"
# reference of bookmark you want to update
BOOKMARK_REF="JS_BOOKMARK-2"
#
# create our session
curl -s -X POST -k --data @- http://${DE}/resources/json/delphix/session \
    -c ~/cookies.txt -H "Content-Type: application/json" <<EOF
{
    "type": "APISession",
    "version": {
        "type": "APIVersion",
        "major": 1,
        "minor": 6,
        "micro": 2
    }
}
EOF
echo
#
# authenticate to the DE
curl -s -X POST -k --data @- http://${DE}/resources/json/delphix/login \
    -b ~/cookies.txt -c ~/cookies.txt -H "Content-Type: application/json" <<EOF
{
    "type": "LoginRequest",
    "username": "${DELPHIX_ADMIN}",
    "password": "${DELPHIX_PASS}"
}
EOF
echo
#
# Update the bookmark. Note that only fields you want to change must be included in the bookmark
# json.
curl -s -X POST -k --data @- http://${DE}/resources/json/delphix/jetstream/bookmark/${BOOKMARK_REF} \
    -b ~/cookies.txt -H "Content-Type: application/json" <<EOF
{
    "type": "JSBookmark",
    "tags": ["tagA", "tabB"]
}
EOF
echo
JavaScript errors detected

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

If this problem persists, please contact our support.