Support Questions
Find answers, ask questions, and share your expertise

How to create service in hdfs-plugin with Rest Api call?


I am trying to create a service in hdfs-plugin. I am refering this link.

I have tried below curl command:

curl -H "Content-Type: application/json" -X POST -d '{"configs": {"password": "*****","username": "admin"},"description":"hdfsservice","isEnabled": true,"name": "hadoopdev","type": "test","version": 1}' http://localhost:6080/service/public/v2/api/service

When I ran this it didn't give any response, not even any error.

Can someone help me to know if this is the correct curl or not?



I am able to create with the below rest call:

curl -ivu admin:admin -H "Content-Type: application/json" -d '{"name":"hdfs-test-service","description":"testing","repositoryType":"hdfs","config":"{\"username\":\"admin\",\"password\":\"admin\",\"\":\"hdfs://<namenode-host>:9000\",\"\":true,\"\":\"simple\"}","isActive":true}' -X POST http://<ranger-host>:6080/service/public/api/repository
Take a Tour of the Community
Don't have an account?
Your experience may be limited. Sign in to explore more.