Get service accounts Added in 7.13.0

GET /_security/service/{namespace}

Get a list of service accounts that match the provided path parameters.

Path parameters

  • namespace string Required

    Name of the namespace. Omit this parameter to retrieve information about all service accounts. If you omit this parameter, you must also omit the service parameter.

Responses

  • 200 application/json
    Hide response attribute Show response attribute object
    • * object Additional properties

      Additional properties are allowed.

      Hide * attribute Show * attribute object
      • role_descriptor object Required

        Additional properties are allowed.

        Hide role_descriptor attributes Show role_descriptor attributes object
        • cluster array[string] Required

          A list of cluster privileges. These privileges define the cluster level actions that API keys are able to execute.

        • indices array[object] Required

          A list of indices permissions entries.

          Hide indices attributes Show indices attributes object
          • Additional properties are allowed.

            Hide field_security attributes Show field_security attributes object
          • names string | array[string]

            A list of indices (or index name patterns) to which the permissions in this entry apply.

          • privileges array[string] Required

            The index level privileges that owners of the role have on the specified indices.

          • query string | object

            While creating or updating a role you can provide either a JSON structure or a string to the API. However, the response provided by Elasticsearch will only be string with a json-as-text content.

            Since this is embedded in IndicesPrivileges, the same structure is used for clarity in both contexts.

          • Set to true if using wildcard or regular expressions for patterns that cover restricted indices. Implicitly, restricted indices have limited privileges that can cause pattern tests to fail. If restricted indices are explicitly included in the names list, Elasticsearch checks privileges against these indices regardless of the value set for allow_restricted_indices.

        • remote_indices array[object]

          A list of indices permissions for remote clusters.

          Hide remote_indices attributes Show remote_indices attributes object
          • clusters string | array[string] Required
          • Additional properties are allowed.

            Hide field_security attributes Show field_security attributes object
          • names string | array[string]

            A list of indices (or index name patterns) to which the permissions in this entry apply.

          • privileges array[string] Required

            The index level privileges that owners of the role have on the specified indices.

          • query string | object

            While creating or updating a role you can provide either a JSON structure or a string to the API. However, the response provided by Elasticsearch will only be string with a json-as-text content.

            Since this is embedded in IndicesPrivileges, the same structure is used for clarity in both contexts.

          • Set to true if using wildcard or regular expressions for patterns that cover restricted indices. Implicitly, restricted indices have limited privileges that can cause pattern tests to fail. If restricted indices are explicitly included in the names list, Elasticsearch checks privileges against these indices regardless of the value set for allow_restricted_indices.

        • remote_cluster array[object]

          A list of cluster permissions for remote clusters. Note - this is limited a subset of the cluster permissions.

          Hide remote_cluster attributes Show remote_cluster attributes object
          • clusters string | array[string] Required
          • privileges array[string] Required

            The cluster level privileges that owners of the role have on the remote cluster.

            Values are monitor_enrich or monitor_stats.

        • global array[object] | object

          An object defining global privileges. A global privilege is a form of cluster privilege that is request-aware. Support for global privileges is currently limited to the management of application privileges.

          One of:
          Hide attribute Show attribute object
        • applications array[object]

          A list of application privilege entries

          Hide applications attributes Show applications attributes object
          • application string Required

            The name of the application to which this entry applies.

          • privileges array[string] Required

            A list of strings, where each element is the name of an application privilege or action.

          • resources array[string] Required

            A list resources to which the privileges are applied.

        • metadata object
          Hide metadata attribute Show metadata attribute object
          • * object Additional properties

            Additional properties are allowed.

        • run_as array[string]

          A list of users that the API keys can impersonate.

        • Optional description of the role descriptor

        • Additional properties are allowed.

          Hide restriction attribute Show restriction attribute object
        • Hide transient_metadata attribute Show transient_metadata attribute object
          • * object Additional properties

            Additional properties are allowed.

GET /_security/service/{namespace}
curl \
 -X GET http://api.example.com/_security/service/{namespace}
Response examples (200)
{
  "additionalProperty1": {
    "role_descriptor": {
      "cluster": [
        "string"
      ],
      "indices": [
        {
          "field_security": {
            "except": "string",
            "grant": "string"
          },
          "names": "string",
          "privileges": [
            "string"
          ],
          "": "string",
          "allow_restricted_indices": true
        }
      ],
      "remote_indices": [
        {
          "clusters": "string",
          "field_security": {
            "except": "string",
            "grant": "string"
          },
          "names": "string",
          "privileges": [
            "string"
          ],
          "": "string",
          "allow_restricted_indices": true
        }
      ],
      "remote_cluster": [
        {
          "clusters": "string",
          "privileges": [
            "monitor_enrich"
          ]
        }
      ],
      "global": [
        {
          "application": {}
        }
      ],
      "applications": [
        {
          "application": "string",
          "privileges": [
            "string"
          ],
          "resources": [
            "string"
          ]
        }
      ],
      "metadata": {
        "additionalProperty1": {},
        "additionalProperty2": {}
      },
      "run_as": [
        "string"
      ],
      "description": "string",
      "restriction": {
        "workflows": [
          "string"
        ]
      },
      "transient_metadata": {
        "additionalProperty1": {},
        "additionalProperty2": {}
      }
    }
  },
  "additionalProperty2": {
    "role_descriptor": {
      "cluster": [
        "string"
      ],
      "indices": [
        {
          "field_security": {
            "except": "string",
            "grant": "string"
          },
          "names": "string",
          "privileges": [
            "string"
          ],
          "": "string",
          "allow_restricted_indices": true
        }
      ],
      "remote_indices": [
        {
          "clusters": "string",
          "field_security": {
            "except": "string",
            "grant": "string"
          },
          "names": "string",
          "privileges": [
            "string"
          ],
          "": "string",
          "allow_restricted_indices": true
        }
      ],
      "remote_cluster": [
        {
          "clusters": "string",
          "privileges": [
            "monitor_enrich"
          ]
        }
      ],
      "global": [
        {
          "application": {}
        }
      ],
      "applications": [
        {
          "application": "string",
          "privileges": [
            "string"
          ],
          "resources": [
            "string"
          ]
        }
      ],
      "metadata": {
        "additionalProperty1": {},
        "additionalProperty2": {}
      },
      "run_as": [
        "string"
      ],
      "description": "string",
      "restriction": {
        "workflows": [
          "string"
        ]
      },
      "transient_metadata": {
        "additionalProperty1": {},
        "additionalProperty2": {}
      }
    }
  }
}