Support Questions

Find answers, ask questions, and share your expertise

Ambari API Question

avatar

I was wondering - since Ambari manages one cluster - why does the Ambari API require the cluster name? for example: localhost:8080/api/v1/clusters/{clusterName}/hosts

Is this because:

1) The future Ambari will manage more than one cluster at a time?

2) It follows an API standard where it is good practice to ask for the cluster?

Is it 1 or 2 or both or something else?

I'd think localhost:8080/api/v1/cluster/hosts/ makes more sense - because we are only dealing with one cluster at a time per Ambari instance and if the future Ambari manages more than one cluster, I'd do v2 of the api and have localhost:8080/api/v2/clusters/{clusterName}

1 ACCEPTED SOLUTION

avatar
Guru

The design was to leave space to handle more than one cluster at a time in a single Ambari Server instance.

Maybe Ambari could have a convenient resource /api/v1/cluster (like you mention) that will convert to the [0] cluster automatically? If that makes sense, maybe file that JIRA in Ambari project?

View solution in original post

1 REPLY 1

avatar
Guru

The design was to leave space to handle more than one cluster at a time in a single Ambari Server instance.

Maybe Ambari could have a convenient resource /api/v1/cluster (like you mention) that will convert to the [0] cluster automatically? If that makes sense, maybe file that JIRA in Ambari project?