Delphix Products

  • 1.  Container owner API

    Posted 02-21-2019 01:40:00 PM
    Hello there,

    I am fetching the container details using API: GET /resources/json/delphix/jetstream/container

    Although the container has multiple owners, this value is returning as "null". Is there a another API I can fetch the owners and add/delete them?

    POST /resources/json/delphix/selfservice/container/{ref}/addOwner
    Is not working for me!

    Many Thanks.
    #Virtualization


  • 2.  RE: Container owner API

    Posted 02-25-2019 04:03:00 PM
    You are right that doing a get on a container always returns 'null' for the owners. This is likely a bug, and I have an inquiry into our engineers. For adding/removing an owner, you can do the following, replacing JS_DATA_CONTAINER-1 with the reference for your container and USER-2 with the reference for your delphix user. The json below is your post body.:

    === POST /resources/json/delphix/selfservice/container/JS_DATA_CONTAINER-1/addOwner ===
    {
        "type": "JSDataContainerModifyOwnerParameters",
        "owner": "USER-2"
    }


  • 3.  RE: Container owner API

    Posted 03-04-2019 09:42:00 AM
    Hi there,
    sorry for the delayed response, but this does not work for me.

    p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #000000} span.s1 {font-variant-ligatures: no-common-ligatures}

    curl -X POST -k https://$DE/resources/json/delphix/selfservice/container/JS_DATA_CONTAINER-27/addOwner  \

        -b ~/cookies.txt -H "Content-Type: application/json" |python -mjson.tool

    {

        "type": "JSDataContainerModifyOwnerParameters",

        "owner": "USER-2"

    }

    {

        "error": {

            "action": "Provide the input parameter and try again.",

            "commandOutput": null,

            "details": "Missing required input of type \"JSDataContainerModifyOwnerParameters\".",

            "diagnoses": [],

            "id": "exception.webservices.api.input.missing",

            "type": "APIError"

        },

        "status": "ERROR",

        "type": "ErrorResult"

    }


  • 4.  RE: Container owner API
    Best Answer

    Posted 03-04-2019 09:50:00 AM
    Not sure why you are piping your json into the json.tool module. Try without it instead. i.e.

    curl -X POST -k https://$DE/resources/json/delphix/selfservice/container/JS_DATA_CONTAINER-27/addOwner  \

        -b ~/cookies.txt -H "Content-Type: application/json" -d @- <<EOF

    {

        "type": "JSDataContainerModifyOwnerParameters",

        "owner": "USER-2"

    }
    EOF


  • 5.  RE: Container owner API

    Posted 03-04-2019 10:28:00 AM
    Thanks!!, removing the tool worked well.