RUM source map API
editRUM source map API
editThis endpoint is only compatible with the APM integration for Elastic Agent.
A source map allows minified files to be mapped back to original source code — allowing you to maintain the speed advantage of minified code, without losing the ability to quickly and easily debug your application.
For best results, uploading source maps should become a part of your deployment procedure, and not something you only do when you see unhelpful errors. That’s because uploading source maps after errors happen won’t make old errors magically readable — errors must occur again for source mapping to occur.
The following APIs are available:
Max payload size
editKibana’s maximum payload size is 1mb.
If you attempt to upload a source map that exceeds the max payload size, you will get a 413
error.
Before uploading source maps that exceed this default, change the maximum payload size allowed by Kibana
with the server.maxPayload
variable.
How to use APM APIs
editExpand for required headers, privileges, and usage details
Interact with APM APIs using cURL or another API tool. All APM APIs are Kibana APIs, not Elasticsearch APIs; because of this, the Kibana dev tools console cannot be used to interact with APM APIs.
For all APM APIs, you must use a request header.
Supported headers are Authorization
, kbn-xsrf
, and Content-Type
.
-
Authorization: ApiKey {credentials}
-
Kibana supports token-based authentication with the Elasticsearch API key service. The API key returned by the Elasticsearch create API key API can be used by sending a request with an
Authorization
header that has a value ofApiKey
followed by the{credentials}
, where{credentials}
is the base64 encoding ofid
andapi_key
joined by a colon.Alternatively, you can create a user and use their username and password to authenticate API access:
-u $USER:$PASSWORD
.Whether using
Authorization: ApiKey {credentials}
, or-u $USER:$PASSWORD
, users interacting with APM APIs must have sufficient privileges. -
kbn-xsrf: true
-
By default, you must use
kbn-xsrf
for all API calls, except in the following scenarios:-
The API endpoint uses the
GET
orHEAD
operations -
The path is allowed using the
server.xsrf.allowlist
setting -
XSRF protections are disabled using the
server.xsrf.disableProtection
setting
-
The API endpoint uses the
-
Content-Type: application/json
-
Applicable only when you send a payload in the API request.
Kibana API requests and responses use JSON.
Typically, if you include the
kbn-xsrf
header, you must also include theContent-Type
header.