# Elastic Stack (ELK Stack) Security API

**Canonical:** https://apis.io/apis/elk-stack/elk-stack-security-api/  
**Provider:** Elastic Stack (ELK Stack) — https://apis.io/providers/elk-stack/  
**Base URL:** https://{elasticsearch_endpoint}  
**Documentation:** https://www.elastic.co/docs/api/doc/elasticsearch/

Elastic Stack (ELK Stack) Security API is one of 132 APIs that [Elastic Stack (ELK Stack)](https://apis.io/providers/elk-stack/) publishes on the [APIs.io](https://apis.io/) network, described by a machine-readable OpenAPI specification. Tagged areas include Security. The published artifact set on APIs.io includes an OpenAPI specification, API documentation, and an API reference.

The security API from Elastic Stack (ELK Stack) — 64 operation(s) for security.

## Operations (60 of 100)

| Method | Path | Summary |
|---|---|---|
| POST | `/_encryption/_reset` | Reset the project encryption key |
| POST | `/_security/profile/_activate` | Activate a user profile |
| GET | `/_security/_authenticate` | Authenticate a user |
| GET | `/_security/role` | Get roles |
| POST | `/_security/role` | Bulk create or update roles |
| DELETE | `/_security/role` | Bulk delete roles |
| POST | `/_security/api_key/_bulk_update` | Bulk update API keys |
| PUT | `/_security/user/{username}/_password` | Change passwords |
| POST | `/_security/user/{username}/_password` | Change passwords |
| PUT | `/_security/user/_password` | Change passwords |
| POST | `/_security/user/_password` | Change passwords |
| POST | `/_security/api_key/{ids}/_clear_cache` | Clear the API key cache |
| POST | `/_security/privilege/{application}/_clear_cache` | Clear the privileges cache |
| POST | `/_security/realm/{realms}/_clear_cache` | Clear the user cache |
| POST | `/_security/role/{name}/_clear_cache` | Clear the roles cache |
| POST | `/_security/service/{namespace}/{service}/credential/token/{name}/_clear_cache` | Clear service account token caches |
| PUT | `/_security/api_key/clone` | Clone an API key |
| POST | `/_security/api_key/clone` | Clone an API key |
| GET | `/_security/api_key` | Get API key information |
| PUT | `/_security/api_key` | Create an API key |
| POST | `/_security/api_key` | Create an API key |
| DELETE | `/_security/api_key` | Invalidate API keys |
| POST | `/_security/cross_cluster/api_key` | Create a cross-cluster API key |
| PUT | `/_security/service/{namespace}/{service}/credential/token/{name}` | Create a service account token |
| POST | `/_security/service/{namespace}/{service}/credential/token/{name}` | Create a service account token |
| DELETE | `/_security/service/{namespace}/{service}/credential/token/{name}` | Delete service account tokens |
| POST | `/_security/service/{namespace}/{service}/credential/token` | Create a service account token |
| POST | `/_security/delegate_pki` | Delegate PKI authentication |
| GET | `/_security/privilege/{application}/{name}` | Get application privileges |
| DELETE | `/_security/privilege/{application}/{name}` | Delete application privileges |
| GET | `/_security/role/{name}` | Get roles |
| PUT | `/_security/role/{name}` | Create or update roles |
| POST | `/_security/role/{name}` | Create or update roles |
| DELETE | `/_security/role/{name}` | Delete roles |
| GET | `/_security/role_mapping/{name}` | Get role mappings |
| PUT | `/_security/role_mapping/{name}` | Create or update role mappings |
| POST | `/_security/role_mapping/{name}` | Create or update role mappings |
| DELETE | `/_security/role_mapping/{name}` | Delete role mappings |
| GET | `/_security/user/{username}` | Get users |
| PUT | `/_security/user/{username}` | Create or update users |
| POST | `/_security/user/{username}` | Create or update users |
| DELETE | `/_security/user/{username}` | Delete users |
| PUT | `/_security/user/{username}/_disable` | Disable users |
| POST | `/_security/user/{username}/_disable` | Disable users |
| PUT | `/_security/profile/{uid}/_disable` | Disable a user profile |
| POST | `/_security/profile/{uid}/_disable` | Disable a user profile |
| PUT | `/_security/user/{username}/_enable` | Enable users |
| POST | `/_security/user/{username}/_enable` | Enable users |
| PUT | `/_security/profile/{uid}/_enable` | Enable a user profile |
| POST | `/_security/profile/{uid}/_enable` | Enable a user profile |
| GET | `/_security/enroll/kibana` | Enroll Kibana |
| GET | `/_security/enroll/node` | Enroll a node |
| GET | `/_security/privilege/_builtin` | Get builtin privileges |
| GET | `/_security/privilege` | Get application privileges |
| PUT | `/_security/privilege` | Create or update application privileges |
| POST | `/_security/privilege` | Create or update application privileges |
| GET | `/_security/privilege/{application}` | Get application privileges |
| GET | `/_security/role_mapping` | Get role mappings |
| GET | `/_security/service/{namespace}/{service}` | Get service accounts |
| GET | `/_security/service/{namespace}` | Get service accounts |

…and 40 more operations. They are listed in full on the page.

## Machine-readable artifacts (8)

- **OpenAPI** — https://raw.githubusercontent.com/api-evangelist/elk-stack/refs/heads/main/openapi/elk-stack-security-api-openapi.yml
- **Documentation** — https://www.elastic.co/docs/reference/elasticsearch
- **APIReference** — https://www.elastic.co/docs/api/doc/elasticsearch/
- **SourceCode** — https://github.com/elastic/elasticsearch-specification
- **Documentation** — https://www.elastic.co/docs/reference/kibana
- **APIReference** — https://www.elastic.co/docs/api/doc/kibana/
- **SourceCode** — https://github.com/elastic/kibana
- **ToolCrosswalk** — https://raw.githubusercontent.com/api-evangelist/elk-stack/refs/heads/main/mcp/elk-stack-tool-crosswalk.yml

## Other Elastic Stack (ELK Stack) APIs (12)

- [Elastic Cloud API](https://apis.io/apis/elk-stack/elastic-cloud-api/)
- [Elastic Stack (ELK Stack) Accounts API](https://apis.io/apis/elk-stack/elk-stack-accounts-api/)
- [Elastic Stack (ELK Stack) Actions API](https://apis.io/apis/elk-stack/elk-stack-actions-api/)
- [Elastic Stack (ELK Stack) agent builder API](https://apis.io/apis/elk-stack/elk-stack-agent-builder-api/)
- [Elastic Stack (ELK Stack) Alerting API](https://apis.io/apis/elk-stack/elk-stack-alerting-api/)
- [Elastic Stack (ELK Stack) Alerting V2 API](https://apis.io/apis/elk-stack/elk-stack-alerting-v2-api/)
- [Elastic Stack (ELK Stack) Analytics API](https://apis.io/apis/elk-stack/elk-stack-analytics-api/)
- [Elastic Stack (ELK Stack) APM agent configuration API](https://apis.io/apis/elk-stack/elk-stack-apm-agent-configuration-api/)
- [Elastic Stack (ELK Stack) APM agent keys API](https://apis.io/apis/elk-stack/elk-stack-apm-agent-keys-api/)
- [Elastic Stack (ELK Stack) APM annotations API](https://apis.io/apis/elk-stack/elk-stack-apm-annotations-api/)
- [Elastic Stack (ELK Stack) APM server schema API](https://apis.io/apis/elk-stack/elk-stack-apm-server-schema-api/)
- [Elastic Stack (ELK Stack) APM sourcemaps API](https://apis.io/apis/elk-stack/elk-stack-apm-sourcemaps-api/)

## Tags

Security

---

Profiled by [API Evangelist](https://apievangelist.com) and published on [APIs.io](https://apis.io/apis/elk-stack/elk-stack-security-api/). The API's provider profile, Kin Score and agent-readiness rating are at https://apis.io/providers/elk-stack/.
