You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## Alternate API key creation methods [apm-configure-api-key-alternative]
164
+
## Alternate API key creation method [apm-configure-api-key-alternative]
165
165
166
166
```{applies_to}
167
167
stack:
168
168
serverless: unavailable
169
169
```
170
170
171
-
API keys can also be created and validated outside of {{kib}}:
172
-
173
-
* [APM Server API key workflow](#apm-create-api-key-workflow-apm-server)
174
-
* [{{es}} API key workflow](#apm-create-api-key-workflow-es)
175
-
176
-
### APM Server API key workflow [apm-create-api-key-workflow-apm-server]
177
-
178
-
This API creation method only works with the APM Server binary.
179
-
180
-
::::{admonition} Deprecated in 8.6.0.
181
-
:class: warning
182
-
183
-
Users should create API Keys through {{kib}} or the {{es}} REST API
184
-
::::
185
-
186
-
APM Server provides a command line interface for creating, retrieving, invalidating, and verifying API keys. Keys created using this method can only be used for communication with APM Server.
If the API key has the requested privileges, the response will look similar to this:
255
-
256
-
```console-result
257
-
Authorized for privilege "event:write"...: Yes
258
-
Authorized for privilege "config_agent:read"...: Yes
259
-
```
260
-
261
-
To invalidate an API key, use the `invalidate` subcommand. Due to {{es}} caching, there may be a delay between when this subcommand is executed and when it takes effect.
262
-
263
-
The following example invalidates the `java-001` API key.
264
-
265
-
```sh
266
-
apm-server apikey invalidate --name java-001
267
-
```
268
-
269
-
The response will look similar to this:
270
-
271
-
```console-result
272
-
Invalidated keys ... qT4tz28B1g59zC3uAXfW
273
-
Error count ........ 0
274
-
```
275
-
276
-
A full list of `apikey` subcommands and flags is available in the [API key command reference](/solutions/observability/apm/apm-server-command-reference.md#apm-apikey-command).
277
-
278
-
### {{es}} API key workflow [apm-create-api-key-workflow-es]
279
-
280
171
It is also possible to create API keys using the {{es}} [create API key API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-create-api-key).
0 commit comments