API to create users in Delphix Engine and in Masking Engine?

  • 0
  • 1
  • Question
  • Updated 2 months ago
  • Answered
Hello Team, 
Could you please let me know the  API to create users in Delphix Engine and in Masking Engine.
Photo of pankaj

pankaj

  • 492 Points 250 badge 2x thumb

Posted 2 months ago

  • 0
  • 1
Photo of Mouhssine SAIDI

Mouhssine SAIDI

  • 4,662 Points 4k badge 2x thumb
Hi Pankaj,

Use POST methode with this uri http://DE/resources/json/delphix/user

Passe this code to it

{
    "type": "User",
    "name": "demo",
    "authenticationType": "NATIVE",
    "credential": {
        "type": "PasswordCredential",
        "password": "demo"
    }
}


Regards,

Mouhssine
Photo of pankaj

pankaj

  • 492 Points 250 badge 2x thumb
Hello Mouhssine

Thanks forr your reply..But could you please tell me how to pass the code in above URL??


Sample : have done in browser

https://DOMAIN/resources/json/delphix/user/%7B%20%22type%22:%20%22User%22,%20%22name%22:%20%22dem...

it will great if you tell me how to do it with steps with browser or with CLI
Photo of Mouhssine SAIDI

Mouhssine SAIDI

  • 4,662 Points 4k badge 2x thumb
Hi,

Please find steps from CLI :

LandsharkEngine user create *> ls
Properties
    type: User
    name: (required)
    authenticationType: (unset)
    credential: (unset)
    emailAddress: (unset)
    enabled: true
    firstName: (unset)
    homePhoneNumber: (unset)
    isDefault: (unset)
    lastName: (unset)
    locale: en-US
    mobilePhoneNumber: (unset)
    principal: (unset)
    publicKey: (unset)
    sessionTimeout: 30min
    userType: DOMAIN
    workPhoneNumber: (unset)
LandsharkEngine user create *> set name=demo
LandsharkEngine user create *> set authenticationType=NATIVE
LandsharkEngine user create *> commit


Regards,

Mouhssine
Photo of pankaj

pankaj

  • 492 Points 250 badge 2x thumb
Thanks..!
Could you please do we have option from browser also ?
From browser we could just see the list of users only , is it not possible to do add update delete operation from browser ?
Photo of pankaj

pankaj

  • 492 Points 250 badge 2x thumb
Could you please give me one CURL request to add the user in Delphix Engine or in Masking Engine?
nothing is given in doc 
(Edited)
Photo of pankaj

pankaj

  • 492 Points 250 badge 2x thumb
Could you please give me one CURL request to add the user in Delphix Engine or in Masking Engine?
nothing is given in doc 
Please help me 
Photo of pankaj

pankaj

  • 492 Points 250 badge 2x thumb
Could you please give me one CURL request to add the user in Delphix Engine or in Masking Engine?
nothing is given in doc 
Please help me 
Photo of Mouhssine SAIDI

Mouhssine SAIDI

  • 4,662 Points 4k badge 2x thumb
Hi Pankaj,

curl -X POST -k --data @- http://<engineaddr>/resources/j... \
-b cookies.txt -H "Content-Type: application/json" <<EOF
{
    "type": "User",
    "name": "demo",
    "authenticationType": "NATIVE",
    "credential": {
        "type": "PasswordCredential",
        "password": "demo"
    }
}
EOF

Regards,

Mouhssine