Hey Joe. Here is an excerpt from something I wrote that creates a bookmark on a container branch from a PIT on the template. You could easily modify it to create one from a PIT on a container.
DEIP = "Delphix Engine IP"
BOOKMARKNAME = "Whatever you want the title to be"
TEMPLATENAME = "The name of the template you are creating the bookmark from"
function GET_ACTIVE_BRANCH_REF { TEMPLATE=$(curl -X GET -k "
http://${DEIP}/resources/json/delphix/jetstream/template"; \
-b ~/cookies.txt -H "Content-Type: application/json" | jq -r ".result[]| select (.name ==\"${TEMPLATENAME}\")")
TEMPLATEREF=$(echo $TEMPLATE| jq -r '.reference')
BRANCHREF=$(echo $TEMPLATE| jq -r '.activeBranch')
echo "Template Ref, Branch Ref:"
echo "${TEMPLATEREF}, ${BRANCHREF}"
}
GET_ACTIVE_BRANCH_REF
curl -X POST -k --data @- "
http://${DEIP}/resources/json/delphix/jetstream/bookmark"; \ -b ~/cookies.txt -H "Content-Type: application/json" <<-EOF
{
"type": "JSBookmarkCreateParameters",
"bookmark": {
"type": "JSBookmark",
"name": "${BOOKMARKNAME}",
"branch": "${BRANCHREF}",
"tags": ["SugarCRM", "Masked", "Validated"]
},
"timelinePointParameters": {
"type": "JSTimelinePointLatestTimeInput",
"sourceDataLayout": "${TEMPLATEREF}"
}
}
EOF