[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:
parent
fca83a67c8
commit
ddb1ca02e7
|
@ -19,7 +19,7 @@ export const createBootstrapIndex = async (
|
||||||
index: string
|
index: string
|
||||||
): Promise<unknown> => {
|
): Promise<unknown> => {
|
||||||
return callWithRequest('transport.request', {
|
return callWithRequest('transport.request', {
|
||||||
path: `${index}-000001`,
|
path: `/${index}-000001`,
|
||||||
method: 'PUT',
|
method: 'PUT',
|
||||||
body: {
|
body: {
|
||||||
aliases: {
|
aliases: {
|
||||||
|
|
|
@ -11,7 +11,7 @@ export const deletePolicy = async (
|
||||||
policy: string
|
policy: string
|
||||||
): Promise<unknown> => {
|
): Promise<unknown> => {
|
||||||
return callWithRequest('transport.request', {
|
return callWithRequest('transport.request', {
|
||||||
path: `_ilm/policy/${policy}`,
|
path: `/_ilm/policy/${policy}`,
|
||||||
method: 'DELETE',
|
method: 'DELETE',
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
|
@ -12,7 +12,7 @@ export const getPolicyExists = async (
|
||||||
): Promise<boolean> => {
|
): Promise<boolean> => {
|
||||||
try {
|
try {
|
||||||
await callWithRequest('transport.request', {
|
await callWithRequest('transport.request', {
|
||||||
path: `_ilm/policy/${policy}`,
|
path: `/_ilm/policy/${policy}`,
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
});
|
});
|
||||||
// Return true that there exists a policy which is not 404 or some error
|
// Return true that there exists a policy which is not 404 or some error
|
||||||
|
|
|
@ -12,7 +12,7 @@ export const setPolicy = async (
|
||||||
body: unknown
|
body: unknown
|
||||||
): Promise<unknown> => {
|
): Promise<unknown> => {
|
||||||
return callWithRequest('transport.request', {
|
return callWithRequest('transport.request', {
|
||||||
path: `_ilm/policy/${policy}`,
|
path: `/_ilm/policy/${policy}`,
|
||||||
method: 'PUT',
|
method: 'PUT',
|
||||||
body,
|
body,
|
||||||
});
|
});
|
||||||
|
|
|
@ -11,7 +11,7 @@ export const readPrivileges = async (
|
||||||
index: string
|
index: string
|
||||||
): Promise<unknown> => {
|
): Promise<unknown> => {
|
||||||
return callWithRequest('transport.request', {
|
return callWithRequest('transport.request', {
|
||||||
path: `_security/user/_has_privileges`,
|
path: '/_security/user/_has_privileges',
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
body: {
|
body: {
|
||||||
cluster: [
|
cluster: [
|
||||||
|
|
Loading…
Reference in a new issue