OpenAPI docs for APM UI APIs (#197946)

## Summary

Closes #197582

This PR adds missing OpenAPI specification for APM UI APIs.

Documentation specs have been divided into files per path. See
[readme](88e55f92f9/x-pack/plugins/observability_solution/apm/docs/openapi/apm/README.md)
for specific information.
This commit is contained in:
Milosz Marcinkowski 2024-10-31 14:59:19 +01:00 committed by GitHub
parent 7c9bf00aa2
commit e0838147bd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
51 changed files with 6320 additions and 378 deletions

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -22,7 +22,7 @@ const { REPO_ROOT } = require('@kbn/repo-info');
`${REPO_ROOT}/packages/core/saved-objects/docs/openapi/bundled.yaml`,
// Observability Solution
`${REPO_ROOT}/x-pack/plugins/observability_solution/apm/docs/openapi/apm.yaml`,
`${REPO_ROOT}/x-pack/plugins/observability_solution/apm/docs/openapi/apm/bundled.yaml`,
`${REPO_ROOT}/x-pack/plugins/observability_solution/slo/docs/openapi/slo/bundled.yaml`,
// Security solution

View file

@ -20,7 +20,7 @@ const { REPO_ROOT } = require('@kbn/repo-info');
`${REPO_ROOT}/packages/core/saved-objects/docs/openapi/bundled_serverless.yaml`,
// Observability Solution
`${REPO_ROOT}/x-pack/plugins/observability_solution/apm/docs/openapi/apm.yaml`,
`${REPO_ROOT}/x-pack/plugins/observability_solution/apm/docs/openapi/apm/bundled.yaml`,
`${REPO_ROOT}/x-pack/plugins/observability_solution/slo/docs/openapi/slo/bundled.yaml`,
// Security solution

View file

@ -1,186 +0,0 @@
openapi: 3.0.0
info:
title: APM UI
version: 1.0.0
tags:
- name: APM agent keys
description: >
Configure APM agent keys to authorize requests from APM agents to the APM Server.
- name: APM annotations
description: >
Annotate visualizations in the APM app with significant events.
Annotations enable you to easily see how events are impacting the performance of your applications.
paths:
/api/apm/agent_keys:
post:
summary: Create an APM agent key
description: Create a new agent key for APM.
operationId: createAgentKey
tags:
- APM agent keys
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
name:
type: string
privileges:
type: array
items:
type: string
enum:
- event:write
- config_agent:read
responses:
"200":
description: Agent key created successfully
content:
application/json:
schema:
type: object
properties:
api_key:
type: string
expiration:
type: integer
format: int64
id:
type: string
name:
type: string
encoded:
type: string
/api/apm/services/{serviceName}/annotation/search:
get:
summary: Search for annotations
description: Search for annotations related to a specific service.
operationId: getAnnotation
tags:
- APM annotations
parameters:
- name: serviceName
in: path
required: true
description: The name of the service
schema:
type: string
- name: environment
in: query
required: false
description: The environment to filter annotations by
schema:
type: string
- name: start
in: query
required: false
description: The start date for the search
schema:
type: string
- name: end
in: query
required: false
description: The end date for the search
schema:
type: string
responses:
"200":
description: Successful response
content:
application/json:
schema:
type: object
properties:
annotations:
type: array
items:
type: object
properties:
type:
type: string
enum:
- version
id:
type: string
"@timestamp":
type: number
text:
type: string
/api/apm/services/{serviceName}/annotation:
post:
summary: Create a service annotation
description: Create a new annotation for a specific service.
operationId: createAnnotation
tags:
- APM annotations
parameters:
- name: serviceName
in: path
required: true
description: The name of the service
schema:
type: string
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
'@timestamp':
type: string
service:
type: object
properties:
version:
type: string
environment:
type: string
message:
type: string
tags:
type: array
items:
type: string
responses:
'200':
description: Annotation created successfully
content:
application/json:
schema:
type: object
properties:
_id:
type: string
_index:
type: string
_source:
type: object
properties:
annotation:
type: string
tags:
type: array
items:
type: string
message:
type: string
service:
type: object
properties:
name:
type: string
environment:
type: string
version:
type: string
event:
type: object
properties:
created:
type: string
'@timestamp':
type: string

View file

@ -2,16 +2,26 @@
This directory contains [OpenAPI specifications](https://swagger.io/specification/) for the [APM app API](https://www.elastic.co/guide/en/kibana/current/apm-api.html) in Kibana.
Included:
# OpenAPI (Experimental)
* [Agent Configuration API](https://www.elastic.co/guide/en/kibana/current/agent-config-api.html)
* [Annotation API](https://www.elastic.co/guide/en/kibana/current/apm-annotation-api.html)
The current self-contained spec file is available as `bundled.json` or `bundled.yaml` and can be used for online tools like those found at <https://openapi.tools/>.
This spec is experimental and may be incomplete or change later.
Not included:
A guide about the openApi specification can be found at [https://swagger.io/docs/specification/about/](https://swagger.io/docs/specification/about/).
* [APM agent Key API](https://www.elastic.co/guide/en/kibana/current/agent-key-api.html)
* [RUM source map API](https://www.elastic.co/guide/en/kibana/current/rum-sourcemap-api.html)
## The `openapi` folder
The specifications for the included APIs are in the apm.yaml file in this directory.
* `entrypoint.yaml` is the overview file which pulls together all the paths and components.
* [Paths](paths/README.md): Defines each endpoint. A path can have one operation per http method.
* [Components](components/README.md): Defines reusable components.
These specifications are manually written. The missing ones will be included in the future.
## Tools
Generate the `bundled` files by running the following commands:
```bash
npx @redocly/cli bundle entrypoint.yaml --output bundled.yaml --ext yaml
npx @redocly/cli bundle entrypoint.yaml --output bundled.json --ext json
```
Then join these files with the rest of the Kibana APIs per `oas_docs/README.md`

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,7 @@
Reusable components
===========
- `examples` - reusable [Example objects](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.2.md#example-object)
- `headers` - reusable [Header objects](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#header-object)
- `parameters` - reusable [Parameter objects](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#parameter-object)
- `schemas` - reusable [Schema objects](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.2.md#schema-object)

View file

@ -0,0 +1,9 @@
description: The version of the API to use
in: header
name: elastic-api-version
required: true
schema:
default: '2023-10-31'
enum:
- '2023-10-31'
type: string

View file

@ -0,0 +1,7 @@
description: A required header to protect against CSRF attacks
in: header
name: kbn-xsrf
required: true
schema:
example: 'true'
type: string

View file

@ -0,0 +1,14 @@
type: object
properties:
statusCode:
type: number
example: 400
description: Error status code
error:
type: string
example: Not Found
description: Error type
message:
type: string
example: Not Found
description: Error message

View file

@ -0,0 +1,13 @@
type: object
properties:
statusCode:
type: number
example: 401
description: Error status code
error:
type: string
example: Unauthorized
description: Error type
message:
type: string
description: Error message

View file

@ -0,0 +1,13 @@
type: object
properties:
statusCode:
type: number
example: 403
description: Error status code
error:
type: string
example: Forbidden
description: Error type
message:
type: string
description: Error message

View file

@ -0,0 +1,14 @@
type: object
properties:
statusCode:
type: number
example: 404
description: Error status code
error:
type: string
example: Not Found
description: Error type
message:
type: string
example: Not Found
description: Error message

View file

@ -0,0 +1,13 @@
type: object
properties:
statusCode:
type: number
example: 500
description: Error status code
error:
type: string
example: Internal Server Error
description: Error type
message:
type: string
description: Error message

View file

@ -0,0 +1,14 @@
type: object
properties:
statusCode:
type: number
example: 501
description: Error status code
error:
type: string
example: Not Implemented
description: Error type
message:
type: string
example: Not Implemented
description: Error message

View file

@ -0,0 +1,12 @@
type: object
required:
- service
- settings
properties:
agent_name:
type: string
description: Agent name
service:
$ref: 'service_object.yaml'
settings:
$ref: 'settings_object.yaml'

View file

@ -0,0 +1,27 @@
type: object
required:
- service
- settings
- '@timestamp'
- etag
description: Agent configuration
properties:
agent_name:
type: string
description: Agent name
service:
$ref: 'service_object.yaml'
settings:
$ref: 'settings_object.yaml'
'@timestamp':
type: number
example: 1730194190636
description: Timestamp
applied_by_agent:
type: boolean
example: true
description: Applied by agent
etag:
type: string
example: 0bc3b5ebf18fba8163fe4c96f491e3767a358f85
description: Etag

View file

@ -0,0 +1,7 @@
type: object
properties:
configurations:
type: array
description: Agent configuration
items:
$ref: 'agent_configuration_object.yaml'

View file

@ -0,0 +1,16 @@
type: object
required:
- name
- privileges
properties:
name:
type: string
description: Agent name
privileges:
type: array
description: Privileges configuration
items:
type: string
enum:
- event:write
- config_agent:read

View file

@ -0,0 +1,22 @@
type: object
properties:
agentKey:
type: object
description: Agent key
required:
- id
- name
- api_key
- encoded
properties:
expiration:
type: integer
format: int64
id:
type: string
name:
type: string
api_key:
type: string
encoded:
type: string

View file

@ -0,0 +1,18 @@
type: object
properties:
annotations:
type: array
description: Annotations
items:
type: object
properties:
type:
type: string
enum:
- version
id:
type: string
"@timestamp":
type: number
text:
type: string

View file

@ -0,0 +1,38 @@
type: object
properties:
type:
type: string
description: Type
identifier:
type: string
description: Identifier
relative_url:
type: string
description: Relative URL
created:
type: string
description: Created date
id:
type: string
description: Identifier
compressionAlgorithm:
type: string
description: Compression Algorithm
decodedSha256:
type: string
description: Decoded SHA-256
decodedSize:
type: number
description: Decoded size
encodedSha256:
type: string
description: Encoded SHA-256
encodedSize:
type: number
description: Encoded size
encryptionAlgorithm:
type: string
description: Encryption Algorithm
packageName:
type: string
description: Package name

View file

@ -0,0 +1,26 @@
type: object
required:
- '@timestamp'
- service
properties:
'@timestamp':
type: string
description: Timestamp
service:
type: object
description: Service
required:
- version
properties:
version:
type: string
environment:
type: string
message:
type: string
description: Message
tags:
type: array
description: Tags
items:
type: string

View file

@ -0,0 +1,41 @@
type: object
properties:
_id:
type: string
description: Identifier
_index:
type: string
description: Index
_source:
type: object
description: Response
properties:
annotation:
type: object
properties:
type:
type: string
title:
type: string
tags:
type: array
items:
type: string
message:
type: string
service:
type: object
properties:
name:
type: string
environment:
type: string
version:
type: string
event:
type: object
properties:
created:
type: string
'@timestamp':
type: string

View file

@ -0,0 +1,5 @@
type: object
properties:
result:
type: string
description: Result

View file

@ -0,0 +1,15 @@
type: object
required:
- service
properties:
service:
$ref: 'service_object.yaml'
etag:
type: string
description: If etags match then `applied_by_agent` field will be set to `true`
example: 0bc3b5ebf18fba8163fe4c96f491e3767a358f85
mark_as_applied_by_agent:
type: boolean
description: |
`markAsAppliedByAgent=true` means "force setting it to true regardless of etag".
This is needed for Jaeger agent that doesn't have etags

View file

@ -0,0 +1,13 @@
type: object
properties:
_index:
type: string
description: Index
_id:
type: string
description: Identifier
_score:
type: number
description: Score
_source:
$ref: 'agent_configuration_object.yaml'

View file

@ -0,0 +1,6 @@
type: object
properties:
agentName:
type: string
description: Agent name
example: nodejs

View file

@ -0,0 +1,9 @@
type: object
properties:
name:
type: string
example: ALL_OPTION_VALUE
description: Service environment name
alreadyConfigured:
type: boolean
description: Already configured

View file

@ -0,0 +1,7 @@
type: object
properties:
environments:
type: array
description: Service environment list
items:
$ref: 'service_environment_object.yaml'

View file

@ -0,0 +1,11 @@
type: object
description: Service
properties:
name:
type: string
example: node
description: Name
environment:
type: string
example: prod
description: Environment

View file

@ -0,0 +1,4 @@
type: object
description: Agent configuration settings
additionalProperties:
type: string

View file

@ -0,0 +1,8 @@
allOf:
- type: object
required:
- id
properties:
id:
type: string
- $ref: 'agent_configuration_object.yaml'

View file

@ -0,0 +1,38 @@
type: object
properties:
artifacts:
type: array
description: Artifacts
items:
allOf:
- type: object
properties:
body:
type: object
properties:
serviceName:
type: string
serviceVersion:
type: string
bundleFilepath:
type: string
sourceMap:
type: object
properties:
version:
type: number
file:
type: string
sources:
type: array
items:
type: string
sourcesContent:
type: array
items:
type: string
mappings:
type: string
sourceRoot:
type: string
- $ref: 'base_source_map_object.yaml'

View file

@ -0,0 +1,22 @@
type: object
required:
- service_name
- service_version
- bundle_filepath
- sourcemap
properties:
service_name:
type: string
description: The name of the service that the service map should apply to.
service_version:
type: string
description: The version of the service that the service map should apply to.
bundle_filepath:
type: string
description: The absolute path of the final bundle as used in the web application.
sourcemap:
type: string
format: binary
description: |
The source map. String or file upload. It must follow the
[source map revision 3 proposal](https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k).

View file

@ -0,0 +1,6 @@
allOf:
- type: object
properties:
body:
type: string
- $ref: 'base_source_map_object.yaml'

View file

@ -0,0 +1,42 @@
openapi: 3.0.2
info:
title: APM UI
version: 1.0.0
tags:
- name: APM agent keys
description: >
Configure APM agent keys to authorize requests from APM agents to the APM Server.
- name: APM agent configuration
description: >
Adjust APM agent configuration without need to redeploy your application.
- name: APM sourcemaps
description: Configure APM source maps.
- name: APM annotations
description: >
Annotate visualizations in the APM app with significant events.
Annotations enable you to easily see how events are impacting the performance of your applications.
- name: APM server schema
description: Create APM fleet server schema.
paths:
/api/apm/agent_keys:
$ref: 'paths/api@apm@agent_keys.yaml'
/api/apm/services/{serviceName}/annotation/search:
$ref: 'paths/api@apm@services@{service_name}@annotation@search.yaml'
/api/apm/services/{serviceName}/annotation:
$ref: 'paths/api@apm@services@{service_name}@annotation.yaml'
/api/apm/settings/agent-configuration:
$ref: 'paths/api@apm@settings@agent_configuration.yaml'
/api/apm/settings/agent-configuration/view:
$ref: 'paths/api@apm@settings@agent_configuration@view.yaml'
/api/apm/settings/agent-configuration/search:
$ref: 'paths/api@apm@settings@agent_configuration@search.yaml'
/api/apm/settings/agent-configuration/environments:
$ref: 'paths/api@apm@settings@agent_configuration@environments.yaml'
/api/apm/settings/agent-configuration/agent_name:
$ref: 'paths/api@apm@settings@agent_configuration@agent_name.yaml'
/api/apm/sourcemaps:
$ref: 'paths/api@apm@sourcemaps.yaml'
/api/apm/sourcemaps/{id}:
$ref: 'paths/api@apm@sourcemaps@{id}.yaml'
/api/apm/fleet/apm_server_schema:
$ref: 'paths/api@apm@fleet@apm_server_schema.yaml'

View file

@ -0,0 +1,10 @@
Paths
=====
Each path definition for which there is a specification exists within this folder.
These files currently use the following conventions:
* path separator token (e.g. `@`) is included in the file name
* path parameter (e.g. `{example}`) is included in the file name
* there is one file per path; each file can contain multiple operations

View file

@ -0,0 +1,46 @@
post:
summary: Create an APM agent key
description: Create a new agent key for APM.
operationId: createAgentKey
tags:
- APM agent keys
parameters:
- $ref: '../components/headers/elastic_api_version.yaml'
- $ref: '../components/headers/kbn_xsrf.yaml'
requestBody:
required: true
content:
application/json:
schema:
$ref: '../components/schemas/agent_keys_object.yaml'
responses:
"200":
description: Agent key created successfully
content:
application/json:
schema:
$ref: '../components/schemas/agent_keys_response.yaml'
'400':
description: Bad Request response
content:
application/json:
schema:
$ref: '../components/schemas/400_response.yaml'
'401':
description: Unauthorized response
content:
application/json:
schema:
$ref: '../components/schemas/401_response.yaml'
'403':
description: Forbidden response
content:
application/json:
schema:
$ref: '../components/schemas/403_response.yaml'
'500':
description: Internal Server Error response
content:
application/json:
schema:
$ref: '../components/schemas/500_response.yaml'

View file

@ -0,0 +1,53 @@
post:
summary: Save APM server schema
operationId: saveApmServerSchema
tags:
- APM server schema
parameters:
- $ref: '../components/headers/elastic_api_version.yaml'
- $ref: '../components/headers/kbn_xsrf.yaml'
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
schema:
type: object
description: Schema object
additionalProperties: true
example:
foo: "bar"
responses:
'200':
description: Successful response
content:
application/json:
schema:
type: object
additionalProperties: false
'400':
description: Bad Request response
content:
application/json:
schema:
$ref: '../components/schemas/400_response.yaml'
'401':
description: Unauthorized response
content:
application/json:
schema:
$ref: '../components/schemas/401_response.yaml'
'403':
description: Forbidden response
content:
application/json:
schema:
$ref: '../components/schemas/403_response.yaml'
'404':
description: Not found response
content:
application/json:
schema:
$ref: '../components/schemas/404_response.yaml'

View file

@ -0,0 +1,52 @@
post:
summary: Create a service annotation
description: Create a new annotation for a specific service.
operationId: createAnnotation
tags:
- APM annotations
parameters:
- $ref: '../components/headers/elastic_api_version.yaml'
- $ref: '../components/headers/kbn_xsrf.yaml'
- name: serviceName
in: path
required: true
description: The name of the service
schema:
type: string
requestBody:
required: true
content:
application/json:
schema:
$ref: '../components/schemas/create_annotation_object.yaml'
responses:
'200':
description: Annotation created successfully
content:
application/json:
schema:
$ref: '../components/schemas/create_annotation_response.yaml'
'400':
description: Bad Request response
content:
application/json:
schema:
$ref: '../components/schemas/400_response.yaml'
'401':
description: Unauthorized response
content:
application/json:
schema:
$ref: '../components/schemas/401_response.yaml'
'403':
description: Forbidden response
content:
application/json:
schema:
$ref: '../components/schemas/403_response.yaml'
'404':
description: Not found response
content:
application/json:
schema:
$ref: '../components/schemas/404_response.yaml'

View file

@ -0,0 +1,57 @@
get:
summary: Search for annotations
description: Search for annotations related to a specific service.
operationId: getAnnotation
tags:
- APM annotations
parameters:
- $ref: '../components/headers/elastic_api_version.yaml'
- name: serviceName
in: path
required: true
description: The name of the service
schema:
type: string
- name: environment
in: query
required: false
description: The environment to filter annotations by
schema:
type: string
- name: start
in: query
required: false
description: The start date for the search
schema:
type: string
- name: end
in: query
required: false
description: The end date for the search
schema:
type: string
responses:
"200":
description: Successful response
content:
application/json:
schema:
$ref: '../components/schemas/annotation_search_response.yaml'
'400':
description: Bad Request response
content:
application/json:
schema:
$ref: '../components/schemas/400_response.yaml'
'401':
description: Unauthorized response
content:
application/json:
schema:
$ref: '../components/schemas/401_response.yaml'
'500':
description: Internal Server Error response
content:
application/json:
schema:
$ref: '../components/schemas/500_response.yaml'

View file

@ -0,0 +1,128 @@
get:
summary: Get a list of agent configurations
operationId: getAgentConfigurations
tags:
- APM agent configuration
parameters:
- $ref: '../components/headers/elastic_api_version.yaml'
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '../components/schemas/agent_configurations_response.yaml'
'400':
description: Bad Request response
content:
application/json:
schema:
$ref: '../components/schemas/400_response.yaml'
'401':
description: Unauthorized response
content:
application/json:
schema:
$ref: '../components/schemas/401_response.yaml'
'404':
description: Not found response
content:
application/json:
schema:
$ref: '../components/schemas/404_response.yaml'
delete:
summary: Delete agent configuration
operationId: deleteAgentConfiguration
tags:
- APM agent configuration
parameters:
- $ref: '../components/headers/elastic_api_version.yaml'
- $ref: '../components/headers/kbn_xsrf.yaml'
requestBody:
required: true
content:
application/json:
schema:
$ref: '../components/schemas/service_object.yaml'
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '../components/schemas/delete_agent_configurations_response.yaml'
'400':
description: Bad Request response
content:
application/json:
schema:
$ref: '../components/schemas/400_response.yaml'
'401':
description: Unauthorized response
content:
application/json:
schema:
$ref: '../components/schemas/401_response.yaml'
'403':
description: Forbidden response
content:
application/json:
schema:
$ref: '../components/schemas/403_response.yaml'
'404':
description: Not found response
content:
application/json:
schema:
$ref: '../components/schemas/404_response.yaml'
put:
summary: Create or update agent configuration
operationId: createUpdateAgentConfiguration
tags:
- APM agent configuration
parameters:
- $ref: '../components/headers/elastic_api_version.yaml'
- $ref: '../components/headers/kbn_xsrf.yaml'
- name: overwrite
in: query
description: If the config exists ?overwrite=true is required
schema:
type: boolean
requestBody:
required: true
content:
application/json:
schema:
$ref: '../components/schemas/agent_configuration_intake_object.yaml'
responses:
'200':
description: Successful response
content:
application/json:
schema:
type: object
additionalProperties: false
'400':
description: Bad Request response
content:
application/json:
schema:
$ref: '../components/schemas/400_response.yaml'
'401':
description: Unauthorized response
content:
application/json:
schema:
$ref: '../components/schemas/401_response.yaml'
'403':
description: Forbidden response
content:
application/json:
schema:
$ref: '../components/schemas/403_response.yaml'
'404':
description: Not found response
content:
application/json:
schema:
$ref: '../components/schemas/404_response.yaml'

View file

@ -0,0 +1,40 @@
get:
summary: Get agent name for service
description: Retrieve `agentName` for a service.
operationId: getAgentNameForService
tags:
- APM agent configuration
parameters:
- $ref: '../components/headers/elastic_api_version.yaml'
- name: serviceName
in: query
description: The name of the service
required: true
schema:
type: string
example: node
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '../components/schemas/service_agent_name_response.yaml'
'400':
description: Bad Request response
content:
application/json:
schema:
$ref: '../components/schemas/400_response.yaml'
'401':
description: Unauthorized response
content:
application/json:
schema:
$ref: '../components/schemas/401_response.yaml'
'404':
description: Not found response
content:
application/json:
schema:
$ref: '../components/schemas/404_response.yaml'

View file

@ -0,0 +1,37 @@
get:
summary: Get environments for service
operationId: getEnvironmentsForService
tags:
- APM agent configuration
parameters:
- $ref: '../components/headers/elastic_api_version.yaml'
- name: serviceName
in: query
description: The name of the service
schema:
type: string
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '../components/schemas/service_environments_response.yaml'
'400':
description: Bad Request response
content:
application/json:
schema:
$ref: '../components/schemas/400_response.yaml'
'401':
description: Unauthorized response
content:
application/json:
schema:
$ref: '../components/schemas/401_response.yaml'
'404':
description: Not found response
content:
application/json:
schema:
$ref: '../components/schemas/404_response.yaml'

View file

@ -0,0 +1,41 @@
post:
summary: Lookup single agent configuration
description: |
This endpoint allows to search for single agent configuration and update 'applied_by_agent' field.
operationId: searchSingleConfiguration
tags:
- APM agent configuration
parameters:
- $ref: '../components/headers/elastic_api_version.yaml'
- $ref: '../components/headers/kbn_xsrf.yaml'
requestBody:
required: true
content:
application/json:
schema:
$ref: '../components/schemas/search_agent_configuration_object.yaml'
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '../components/schemas/search_agent_configuration_response.yaml'
'400':
description: Bad Request response
content:
application/json:
schema:
$ref: '../components/schemas/400_response.yaml'
'401':
description: Unauthorized response
content:
application/json:
schema:
$ref: '../components/schemas/401_response.yaml'
'404':
description: Not found response
content:
application/json:
schema:
$ref: '../components/schemas/404_response.yaml'

View file

@ -0,0 +1,44 @@
get:
summary: Get single agent configuration
operationId: getSingleAgentConfiguration
tags:
- APM agent configuration
parameters:
- $ref: '../components/headers/elastic_api_version.yaml'
- name: name
in: query
description: Service name
schema:
type: string
example: node
- name: environment
in: query
description: Service environment
schema:
type: string
example: prod
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '../components/schemas/single_agent_configuration_response.yaml'
'400':
description: Bad Request response
content:
application/json:
schema:
$ref: '../components/schemas/400_response.yaml'
'401':
description: Unauthorized response
content:
application/json:
schema:
$ref: '../components/schemas/401_response.yaml'
'404':
description: Not found response
content:
application/json:
schema:
$ref: '../components/schemas/404_response.yaml'

View file

@ -0,0 +1,101 @@
get:
summary: Get source maps
description: Returns an array of Fleet artifacts, including source map uploads.
operationId: getSourceMaps
tags:
- APM sourcemaps
parameters:
- $ref: '../components/headers/elastic_api_version.yaml'
- name: page
in: query
description: Page number
schema:
type: number
- name: perPage
in: query
description: Number of records per page
schema:
type: number
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '../components/schemas/source_maps_response.yaml'
'400':
description: Bad Request response
content:
application/json:
schema:
$ref: '../components/schemas/400_response.yaml'
'401':
description: Unauthorized response
content:
application/json:
schema:
$ref: '../components/schemas/401_response.yaml'
'500':
description: Internal Server Error response
content:
application/json:
schema:
$ref: '../components/schemas/500_response.yaml'
'501':
description: Not Implemented response
content:
application/json:
schema:
$ref: '../components/schemas/501_response.yaml'
post:
summary: Upload source map
description: Upload a source map for a specific service and version.
operationId: uploadSourceMap
tags:
- APM sourcemaps
parameters:
- $ref: '../components/headers/elastic_api_version.yaml'
- $ref: '../components/headers/kbn_xsrf.yaml'
requestBody:
required: true
content:
multipart/form-data:
schema:
$ref: '../components/schemas/upload_source_map_object.yaml'
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '../components/schemas/upload_source_maps_response.yaml'
'400':
description: Bad Request response
content:
application/json:
schema:
$ref: '../components/schemas/400_response.yaml'
'401':
description: Unauthorized response
content:
application/json:
schema:
$ref: '../components/schemas/401_response.yaml'
'403':
description: Forbidden response
content:
application/json:
schema:
$ref: '../components/schemas/403_response.yaml'
'500':
description: Internal Server Error response
content:
application/json:
schema:
$ref: '../components/schemas/500_response.yaml'
'501':
description: Not Implemented response
content:
application/json:
schema:
$ref: '../components/schemas/501_response.yaml'

View file

@ -0,0 +1,53 @@
delete:
summary: Delete source map
description: Delete a previously uploaded source map.
operationId: deleteSourceMap
tags:
- APM sourcemaps
parameters:
- $ref: '../components/headers/elastic_api_version.yaml'
- $ref: '../components/headers/kbn_xsrf.yaml'
- name: id
in: path
description: Source map identifier
required: true
schema:
type: string
responses:
'200':
description: Successful response
content:
application/json:
schema:
type: object
additionalProperties: false
'400':
description: Bad Request response
content:
application/json:
schema:
$ref: '../components/schemas/400_response.yaml'
'401':
description: Unauthorized response
content:
application/json:
schema:
$ref: '../components/schemas/401_response.yaml'
'403':
description: Forbidden response
content:
application/json:
schema:
$ref: '../components/schemas/403_response.yaml'
'500':
description: Internal Server Error response
content:
application/json:
schema:
$ref: '../components/schemas/500_response.yaml'
'501':
description: Not Implemented response
content:
application/json:
schema:
$ref: '../components/schemas/501_response.yaml'