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.

View of Swagger UI for the DataStax Agent routes

Procedure

  1. 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

  2. Open address.yaml for editing.

  3. Set the swagger_enabled option to true.

  4. Restart the agents.

  5. Navigate to the UI:

    http(s)://<agent_ip>:<api_port>/ui

    Use https or http 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 is 61621.

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