Unable to create DSS users using shell script

mettuharish
mettuharish Dataiku DSS Core Designer, Registered Posts: 15

Hello All,

I have tried creating DSS users by using python script but unable to do it. It throws below error.

#!/bin/bash


DATAIKU_URL="DataIKU URL"
DATAIKU_API_KEY="XXX_API_KEY"


ENDPOINT="/users"
PAYLOAD='{
"id": "hamett0",
"displayName": "Harish Kumar Mettu",
"password": null,
"sourceType": "LDAP",
"groups": ["administrators"],
"profile": "PLATFORM_ADMIN"
}'


curl -X POST \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $DATAIKU_API_KEY" \
-d "$PAYLOAD" \
"$DATAIKU_URL$ENDPOINT"

But this is throwing below error. Need help to fix it ASAP.

<html>
<head><title>405 Not Allowed</title></head>
<body>
<center><h1>405 Not Allowed</h1></center>
<hr><center>nginx</center>
</body>
</html>


Operating system used: Redhat

Tagged:

Answers

Setup Info
    Tags
      Help me…