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

SmartSense view creation using ambari rest api

Explorer

I am able to create File/Tez/Hive view using Ambari api. How do i create smartsense view using rest api?

1 REPLY 1

Super Mentor

@Sushant

Example:

curl -i -u admin:admin -H "X-Requested-By: ambari" -X POST  -d '{"ViewInstanceInfo":{"instance_name":"TestSmartSenseView1","label":"TestSmartSenseView1","visible":true,"icon_path":"","icon64_path":"","description":"TestSmartSenseView","properties":{"hst.server.username":"ssadmin","hst.server.password":"ssadmin", "hst.server.url":"http://erie1.example.com:9000"},"cluster_type":"LOCAL_AMBARI","cluster_handle":2}}'  http://localhost:8080/api/v1/views/SMARTSENSE/versions/1.4.0.2.5.0.5-1/instances/TestSmartSenseView1

Above API call will create a new smartsense view instance with the following details: these values you will need to change based on your SmartSense details.

1. hst.server.username = ssadmin
2. hst.server.password = ssadmin
3. hst.server.url = http://erie1.example.com:9000
4. SmariSense View Instance Name = TestSmartSenseView1
5. SmartSense View Version = 1.4.0.2.5.0.5-1

The smartsense version number might be different in your case.

However, Will suggest to use latest version of ambari, where you will find that auto instance of SmartSense will be already present When you deploy a cluster with Ambari, a SmartSense View instance is automatically created as long as an Ambari Agent is deployed on the host running the Ambari Server.

If an Ambari Agent is not installed on the Ambari Server host, the view will not be automatically created, and you will have to add a SmartSense instance manually.

Please see: https://docs.hortonworks.com/HDPDocuments/Ambari-2.5.0.3/bk_ambari-views/content/configuring_smartse...

; ;