[8.10] [IndexManagement] Use internal base path for API (#164665) (#164685)

# Backport

This will backport the following commits from `main` to `8.10`:
- [[IndexManagement] Use internal base path for API
(#164665)](https://github.com/elastic/kibana/pull/164665)

<!--- Backport version: 8.9.7 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Marco
Liberati","email":"dej611@users.noreply.github.com"},"sourceCommit":{"committedDate":"2023-08-24T10:30:21Z","message":"[IndexManagement]
Use internal base path for API (#164665)\n\n## Summary\r\n\r\nThe
current API is returning 404 as the correct path is internal. This\r\nPR
fixes this
problem.","sha":"86224d4cf60bfe2ae84c9b55bfaedc1476213a99","branchLabelMapping":{"^v8.11.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Feature:Index
Management","Team:Deployment
Management","v8.10.0","v8.11.0"],"number":164665,"url":"https://github.com/elastic/kibana/pull/164665","mergeCommit":{"message":"[IndexManagement]
Use internal base path for API (#164665)\n\n## Summary\r\n\r\nThe
current API is returning 404 as the correct path is internal. This\r\nPR
fixes this
problem.","sha":"86224d4cf60bfe2ae84c9b55bfaedc1476213a99"}},"sourceBranch":"main","suggestedTargetBranches":["8.10"],"targetPullRequestStates":[{"branch":"8.10","label":"v8.10.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.11.0","labelRegex":"^v8.11.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/164665","number":164665,"mergeCommit":{"message":"[IndexManagement]
Use internal base path for API (#164665)\n\n## Summary\r\n\r\nThe
current API is returning 404 as the correct path is internal. This\r\nPR
fixes this
problem.","sha":"86224d4cf60bfe2ae84c9b55bfaedc1476213a99"}}]}]
BACKPORT-->

Co-authored-by: Marco Liberati <dej611@users.noreply.github.com>
This commit is contained in:
Kibana Machine 2023-08-24 07:38:41 -04:00 committed by GitHub
parent bc592cf72a
commit ac108c0338
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -7,7 +7,7 @@
import { HttpSetup } from '@kbn/core/public';
import { sendRequest, SendRequestResponse } from '../shared_imports';
import { API_BASE_PATH } from '../../common/constants';
import { INTERNAL_API_BASE_PATH } from '../../common/constants';
import { SerializedEnrichPolicy } from '../../common/types';
export interface PublicApiServiceSetup {
@ -33,7 +33,7 @@ export class PublicApiService {
*/
getAllEnrichPolicies() {
return sendRequest(this.http, {
path: `${API_BASE_PATH}/enrich_policies`,
path: `${INTERNAL_API_BASE_PATH}/enrich_policies`,
method: 'get',
});
}