Compact and aligned text (CAT) API

    Using the CAT API, you can answer questions like which node is the elected master, what state is the cluster in, how many documents are in each index, and so on.

    To see the available operations in the CAT API, use the following command:

    You can use the following query parameters with any CAT API to filter your results.

    To query aliases and get verbose output that includes all column headings in the response, use the v query parameter.

    1. GET _cat/aliases?v

    The response provides more details, such as names of each column in the response.

    Without the verbose parameter, v, the response simply returns the alias names:

    1. sample-alias1 sample-index-1 - - - -

    To limit the output to a subset of headers, use the h parameter:

    1. GET _cat/<operation_name>?h=<header_name_1>,<header_name_2>&v

    Typically, for any operation you can find out what headers are available using the parameter, and then use the h parameter to limit the output to only the headers that you care about.

    If you use the security plugin, make sure you have the appropriate permissions.