Created 06-12-2017 04:06 AM
Is there an Ambari Rest API to get the full version, including minor version e.g.: 2.4.x.x, currently I have able to get the high level stack version as 2.4 but nor with minor versions included.
Created 06-12-2017 04:45 AM
Please try the following API call, In the response you will find "component_version" (It should show "2.4.2.0")
http://AMBARI_HOST:8080/api/v1/services/AMBARI/components/AMBARI_SERVER?fields=RootServiceComponents...
.
Created 06-12-2017 05:23 AM
The above url provides details pertaning to Ambari, doesn't provide HDP version.
Created 06-12-2017 05:38 AM
Previous one was to get the ambari version detail.
For HDP version detail you can try the following:
http://AMBARI_HOST:8080/api/v1/clusters/<CLUSTER_NAME>/stack_versions/51/repository_versions/154?fie...
.
Here you will need to replace the stack_versions to point to your latest stack. Please see: https://github.com/apache/ambari/blob/trunk/ambari-server/docs/api/v1/stack-version-resources.md
It should show something like:
{ href: "http://erie1.example.com:8080/api/v1/clusters/ErieCluster/stack_versions/51/repository_versions/154?fields=RepositoryVersions/repository_version", RepositoryVersions: { id: 154, repository_version: "2.5.3.0-37", stack_name: "HDP", stack_version: "2.5" } }
.