Delphix Products

 View Only
  • 1.  Making api call to lock containers

    Posted 10-01-2020 01:07:00 PM


    I am trying to lock a container using api call. Unfortunately, I did not find any resource related to this. From what I was experimenting with, I found out the url for this is


    Unfortunately, I am not exactly sure what to put in inside body of this request


    Would you please give me some guide on how to accomplish this task?
    I want to use the api call and not the self service

    Sina Rafiei
    Community Member
    Ontario Teachers' Pension Plan

  • 2.  RE: Making api call to lock containers
    Best Answer

    Posted 10-01-2020 03:03:00 PM
    1)  I encourage you in future to try these opearations through the CLI with tracing turned on.  It will really help you quickly figure out what you need to call and pass to the Web API.  The CLI actually wraps around the Web API, so by tracing it you can see exactly what you need to build Web API calls:

    setopt trace=true
    cd selfservice/container
    select <mycontainer>
    set lockUser=<myusername>

    In the response, you'll see the answer:

    === POST /resources/json/delphix/selfservice/container/JS_DATA_CONTAINER-1/lock ===
        "type": "JSDataContainerLockParameters",
        "lockUser": "USER-11"

    You can find your user reference in the CLI as well very easily:

    cd user
    select <myusername>

    and you'll see the reference.  You can also do this programatically with
    GET /resources/json/delphix/user

    and then parse the resulting array of users.

    2)  My Engine is IP

    You can do to see the API docs to answer this and similar questions, although I definitely find the CLI tracing to be easier.

    Specific to your question, see:  Under the lock operation, it allows you to click through to this page which explains that the lock parameter requires a type of JSDataContainerLockParameters and a parameter lockUser, and that lockUser is a reference to the user object who locks the container.

    Ranzo Taylor
    VP, Technical Services