[SIEM][Detection Engine] Critical blocker, adds need REST prefix for cloud (#55481)

## Summary

* Adds needed `/` to the beginning of cloud requests from Kibana -> ES

### Checklist

Use ~~strikethroughs~~ to remove checklist items you don't feel are applicable to this PR.

~~- [ ] This was checked for cross-browser compatibility, [including a check against IE11](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#cross-browser-compatibility)~~

~~- [ ] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/master/packages/kbn-i18n/README.md)~~

~~- [ ] [Documentation](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#writing-documentation) was added for features that require explanation or tutorials~~

~~- [ ] [Unit or functional tests](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#cross-browser-compatibility) were updated or added to match the most common scenarios~~

~~- [ ] This was checked for [keyboard-only and screenreader accessibility](https://developer.mozilla.org/en-US/docs/Learn/Tools_and_testing/Cross_browser_testing/Accessibility#Accessibility_testing_checklist)~~

### For maintainers

~~- [ ] This was checked for breaking API changes and was [labeled appropriately](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#release-notes-process)~~

- [x] This includes a feature addition or change that requires a release note and was [labeled appropriately](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#release-notes-process)
This commit is contained in:
Frank Hassanabad 2020-01-21 17:04:18 -07:00 committed by GitHub
parent fca83a67c8
commit ddb1ca02e7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 5 additions and 5 deletions

View file

@ -19,7 +19,7 @@ export const createBootstrapIndex = async (
index: string
): Promise<unknown> => {
return callWithRequest('transport.request', {
path: `${index}-000001`,
path: `/${index}-000001`,
method: 'PUT',
body: {
aliases: {

View file

@ -11,7 +11,7 @@ export const deletePolicy = async (
policy: string
): Promise<unknown> => {
return callWithRequest('transport.request', {
path: `_ilm/policy/${policy}`,
path: `/_ilm/policy/${policy}`,
method: 'DELETE',
});
};

View file

@ -12,7 +12,7 @@ export const getPolicyExists = async (
): Promise<boolean> => {
try {
await callWithRequest('transport.request', {
path: `_ilm/policy/${policy}`,
path: `/_ilm/policy/${policy}`,
method: 'GET',
});
// Return true that there exists a policy which is not 404 or some error

View file

@ -12,7 +12,7 @@ export const setPolicy = async (
body: unknown
): Promise<unknown> => {
return callWithRequest('transport.request', {
path: `_ilm/policy/${policy}`,
path: `/_ilm/policy/${policy}`,
method: 'PUT',
body,
});

View file

@ -11,7 +11,7 @@ export const readPrivileges = async (
index: string
): Promise<unknown> => {
return callWithRequest('transport.request', {
path: `_security/user/_has_privileges`,
path: '/_security/user/_has_privileges',
method: 'POST',
body: {
cluster: [