Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Fleet] Make API responses consistent #119494

Merged
merged 34 commits into from
Dec 8, 2021
Merged
Show file tree
Hide file tree
Changes from 21 commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
36d275b
make apis consistent
juliaElastic Nov 23, 2021
83275b3
UI and test fixes
juliaElastic Nov 23, 2021
bc0662f
test fixes
juliaElastic Nov 24, 2021
174476c
Merge branch 'main' into make-api-consistent
kibanamachine Nov 29, 2021
b0d66b8
Merge branch 'main' into make-api-consistent
kibanamachine Nov 30, 2021
d04bbc9
fixed test
juliaElastic Nov 30, 2021
d655d66
fix tests
juliaElastic Nov 30, 2021
ecf57de
fix test
juliaElastic Dec 1, 2021
a9cce4c
removed deprecated shared_id from openapi spec
juliaElastic Dec 1, 2021
fb3de3b
added back list prop as deprecated
juliaElastic Dec 1, 2021
f375d17
Merge branch 'main' into make-api-consistent
kibanamachine Dec 2, 2021
117ba90
renamed apis with hyphens
juliaElastic Dec 2, 2021
5ffacf8
openapi update
juliaElastic Dec 2, 2021
bda9ad2
fix checks
juliaElastic Dec 3, 2021
9fd739d
Merge branch 'main' into make-api-consistent
kibanamachine Dec 3, 2021
ff7690f
fix test
juliaElastic Dec 3, 2021
9b3d478
renamed epm api path and response
juliaElastic Dec 3, 2021
edad68b
fix tests
juliaElastic Dec 3, 2021
7c1e098
fix ml
juliaElastic Dec 3, 2021
34200ce
Merge branch 'main' into make-api-consistent
kibanamachine Dec 6, 2021
ab7f561
moved splitPkgKey
juliaElastic Dec 6, 2021
be085f4
fixed edit package policy page
juliaElastic Dec 6, 2021
62473c6
fixed storybook
juliaElastic Dec 6, 2021
e73c8ce
Merge branch 'main' into make-api-consistent
juliaElastic Dec 6, 2021
127eeed
fix prettier after conflict
juliaElastic Dec 6, 2021
877b040
fix tests
juliaElastic Dec 6, 2021
839d545
fix tests
juliaElastic Dec 6, 2021
d7930e7
fix tests
juliaElastic Dec 6, 2021
ad53433
fix test
juliaElastic Dec 7, 2021
1c60944
fix test
juliaElastic Dec 7, 2021
154322e
added back semver validation
juliaElastic Dec 7, 2021
9aa9a61
fix test
juliaElastic Dec 7, 2021
023af3e
pkgVersion optional
juliaElastic Dec 7, 2021
d0d095d
fix tests
juliaElastic Dec 8, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 22 additions & 9 deletions x-pack/plugins/fleet/common/constants/routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ export const LIMITED_CONCURRENCY_ROUTE_TAG = 'ingest:limited-concurrency';
// EPM API routes
const EPM_PACKAGES_MANY = `${EPM_API_ROOT}/packages`;
const EPM_PACKAGES_BULK = `${EPM_PACKAGES_MANY}/_bulk`;
const EPM_PACKAGES_ONE = `${EPM_PACKAGES_MANY}/{pkgkey}`;
const EPM_PACKAGES_FILE = `${EPM_PACKAGES_MANY}/{pkgName}/{pkgVersion}`;
const EPM_PACKAGES_ONE_DEPRECATED = `${EPM_PACKAGES_MANY}/{pkgkey}`;
const EPM_PACKAGES_ONE = `${EPM_PACKAGES_MANY}/{pkgName}/{pkgVersion}`;
export const EPM_API_ROUTES = {
BULK_INSTALL_PATTERN: EPM_PACKAGES_BULK,
LIST_PATTERN: EPM_PACKAGES_MANY,
Expand All @@ -28,9 +28,13 @@ export const EPM_API_ROUTES = {
INSTALL_FROM_REGISTRY_PATTERN: EPM_PACKAGES_ONE,
INSTALL_BY_UPLOAD_PATTERN: EPM_PACKAGES_MANY,
DELETE_PATTERN: EPM_PACKAGES_ONE,
FILEPATH_PATTERN: `${EPM_PACKAGES_FILE}/{filePath*}`,
FILEPATH_PATTERN: `${EPM_PACKAGES_ONE}/{filePath*}`,
CATEGORIES_PATTERN: `${EPM_API_ROOT}/categories`,
STATS_PATTERN: `${EPM_PACKAGES_MANY}/{pkgName}/stats`,

INFO_PATTERN_DEPRECATED: EPM_PACKAGES_ONE_DEPRECATED,
INSTALL_FROM_REGISTRY_PATTERN_DEPRECATED: EPM_PACKAGES_ONE_DEPRECATED,
DELETE_PATTERN_DEPRECATED: EPM_PACKAGES_ONE_DEPRECATED,
};

// Data stream API routes
Expand Down Expand Up @@ -79,7 +83,9 @@ export const SETTINGS_API_ROUTES = {
// App API routes
export const APP_API_ROUTES = {
CHECK_PERMISSIONS_PATTERN: `${API_ROOT}/check-permissions`,
GENERATE_SERVICE_TOKEN_PATTERN: `${API_ROOT}/service-tokens`,
GENERATE_SERVICE_TOKEN_PATTERN: `${API_ROOT}/service_tokens`,
// deprecated since 8.0
GENERATE_SERVICE_TOKEN_PATTERN_DEPRECATED: `${API_ROOT}/service-tokens`,
};

// Agent API routes
Expand All @@ -95,16 +101,23 @@ export const AGENT_API_ROUTES = {
BULK_UNENROLL_PATTERN: `${API_ROOT}/agents/bulk_unenroll`,
REASSIGN_PATTERN: `${API_ROOT}/agents/{agentId}/reassign`,
BULK_REASSIGN_PATTERN: `${API_ROOT}/agents/bulk_reassign`,
STATUS_PATTERN: `${API_ROOT}/agent-status`,
STATUS_PATTERN: `${API_ROOT}/agent_status`,
// deprecated since 8.0
STATUS_PATTERN_DEPRECATED: `${API_ROOT}/agent-status`,
UPGRADE_PATTERN: `${API_ROOT}/agents/{agentId}/upgrade`,
BULK_UPGRADE_PATTERN: `${API_ROOT}/agents/bulk_upgrade`,
};

export const ENROLLMENT_API_KEY_ROUTES = {
CREATE_PATTERN: `${API_ROOT}/enrollment-api-keys`,
LIST_PATTERN: `${API_ROOT}/enrollment-api-keys`,
INFO_PATTERN: `${API_ROOT}/enrollment-api-keys/{keyId}`,
DELETE_PATTERN: `${API_ROOT}/enrollment-api-keys/{keyId}`,
CREATE_PATTERN: `${API_ROOT}/enrollment_api_keys`,
LIST_PATTERN: `${API_ROOT}/enrollment_api_keys`,
INFO_PATTERN: `${API_ROOT}/enrollment_api_keys/{keyId}`,
DELETE_PATTERN: `${API_ROOT}/enrollment_api_keys/{keyId}`,
// deprecated since 8.0
CREATE_PATTERN_DEPRECATED: `${API_ROOT}/enrollment-api-keys`,
LIST_PATTERN_DEPRECATED: `${API_ROOT}/enrollment-api-keys`,
INFO_PATTERN_DEPRECATED: `${API_ROOT}/enrollment-api-keys/{keyId}`,
DELETE_PATTERN_DEPRECATED: `${API_ROOT}/enrollment-api-keys/{keyId}`,
};

// Agents setup API routes
Expand Down
Loading