DELETE /api/apm/settings/agent-configuration

Spaces method and path for this operation:

delete /s/{space_id}/api/apm/settings/agent-configuration

Refer to Spaces for more information.

Delete an existing agent configuration. You must have all privileges for the APM and User Experience feature in Kibana. When successful, the configuration is removed and, if Fleet is enabled, APM package policies are synchronized accordingly.

Headers

  • elastic-api-version string Required

    The version of the API to use

    Value is 2023-10-31. Default value is 2023-10-31.

  • kbn-xsrf string Required

    A required header to protect against CSRF attacks

application/json

Body Required

  • service object Required

    Service

    Hide service attributes Show service attributes object
    • environment string

      The environment of the service.

    • name string

      The name of the service.

Responses

  • 200 application/json

    Successful response

    Hide response attribute Show response attribute object
    • result string

      Result

  • 400 application/json

    Bad Request response

    Hide response attributes Show response attributes object
    • error string

      Error type

    • message string

      Error message

    • statusCode number

      Error status code

  • 401 application/json

    Unauthorized response

    Hide response attributes Show response attributes object
    • error string

      Error type

    • message string

      Error message

    • statusCode number

      Error status code

  • 403 application/json

    Forbidden response

    Hide response attributes Show response attributes object
    • error string

      Error type

    • message string

      Error message

    • statusCode number

      Error status code

  • 404 application/json

    Not found response

    Hide response attributes Show response attributes object
    • error string

      Error type

    • message string

      Error message

    • statusCode number

      Error status code

DELETE /api/apm/settings/agent-configuration
curl \
 --request DELETE 'https://<KIBANA_URL>/api/apm/settings/agent-configuration' \
 --header "Authorization: $API_KEY" \
 --header "Content-Type: application/json" \
 --header "elastic-api-version: 2023-10-31" \
 --header "kbn-xsrf: true" \
 --data '{"service":{"environment":"production","name":"frontend"}}'
Request example
Run `DELETE /api/apm/settings/agent-configuration` to delete a configuration.
{
  "service": {
    "environment": "production",
    "name": "frontend"
  }
}
Response examples (200)
An example of a successful response from `DELETE /api/apm/settings/agent-configuration`.
{
  "result": "deleted"
}
Response examples (400)
An example of a 400 Bad Request response, returned when the request payload or query parameters fail validation.
{
  "error": "Bad Request",
  "message": "[request body]: expected value of type [string] but got [undefined]",
  "statusCode": 400
}
Response examples (401)
An example of a 401 Unauthorized response, returned when the request is missing valid authentication credentials.
{
  "error": "Unauthorized",
  "message": "[security_exception]: missing authentication credentials for REST request",
  "statusCode": 401
}
Response examples (403)
An example of a 403 Forbidden response, returned when the authenticated user lacks the required APM and User Experience privileges.
{
  "error": "Forbidden",
  "message": "Insufficient privileges to perform this action. The APM and User Experience feature requires `all` privileges.",
  "statusCode": 403
}
Response examples (404)
An example of a 404 Not Found response, returned when the requested resource does not exist or the feature is not available on the current deployment.
{
  "error": "Not Found",
  "message": "Not Found",
  "statusCode": 404
}