Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[8.16] [Synthetics] Fix location remove via public API !! (elastic#19…
…9170) (elastic#199326) # Backport This will backport the following commits from `main` to `8.16`: - [[Synthetics] Fix location remove via public API !! (elastic#199170)](elastic#199170) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Shahzad","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-11-07T14:37:55Z","message":"[Synthetics] Fix location remove via public API !! (elastic#199170)\n\n## Summary\r\n\r\nFixes https://github.com/elastic/kibana/issues/199108\r\n\r\nFix location remove via public API !!\r\n\r\n### Testing \r\n\r\nCreate a Monitor that is configured in two locations:\r\n```\r\nPOST kbn:/api/synthetics/monitors\r\n{\r\n \"type\": \"http\",\r\n \"name\": \"healthcheck\",\r\n \"url\": \"https://www.elastic.co\",\r\n \"locations\": [\"united_kingdom\", \"germany\"]\r\n}\r\n```\r\nExtract from the response the config_id\r\nUpdate the monitor to remove one location\r\n```\r\nPUT kbn:/api/synthetics/monitors/<config-id>\r\n{\r\n \"type\": \"http\",\r\n \"name\": \"healthcheck\",\r\n \"url\": \"https://www.elastic.co\",\r\n \"locations\": [\"united_kingdom\"]\r\n}\r\n```\r\n\r\n\r\nThis should remove Germany location from monitor !!","sha":"4a341055cf374761f4b1b247d702f9e759b03d92","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","ci:project-deploy-observability","Team:obs-ux-management","v8.16.0","backport:version","v8.17.0"],"title":"[Synthetics] Fix location remove via public API !!","number":199170,"url":"https://github.com/elastic/kibana/pull/199170","mergeCommit":{"message":"[Synthetics] Fix location remove via public API !! (elastic#199170)\n\n## Summary\r\n\r\nFixes https://github.com/elastic/kibana/issues/199108\r\n\r\nFix location remove via public API !!\r\n\r\n### Testing \r\n\r\nCreate a Monitor that is configured in two locations:\r\n```\r\nPOST kbn:/api/synthetics/monitors\r\n{\r\n \"type\": \"http\",\r\n \"name\": \"healthcheck\",\r\n \"url\": \"https://www.elastic.co\",\r\n \"locations\": [\"united_kingdom\", \"germany\"]\r\n}\r\n```\r\nExtract from the response the config_id\r\nUpdate the monitor to remove one location\r\n```\r\nPUT kbn:/api/synthetics/monitors/<config-id>\r\n{\r\n \"type\": \"http\",\r\n \"name\": \"healthcheck\",\r\n \"url\": \"https://www.elastic.co\",\r\n \"locations\": [\"united_kingdom\"]\r\n}\r\n```\r\n\r\n\r\nThis should remove Germany location from monitor !!","sha":"4a341055cf374761f4b1b247d702f9e759b03d92"}},"sourceBranch":"main","suggestedTargetBranches":["8.16","8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/199170","number":199170,"mergeCommit":{"message":"[Synthetics] Fix location remove via public API !! (elastic#199170)\n\n## Summary\r\n\r\nFixes https://github.com/elastic/kibana/issues/199108\r\n\r\nFix location remove via public API !!\r\n\r\n### Testing \r\n\r\nCreate a Monitor that is configured in two locations:\r\n```\r\nPOST kbn:/api/synthetics/monitors\r\n{\r\n \"type\": \"http\",\r\n \"name\": \"healthcheck\",\r\n \"url\": \"https://www.elastic.co\",\r\n \"locations\": [\"united_kingdom\", \"germany\"]\r\n}\r\n```\r\nExtract from the response the config_id\r\nUpdate the monitor to remove one location\r\n```\r\nPUT kbn:/api/synthetics/monitors/<config-id>\r\n{\r\n \"type\": \"http\",\r\n \"name\": \"healthcheck\",\r\n \"url\": \"https://www.elastic.co\",\r\n \"locations\": [\"united_kingdom\"]\r\n}\r\n```\r\n\r\n\r\nThis should remove Germany location from monitor !!","sha":"4a341055cf374761f4b1b247d702f9e759b03d92"}},{"branch":"8.16","label":"v8.16.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.x","label":"v8.17.0","branchLabelMappingKey":"^v8.17.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Shahzad <[email protected]>
- Loading branch information