Enable and access the DataStax Agent API
About this task
Enable and access the interactive Swagger UI console for the DataStax Agent API. Explore the console to learn about the agent APIs available for scripting purposes, or to use directly with a curl command.
Procedure
-
Locate the
address.yaml
file. The location of this file depends on the type of installation:-
Package installations: /var/lib/datastax-agent/conf/address.yaml
-
Tarball installations: install_location/conf/address.yaml
-
-
Open address.yaml for editing.
-
Set the
swagger_enabled
option totrue
. -
Navigate to the UI:
http(s)://<agent_ip>:<api_port>/ui
Use
https
orhttp
as appropriate for your environment. Replace<agent_ip>
with the IP address of the particular agent. Replace the<api_port>
with the port configured for your environment. Typically, the<api_port
is61621
.
Configure the API port using the api_port option in address.yaml
or [agents]
api_port in cluster_name.conf
.
The location of the cluster_name.conf file depends on the type of installation:
-
Package installations: /etc/opscenter/clusters/cluster_name.conf
-
Tarball installations: install_location/conf/clusters/cluster_name.conf