Elastic Security API

Roles, users, API keys, and access control.

GitHub OpenAPI
Business capability
Identity & Access Management BC-620.20

Operations 96

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

GET /_security/role/{name} Look up one security role · Get a security role #
Ask an LLM
“What privileges does a specific Elasticsearch role grant?”
“Can I see the full definition of a single named role?”
Tell an agent
Show me the definition of the {name} role.
Fetch the cluster and index privileges granted by role {name}.
PUT /_security/role/{name} Create or replace a role (PUT) · Create or update roles #
Ask an LLM
“How can I define a new native-realm role with index privileges using PUT?”
“Can a role I PUT include run_as permissions for impersonating other users?”
Tell an agent
PUT a role named {name} granting {cluster} cluster privileges.
Using PUT, define role {name} with index access {indices}.
POST /_security/role/{name} Create or update a role (POST) · Create or update roles #
Ask an LLM
“Is there a POST form of the create-or-update role endpoint?”
“Can I attach a description and metadata to a role when I POST it?”
Tell an agent
POST role {name} with the description {description}.
Via POST, update role {name} so its run_as list is {run_as}.
DELETE /_security/role/{name} Delete a single role · Delete roles #
Ask an LLM
“What happens when I delete a role from the native realm?”
“Can I remove one named role and refresh immediately?”
Tell an agent destructive · confirm first
Delete the {name} role.
Remove role {name} from the native realm with refresh set to {refresh}.
POST /_security/profile/_activate Activate a user profile for a user · Activate a user profile #
Ask an LLM
“How do I create a user profile on behalf of someone who logged in through Kibana?”
“Which grant types can I use to activate a user profile?”
Tell an agent
Activate a user profile with grant type {grant_type} for user {username}.
Activate a profile from access token {access_token} using grant type {grant_type}.
GET /_security/_authenticate Check who the current caller is · Authenticate a user #
Ask an LLM
“Which user and roles am I authenticated as right now?”
“How can I verify my credentials are valid against the cluster?”
Tell an agent
Tell me which user I'm authenticated as.
Show the roles and realm for my current credentials.
GET /_security/role List all native-realm roles · Get roles #
Ask an LLM
“What roles exist in my cluster's native realm?”
“Can I get every role definition at once?”
Tell an agent
List all roles defined in the native realm.
Dump every role definition in the cluster.
POST /_security/role Create or update many roles at once · Bulk create or update roles #
Ask an LLM
“Can I create several roles in a single request?”
“How do I bulk upsert role definitions?”
Tell an agent
Bulk create or update these roles: {roles}.
Upsert the role set {roles} in one call with refresh {refresh}.
DELETE /_security/role Delete many roles at once · Bulk delete roles #
Ask an LLM
“Is there a way to remove multiple roles in one request?”
“Can I bulk delete roles by name?”
Tell an agent destructive · confirm first
Bulk delete the roles named {names}.
Remove all of these roles together: {names}.
POST /_security/api_key/_bulk_update Update several API keys together · Bulk update API keys #
Ask an LLM
“Can I change the expiration of multiple API keys at once?”
“Is it possible to bulk update role descriptors on API keys?”
Tell an agent
Set expiration {expiration} on API keys {ids}.
Bulk update metadata to {metadata} for keys {ids}.
PUT /_security/user/{username}/_password Change a named user's password (PUT) · Change passwords #
Ask an LLM
“How do I reset the password for a specific native-realm user with PUT?”
“Can I set a user's password from a precomputed hash?”
Tell an agent
PUT a new password {password} for user {username}.
Set user {username}'s password hash to {password_hash}.
POST /_security/user/{username}/_password Change a named user's password (POST) · Change passwords #
Ask an LLM
“Is there a POST endpoint to change another user's password?”
“Can I change the elastic built-in user's password by POST?”
Tell an agent
POST a password change for {username} to {password}.
Via POST, rotate the built-in user {username}'s password.
PUT /_security/user/_password Change my own password (PUT) · Change passwords #
Ask an LLM
“How can I change the password of the user I'm logged in as using PUT?”
“Can I update my own password without naming my username?”
Tell an agent
PUT my own password to {password}.
Change the logged-in user's password hash to {password_hash} with PUT.
POST /_security/user/_password Change my own password (POST) · Change passwords #
Ask an LLM
“Is there a POST version for changing my current user's password?”
“Can I POST a new password for myself and refresh right away?”
Tell an agent
POST a new password {password} for the current user.
Using POST, update my own password and refresh with {refresh}.
POST /_security/api_key/{ids}/_clear_cache Evict API keys from the cache · Clear the API key cache #
Ask an LLM
“How do I clear stale entries from the API key cache?”
“Can I evict only certain API key IDs from the cache?”
Tell an agent
Clear the API key cache for keys {ids}.
Evict API key {ids} from the cache.
POST /_security/privilege/{application}/_clear_cache Clear cached application privileges · Clear the privileges cache #
Ask an LLM
“How can I flush the application privilege cache for one app?”
“Does the cluster cache application privileges, and can I evict them?”
Tell an agent
Clear cached privileges for application {application}.
Evict the privilege cache entries of app {application}.
POST /_security/realm/{realms}/_clear_cache Clear the realm user cache · Clear the user cache #
Ask an LLM
“How do I evict users from a realm's user cache?”
“Can I clear the cache for just a few usernames in a realm?”
Tell an agent
Clear the user cache for realm {realms}.
Evict users {usernames} from realm {realms}'s cache.
POST /_security/role/{name}/_clear_cache Clear a role from the role cache · Clear the roles cache #
Ask an LLM
“How do I make the cluster forget a cached role definition?”
“Can I evict a specific role from the native role cache?”
Tell an agent
Clear the role cache for {name}.
Evict role {name} from the native role cache.
POST /_security/service/{namespace}/{service}/credential/token/{name}/_clear_cache Clear cached service account tokens · Clear service account token caches #
Ask an LLM
“How can I evict a service account token from the token caches?”
“Which caches hold service account tokens, and can I clear them?”
Tell an agent
Clear cached token {name} for service {namespace}/{service}.
Evict the service token cache entry {name} under {namespace}/{service}.
GET /_security/api_key Look up API key details · Get API key information #
Ask an LLM
“How do I see information about the API keys a user owns?”
“Can I filter API keys by realm or only show active ones?”
Tell an agent
Get details for API key {id}.
Show the active API keys owned by user {username}.
PUT /_security/api_key Create an API key (PUT) · Create an API key #
Ask an LLM
“How do I issue an API key for access without basic auth using PUT?”
“Can the API key I create with PUT have an expiration date?”
Tell an agent
PUT a new API key named {name}.
Create an API key {name} via PUT expiring in {expiration}.
POST /_security/api_key Create an API key (POST) · Create an API key #
Ask an LLM
“Is there a POST route for creating a new API key?”
“Can I restrict a POSTed API key with role descriptors?”
Tell an agent
POST a new API key called {name} limited to roles {role_descriptors}.
Mint an API key by POST with metadata {metadata}.
DELETE /_security/api_key Invalidate API keys · Invalidate API keys #
Ask an LLM
“How do I revoke API keys so they can no longer be used?”
“Can I invalidate all the API keys belonging to a particular user?”
Tell an agent destructive · confirm first
Invalidate API key {id}.
Revoke every API key owned by {username}.
POST /_security/cross_cluster/api_key Create a cross-cluster API key · Create a cross-cluster API key #
Ask an LLM
“How do I set up an API key for remote cluster access?”
“What access does a cross_cluster API key need to define?”
Tell an agent
Create cross-cluster API key {name} with access {access}.
Issue a remote-cluster key {name} with access {access} expiring {expiration}.
PUT /_security/service/{namespace}/{service}/credential/token/{name} Create a named service token (PUT) · Create a service account token #
Ask an LLM
“How can I create a named token for a service account with PUT?”
“Can I give a service account token a specific name?”
Tell an agent
PUT service token {name} for {namespace}/{service}.
Create a named credential {name} on service account {namespace}/{service} via PUT.
POST /_security/service/{namespace}/{service}/credential/token/{name} Create a named service token (POST) · Create a service account token #
Ask an LLM
“Is there a POST endpoint for creating a named service account token?”
“Can I POST a token for the fleet-server service account?”
Tell an agent
POST a token named {name} for service account {namespace}/{service}.
Using POST, add token {name} to {namespace}/{service} with refresh {refresh}.
DELETE /_security/service/{namespace}/{service}/credential/token/{name} Delete a service account token · Delete service account tokens #
Ask an LLM
“How do I remove a service account token I no longer need?”
“Can I delete one named token from a service account?”
Tell an agent destructive · confirm first
Delete service token {name} from {namespace}/{service}.
Remove the {name} credential of service account {namespace}/{service}.
POST /_security/service/{namespace}/{service}/credential/token Create an auto-named service token · Create a service account token #
Ask an LLM
“Can I create a service account token without picking a name?”
“How do I get a token generated for a service account automatically?”
Tell an agent
Generate a token with an auto-assigned name for {namespace}/{service}.
Create an unnamed service token on {namespace}/{service}.
POST /_security/delegate_pki Exchange a certificate chain for a token · Delegate PKI authentication #
Ask an LLM
“How do I trade an X509 certificate chain for an Elasticsearch access token?”
“Can a proxy delegate PKI authentication to the cluster?”
Tell an agent
Delegate PKI authentication with certificate chain {x509_certificate_chain}.
Get an access token for the client certificate chain {x509_certificate_chain}.
GET /_security/privilege/{application}/{name} Get one application privilege · Get application privileges #
Ask an LLM
“What does a specific named privilege of an application allow?”
“Can I fetch a single application privilege by name?”
Tell an agent
Get privilege {name} of application {application}.
Show the actions behind the {name} privilege in {application}.
DELETE /_security/privilege/{application}/{name} Delete an application privilege · Delete application privileges #
Ask an LLM
“How do I remove an application privilege that's no longer used?”
“Can I delete one privilege from an application?”
Tell an agent destructive · confirm first
Delete privilege {name} from application {application}.
Remove the {application} app's {name} privilege.
GET /_security/role_mapping/{name} Get one role mapping · Get role mappings #
Ask an LLM
“Which roles does a particular role mapping assign to users?”
“Can I inspect the rules of a single named role mapping?”
Tell an agent
Show role mapping {name}.
Get the rules and roles in mapping {name}.
PUT /_security/role_mapping/{name} Create or replace a role mapping (PUT) · Create or update role mappings #
Ask an LLM
“How do I map users from an LDAP group to roles with PUT?”
“Can a role mapping use role templates instead of fixed roles?”
Tell an agent
PUT role mapping {name} assigning roles {roles}.
Create mapping {name} with rules {rules} via PUT.
POST /_security/role_mapping/{name} Create or update a role mapping (POST) · Create or update role mappings #
Ask an LLM
“Is there a POST form for saving a role mapping?”
“Can I disable a role mapping without deleting it?”
Tell an agent
POST mapping {name} with enabled set to {enabled}.
Via POST, give mapping {name} the role templates {role_templates}.
DELETE /_security/role_mapping/{name} Delete a role mapping · Delete role mappings #
Ask an LLM
“How do I stop a role mapping from assigning roles permanently?”
“Can I delete a named role mapping?”
Tell an agent destructive · confirm first
Delete role mapping {name}.
Remove the {name} mapping from the cluster.
GET /_security/user/{username} Get a specific user · Get users #
Ask an LLM
“What roles and email does a given native user have?”
“Can I include the profile UID when fetching a user?”
Tell an agent
Get user {username}.
Show {username} including their profile UID.
PUT /_security/user/{username} Create or update a user (PUT) · Create or update users #
Ask an LLM
“How do I add a new native-realm user with a password using PUT?”
“Is a password required when I create a user?”
Tell an agent
PUT user {username} with password {password} and roles {roles}.
Create native user {username} with email {email} via PUT.
POST /_security/user/{username} Create or update a user (POST) · Create or update users #
Ask an LLM
“Is there a POST endpoint to add or edit a native user?”
“Can I change a user's full name and roles without resetting the password?”
Tell an agent
POST an update setting {username}'s full name to {full_name}.
Via POST, assign roles {roles} to user {username}.
DELETE /_security/user/{username} Delete a user · Delete users #
Ask an LLM
“How do I permanently remove a user from the native realm?”
“Can a deleted native user be refreshed out of search immediately?”
Tell an agent destructive · confirm first
Delete user {username}.
Remove native-realm user {username} with refresh {refresh}.
PUT /_security/user/{username}/_disable Disable a user (PUT) · Disable users #
Ask an LLM
“How do I block a native user from logging in with PUT without deleting them?”
“Are users enabled by default when they are created?”
Tell an agent
PUT a disable on user {username}.
Turn off login for {username} using PUT.
POST /_security/user/{username}/_disable Disable a user (POST) · Disable users #
Ask an LLM
“Is there a POST call to deactivate a native user?”
“Can I suspend a user account and keep its settings?”
Tell an agent
POST a request to disable {username}.
Suspend native user {username} via POST.
PUT /_security/profile/{uid}/_disable Hide a user profile (PUT) · Disable a user profile #
Ask an LLM
“How do I keep a user profile out of profile searches with PUT?”
“What does disabling a user profile actually change?”
Tell an agent
PUT a disable on user profile {uid}.
Hide profile {uid} from profile searches using PUT.
POST /_security/profile/{uid}/_disable Hide a user profile (POST) · Disable a user profile #
Ask an LLM
“Is there a POST call to disable a user profile?”
“Can I make a profile invisible to suggestions without deleting it?”
Tell an agent
POST to disable profile {uid}.
Via POST, deactivate user profile {uid}.
PUT /_security/user/{username}/_enable Re-enable a user (PUT) · Enable users #
Ask an LLM
“How do I let a disabled native user log in again using PUT?”
“Can I reactivate an account I previously disabled?”
Tell an agent
PUT an enable on user {username}.
Restore login access for {username} with PUT.
POST /_security/user/{username}/_enable Re-enable a user (POST) · Enable users #
Ask an LLM
“Is there a POST version of enabling a native user?”
“Can I turn a suspended user back on by POST?”
Tell an agent
POST to enable user {username}.
Reactivate native user {username} via POST.
PUT /_security/profile/{uid}/_enable Show a user profile again (PUT) · Enable a user profile #
Ask an LLM
“How do I make a disabled user profile searchable again with PUT?”
“Will enabling a profile bring it back into profile searches?”
Tell an agent
PUT an enable on user profile {uid}.
Make profile {uid} visible in searches using PUT.
POST /_security/profile/{uid}/_enable Show a user profile again (POST) · Enable a user profile #
Ask an LLM
“Is there a POST call to re-enable a user profile?”
“Can I restore a hidden profile by POST?”
Tell an agent
POST to enable profile {uid}.
Via POST, reactivate user profile {uid}.
GET /_security/enroll/kibana Enroll a Kibana instance · Enroll Kibana #
Ask an LLM
“How does a new Kibana instance get configured to talk to a secured cluster?”
“What does Kibana receive when it enrolls?”
Tell an agent
Enroll a new Kibana instance with the cluster.
Get the Kibana enrollment credentials and CA.
GET /_security/enroll/node Enroll a new node into the cluster · Enroll a node #
Ask an LLM
“How do I let a new node join a cluster that has security enabled?”
“What does a node get back when it enrolls?”
Tell an agent
Enroll a new node into my secured cluster.
Get the node enrollment keys and certificates.
GET /_security/privilege/_builtin List built-in cluster and index privileges · Get builtin privileges #
Ask an LLM
“Which cluster and index privileges are available in this version?”
“What built-in privilege names can I use in a role?”
Tell an agent
List the built-in cluster and index privileges.
Show every built-in privilege name this version supports.
GET /_security/privilege List all application privileges · Get application privileges #
Ask an LLM
“What application privileges are defined across all apps?”
“Can I see every application privilege in one call?”
Tell an agent
List all application privileges.
Show the privileges defined for every application.
PUT /_security/privilege Add application privileges (PUT) · Create or update application privileges #
Ask an LLM
“How do I define custom application privileges with PUT?”
“Can I create several application privileges at once?”
Tell an agent
PUT new application privileges and refresh with {refresh}.
Define application privileges via PUT.
POST /_security/privilege Add application privileges (POST) · Create or update application privileges #
Ask an LLM
“Is there a POST endpoint for saving application privileges?”
“Can I update existing application privilege actions by POST?”
Tell an agent
POST application privilege definitions.
Save app privileges by POST with refresh {refresh}.
GET /_security/privilege/{application} List one application's privileges · Get application privileges #
Ask an LLM
“Which privileges are defined for one particular application?”
“Can I get all privileges under a single app name?”
Tell an agent
List privileges for application {application}.
Show every privilege defined in app {application}.
GET /_security/role_mapping List all role mappings · Get role mappings #
Ask an LLM
“What role mappings are configured in my cluster?”
“Can I see every role mapping at once?”
Tell an agent
List all role mappings.
Show every configured role mapping and its rules.
GET /_security/service/{namespace}/{service} Get one service account · Get service accounts #
Ask an LLM
“What does a particular service account have permission to do?”
“Can I look up a service account by namespace and service name?”
Tell an agent
Get service account {namespace}/{service}.
Show the role descriptor for service {service} in {namespace}.
GET /_security/service/{namespace} List service accounts in a namespace · Get service accounts #
Ask an LLM
“Which service accounts exist in the elastic namespace?”
“Can I list service accounts for just one namespace?”
Tell an agent
List service accounts in namespace {namespace}.
Show all services under {namespace}.
GET /_security/service List all service accounts · Get service accounts #
Ask an LLM
“What service accounts are available across every namespace?”
“Can I get all service accounts in one request?”
Tell an agent
List all service accounts.
Show every service account the cluster knows about.
GET /_security/service/{namespace}/{service}/credential List a service account's credentials · Get service account credentials #
Ask an LLM
“What tokens exist for a given service account?”
“Can I see both index and file tokens for a service account?”
Tell an agent
List credentials for service account {namespace}/{service}.
Show tokens issued to {service} in {namespace}.
GET /_security/settings Read security index settings · Get security index settings #
Ask an LLM
“What settings are configured on the .security internal index?”
“Can I see the replica settings for the security indices?”
Tell an agent
Show the security index settings.
Get the .security index settings with master timeout {master_timeout}.
PUT /_security/settings Change security index settings · Update security index settings #
Ask an LLM
“How do I change the number of replicas on the security index?”
“Can I update settings for the security tokens index?”
Tell an agent
Update security index settings to {security}.
Set the security tokens index settings to {security_tokens}.
GET /_security/stats Get security usage stats · Get security stats #
Ask an LLM
“How much are security features being used across my nodes?”
“Can I gather security statistics from every node?”
Tell an agent
Show security usage statistics for all nodes.
Gather security stats across the cluster.
POST /_security/oauth2/token Get a bearer access token · Get a token #
Ask an LLM
“How do I get an OAuth2 bearer token instead of using basic auth?”
“Can I exchange a refresh token for a new access token?”
Tell an agent
Get an access token for {username} with password {password}.
Refresh my access token using refresh token {refresh_token}.
DELETE /_security/oauth2/token Invalidate access or refresh tokens · Invalidate a token #
Ask an LLM
“How do I revoke an access token before it expires?”
“Can I invalidate all tokens issued to a particular user?”
Tell an agent destructive · confirm first
Invalidate access token {token}.
Revoke refresh token {refresh_token}.
GET /_security/user List all users · Get users #
Ask an LLM
“Which users exist in the native realm and built-in set?”
“Can I list all users along with their profile UIDs?”
Tell an agent
List all native and built-in users.
Show every user with profile UID set to {with_profile_uid}.
GET /_security/user/_privileges See my own privileges · Get user privileges #
Ask an LLM
“What privileges does the logged-in user actually have?”
“Can I check my own cluster and index privileges?”
Tell an agent
Show the privileges of my logged-in user.
List my cluster, index and application privileges.
GET /_security/profile/{uid} Get a user profile by UID · Get a user profile #
Ask an LLM
“How do I fetch a user's profile using their unique profile ID?”
“Can I include application data when reading a profile?”
Tell an agent
Get user profile {uid}.
Show profile {uid} with data keys {data}.
POST /_security/api_key/grant Grant an API key for another user · Grant an API key #
Ask an LLM
“How can I create an API key on behalf of another user?”
“Which credentials do I need to grant someone an API key?”
Tell an agent
Grant API key {api_key} to {username} using grant type {grant_type}.
Create key {api_key} on behalf of the holder of access token {access_token} with grant {grant_type}.
GET /_security/user/_has_privileges Check my privileges (GET) · Check user privileges #
Ask an LLM
“Do I have read access on a given index right now?”
“How can I test my own cluster privileges with a GET request?”
Tell an agent
Check whether I have cluster privileges {cluster}.
Test my own access to indices {index} via GET.
POST /_security/user/_has_privileges Check my privileges (POST) · Check user privileges #
Ask an LLM
“Is there a POST form for checking the current user's privileges?”
“Can I verify my application privileges in one call?”
Tell an agent
POST a check of my application privileges {application}.
Using POST, verify I hold index privileges {index}.
GET /_security/user/{user}/_has_privileges Check another user's privileges (GET) · Check user privileges #
Ask an LLM
“Does a specific user have write access to an index?”
“How do I test a named user's cluster privileges with GET?”
Tell an agent
Check whether user {user} has cluster privileges {cluster}.
Test {user}'s access to indices {index} via GET.
POST /_security/user/{user}/_has_privileges Check another user's privileges (POST) · Check user privileges #
Ask an LLM
“Is there a POST endpoint to check privileges for a named user?”
“Can I check a named user's application privileges by POST?”
Tell an agent
POST a privilege check for {user} on applications {application}.
Using POST, verify user {user} holds index privileges {index}.
GET /_security/profile/_has_privileges Check privileges for profiles (GET) · Check user profile privileges #
Ask an LLM
“Do the users behind these profile IDs all have a given privilege?”
“How do I check profile privileges using GET?”
Tell an agent
Check whether profiles {uids} have privileges {privileges}.
Via GET, test privileges {privileges} for profile IDs {uids}.
POST /_security/profile/_has_privileges Check privileges for profiles (POST) · Check user profile privileges #
Ask an LLM
“Is there a POST version of the user profile privilege check?”
“Which of a set of profiles lack a required privilege?”
Tell an agent
POST a privilege check of {privileges} for profiles {uids}.
Find which of profiles {uids} are missing {privileges} using POST.
POST /_security/oidc/authenticate Complete OpenID Connect login · Authenticate OpenID Connect #
Ask an LLM
“How do I exchange an OIDC authentication response for an Elasticsearch token?”
“What state and nonce do I need to finish an OpenID Connect login?”
Tell an agent
Authenticate the OIDC response at {redirect_uri} with state {state} and nonce {nonce}.
Finish OpenID Connect login for realm {realm} with redirect {redirect_uri}, state {state}, nonce {nonce}.
POST /_security/oidc/logout Log out of OpenID Connect · Logout of OpenID Connect #
Ask an LLM
“How do I end an OIDC session and invalidate its tokens?”
“Does OpenID Connect logout also revoke the refresh token?”
Tell an agent destructive · confirm first
Log out of OIDC and invalidate token {token}.
End the OpenID Connect session for {token} and refresh token {refresh_token}.
POST /_security/oidc/prepare Start an OpenID Connect login · Prepare OpenID connect authentication #
Ask an LLM
“How do I build the OIDC authorization URL to redirect a user to?”
“Can I pass a login hint when preparing OpenID Connect authentication?”
Tell an agent
Prepare OIDC authentication for realm {realm}.
Build an OpenID Connect auth request for issuer {iss} with login hint {login_hint}.
GET /_security/_query/api_key Search API keys with a query (GET) · Find API keys with a query #
Ask an LLM
“How do I find API keys matching a query with pagination?”
“Can I aggregate API keys, for example by owner?”
Tell an agent
Search API keys matching {query}.
Find API keys with query {query}, returning {size} results.
POST /_security/_query/api_key Search API keys with a query (POST) · Find API keys with a query #
Ask an LLM
“Is there a POST endpoint for querying API keys?”
“Can I sort and page through API keys using search_after?”
Tell an agent
POST an API key query sorted by {sort}.
Page API key search results after {search_after} via POST.
GET /_security/_query/role Search roles with a query (GET) · Find roles with a query #
Ask an LLM
“How do I find roles that match a query, page by page?”
“Can I search roles by their metadata?”
Tell an agent
Search roles matching {query}.
Find roles with query {query} starting at {from}.
POST /_security/_query/role Search roles with a query (POST) · Find roles with a query #
Ask an LLM
“Is there a POST endpoint for querying roles?”
“Can I sort role search results by name?”
Tell an agent
POST a role query sorted by {sort}.
Return {size} roles from a role search via POST.
GET /_security/_query/user Search users with a query (GET) · Find users with a query #
Ask an LLM
“How do I find users that match a query, paginated?”
“Can I search users and include their profile UIDs?”
Tell an agent
Search users matching {query}.
Find users with query {query}, returning {size} of them.
POST /_security/_query/user Search users with a query (POST) · Find users with a query #
Ask an LLM
“Is there a POST endpoint for querying native users?”
“Can I sort user search results and page with search_after?”
Tell an agent
POST a user query sorted by {sort}.
Page through user search results after {search_after} via POST.
POST /_security/saml/authenticate Complete SAML login · Authenticate SAML #
Ask an LLM
“How do I submit a SAML response to get Elasticsearch tokens?”
“What request IDs must accompany a SAML authentication response?”
Tell an agent
Authenticate SAML response {content} for request IDs {ids}.
Consume the SAML response {content} in realm {realm} with IDs {ids}.
POST /_security/saml/complete_logout Verify a SAML logout response · Logout of SAML completely #
Ask an LLM
“How do I confirm the IdP's SAML logout response?”
“Can I complete a SAML logout from a redirect query string?”
Tell an agent
Complete SAML logout for realm {realm} with IDs {ids}.
Verify the logout response {query_string} in realm {realm} for IDs {ids}.
POST /_security/saml/invalidate Process an IdP-initiated SAML logout · Invalidate SAML #
Ask an LLM
“How do I handle a SAML LogoutRequest sent by the identity provider?”
“Which tokens get invalidated by a SAML LogoutRequest?”
Tell an agent destructive · confirm first
Invalidate SAML sessions from LogoutRequest {query_string}.
Consume the IdP logout request {query_string} for realm {realm}.
POST /_security/saml/logout Log out of SAML · Logout of SAML #
Ask an LLM
“How do I start a SAML logout for a user's session?”
“Does SAML logout return a redirect to the identity provider?”
Tell an agent destructive · confirm first
Log out of SAML and invalidate token {token}.
End the SAML session for {token} and refresh token {refresh_token}.
POST /_security/saml/prepare Start a SAML login · Prepare SAML authentication #
Ask an LLM
“How do I generate the SAML AuthnRequest URL for my identity provider?”
“Can I include a relay state when preparing SAML authentication?”
Tell an agent
Prepare SAML authentication for realm {realm}.
Build a SAML auth request for ACS {acs} with relay state {relay_state}.
GET /_security/saml/metadata/{realm_name} Generate SAML service provider metadata · Create SAML service provider metadata #
Ask an LLM
“How do I get the SAML metadata XML to give my identity provider?”
“Can I generate service provider metadata for a specific SAML realm?”
Tell an agent
Generate SAML SP metadata for realm {realm_name}.
Get the service provider metadata XML of {realm_name}.
GET /_security/profile/_suggest Suggest user profiles (GET) · Suggest a user profile #
Ask an LLM
“How do I find user profiles matching a partial name for autocomplete?”
“Can profile suggestions be boosted with hints?”
Tell an agent
Suggest user profiles matching {name}.
Suggest {size} profiles for {name} via GET.
POST /_security/profile/_suggest Suggest user profiles (POST) · Suggest a user profile #
Ask an LLM
“Is there a POST form of the user profile suggest API?”
“Can I favour certain UIDs or labels in profile suggestions?”
Tell an agent
POST a profile suggestion for {name} with hint {hint}.
Via POST, suggest profiles and return data keys {data}.
PUT /_security/api_key/{id} Update an existing API key · Update an API key #
Ask an LLM
“How do I change the role descriptors on an API key I already created?”
“Can I extend an existing API key's expiration?”
Tell an agent
Update API key {id} with role descriptors {role_descriptors}.
Change the expiration of key {id} to {expiration}.
PUT /_security/cross_cluster/api_key/{id} Update a cross-cluster API key · Update a cross-cluster API key #
Ask an LLM
“How do I change what a cross-cluster API key can access?”
“Can I update metadata on a remote cluster key?”
Tell an agent
Update cross-cluster key {id} with access {access}.
Set remote-cluster key {id}'s access to {access} and metadata to {metadata}.
PUT /_security/profile/{uid}/_data Update profile data (PUT) · Update user profile data #
Ask an LLM
“How do I store application data on a user profile with PUT?”
“Can I guard a profile update with sequence numbers?”
Tell an agent
PUT labels {labels} on profile {uid}.
Store data {data} on user profile {uid} using PUT.
POST /_security/profile/{uid}/_data Update profile data (POST) · Update user profile data #
Ask an LLM
“Is there a POST endpoint for updating user profile data?”
“Can I update a profile only if its primary term matches?”
Tell an agent
POST data {data} to profile {uid}.
Via POST, update profile {uid} if seq_no is {if_seq_no}.
GET /_ssl/certificates List the cluster's SSL certificates · Get SSL certificates #
Ask an LLM
“Which X.509 certificates is the cluster using for TLS?”
“When do my node certificates expire?”
Tell an agent
List the SSL certificates in use.
Show expiry dates for the cluster's TLS certificates.

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/elastic:elastic-security-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

elastic-security-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Elastic Security API
  version: '1.0'
  description: 'Operations tagged Security across 2 of this provider''s published API definitions: elastic-elasticsearch-openapi.yml, elasticsearch.json. Each path carries the servers of the definition it was published in.'
servers:
- url: https://{deployment}.es.{region}.cloud.es.io:9243
  description: Elastic Cloud deployment
  variables:
    deployment:
      default: my-deployment
      description: Deployment identifier
    region:
      default: us-east-1
      description: Cloud region
- url: http://localhost:9200
  description: Local Elasticsearch
tags:


# --- truncated at 32 KB (1229 KB total) ---
# Full source: https://artifacts.apis.io/elastic/openapi/elastic-security-api-openapi.yml