2022-04-11 20:04:38 +00:00
|
|
|
const API_VERSION = "latest";
|
|
|
|
|
2016-09-13 19:50:37 +00:00
|
|
|
export default {
|
2022-04-11 20:04:38 +00:00
|
|
|
ACTIVITIES: `/${API_VERSION}/fleet/activities`,
|
|
|
|
CHANGE_PASSWORD: `/${API_VERSION}/fleet/change_password`,
|
|
|
|
CONFIG: `/${API_VERSION}/fleet/config`,
|
2021-04-14 16:52:15 +00:00
|
|
|
CONFIRM_EMAIL_CHANGE: (token: string): string => {
|
2022-04-11 20:04:38 +00:00
|
|
|
return `/${API_VERSION}/fleet/email/change/${token}`;
|
2017-02-24 15:08:59 +00:00
|
|
|
},
|
2022-04-11 20:04:38 +00:00
|
|
|
DEVICE_USER_DETAILS: `/${API_VERSION}/fleet/device`,
|
2022-07-19 19:28:06 +00:00
|
|
|
DOWNLOAD_INSTALLER: `/${API_VERSION}/fleet/download_installer`,
|
2021-04-14 09:20:56 +00:00
|
|
|
ENABLE_USER: (id: number): string => {
|
2022-04-11 20:04:38 +00:00
|
|
|
return `/${API_VERSION}/fleet/users/${id}/enable`;
|
2017-01-19 19:55:42 +00:00
|
|
|
},
|
2022-04-11 20:04:38 +00:00
|
|
|
FORGOT_PASSWORD: `/${API_VERSION}/fleet/forgot_password`,
|
|
|
|
GLOBAL_ENROLL_SECRETS: `/${API_VERSION}/fleet/spec/enroll_secret`,
|
|
|
|
GLOBAL_POLICIES: `/${API_VERSION}/fleet/policies`,
|
|
|
|
GLOBAL_SCHEDULE: `/${API_VERSION}/fleet/schedule`,
|
|
|
|
HOST_SUMMARY: `/${API_VERSION}/fleet/host_summary`,
|
|
|
|
HOSTS: `/${API_VERSION}/fleet/hosts`,
|
|
|
|
HOSTS_COUNT: `/${API_VERSION}/fleet/hosts/count`,
|
|
|
|
HOSTS_DELETE: `/${API_VERSION}/fleet/hosts/delete`,
|
|
|
|
HOSTS_REPORT: `/${API_VERSION}/fleet/hosts/report`,
|
|
|
|
HOSTS_TRANSFER: `/${API_VERSION}/fleet/hosts/transfer`,
|
|
|
|
HOSTS_TRANSFER_BY_FILTER: `/${API_VERSION}/fleet/hosts/transfer/filter`,
|
|
|
|
INVITES: `/${API_VERSION}/fleet/invites`,
|
|
|
|
LABELS: `/${API_VERSION}/fleet/labels`,
|
2021-04-14 09:20:56 +00:00
|
|
|
LABEL_HOSTS: (id: number): string => {
|
2022-04-11 20:04:38 +00:00
|
|
|
return `/${API_VERSION}/fleet/labels/${id}/hosts`;
|
2016-10-27 16:14:30 +00:00
|
|
|
},
|
2022-04-11 20:04:38 +00:00
|
|
|
LOGIN: `/${API_VERSION}/fleet/login`,
|
|
|
|
LOGOUT: `/${API_VERSION}/fleet/logout`,
|
|
|
|
MACADMINS: `/${API_VERSION}/fleet/macadmins`,
|
|
|
|
ME: `/${API_VERSION}/fleet/me`,
|
|
|
|
OS_VERSIONS: `/${API_VERSION}/fleet/os_versions`,
|
|
|
|
OSQUERY_OPTIONS: `/${API_VERSION}/fleet/spec/osquery_options`,
|
|
|
|
PACKS: `/${API_VERSION}/fleet/packs`,
|
|
|
|
PERFORM_REQUIRED_PASSWORD_RESET: `/${API_VERSION}/fleet/perform_required_password_reset`,
|
|
|
|
QUERIES: `/${API_VERSION}/fleet/queries`,
|
|
|
|
RESET_PASSWORD: `/${API_VERSION}/fleet/reset_password`,
|
|
|
|
RUN_QUERY: `/${API_VERSION}/fleet/queries/run`,
|
|
|
|
SCHEDULE_QUERY: `/${API_VERSION}/fleet/packs/schedule`,
|
|
|
|
SCHEDULED_QUERIES: (packId: number): string => {
|
|
|
|
return `/${API_VERSION}/fleet/packs/${packId}/scheduled`;
|
2016-12-21 17:25:54 +00:00
|
|
|
},
|
2022-04-11 20:04:38 +00:00
|
|
|
SETUP: `/v1/setup`, // not a typo - hasn't been updated yet
|
|
|
|
SOFTWARE: `/${API_VERSION}/fleet/software`,
|
2022-04-20 16:46:45 +00:00
|
|
|
SSO: `/v1/fleet/sso`,
|
2022-04-11 20:04:38 +00:00
|
|
|
STATUS_LABEL_COUNTS: `/${API_VERSION}/fleet/host_summary`,
|
|
|
|
STATUS_LIVE_QUERY: `/${API_VERSION}/fleet/status/live_query`,
|
|
|
|
STATUS_RESULT_STORE: `/${API_VERSION}/fleet/status/result_store`,
|
|
|
|
TARGETS: `/${API_VERSION}/fleet/targets`,
|
2021-11-12 14:27:05 +00:00
|
|
|
TEAM_POLICIES: (teamId: number): string => {
|
2022-04-11 20:04:38 +00:00
|
|
|
return `/${API_VERSION}/fleet/teams/${teamId}/policies`;
|
2021-10-19 18:13:18 +00:00
|
|
|
},
|
2021-11-12 14:27:05 +00:00
|
|
|
TEAM_SCHEDULE: (teamId: number): string => {
|
2022-04-11 20:04:38 +00:00
|
|
|
return `/${API_VERSION}/fleet/teams/${teamId}/schedule`;
|
2021-08-05 14:48:00 +00:00
|
|
|
},
|
2022-04-11 20:04:38 +00:00
|
|
|
TEAMS: `/${API_VERSION}/fleet/teams`,
|
2021-11-15 21:16:06 +00:00
|
|
|
TEAMS_AGENT_OPTIONS: (teamId: number): string => {
|
2022-04-11 20:04:38 +00:00
|
|
|
return `/${API_VERSION}/fleet/teams/${teamId}/agent_options`;
|
2021-11-15 21:16:06 +00:00
|
|
|
},
|
|
|
|
TEAMS_ENROLL_SECRETS: (teamId: number): string => {
|
2022-04-11 20:04:38 +00:00
|
|
|
return `/${API_VERSION}/fleet/teams/${teamId}/secrets`;
|
2021-11-15 21:16:06 +00:00
|
|
|
},
|
2021-05-14 14:14:19 +00:00
|
|
|
TEAMS_MEMBERS: (teamId: number): string => {
|
2022-04-11 20:04:38 +00:00
|
|
|
return `/${API_VERSION}/fleet/teams/${teamId}/users`;
|
2021-04-29 13:47:33 +00:00
|
|
|
},
|
2021-06-10 14:00:03 +00:00
|
|
|
TEAMS_TRANSFER_HOSTS: (teamId: number): string => {
|
2022-04-11 20:04:38 +00:00
|
|
|
return `/${API_VERSION}/fleet/teams/${teamId}/hosts`;
|
2021-05-13 14:30:42 +00:00
|
|
|
},
|
2021-10-19 18:13:18 +00:00
|
|
|
UPDATE_USER_ADMIN: (id: number): string => {
|
2022-04-11 20:04:38 +00:00
|
|
|
return `/${API_VERSION}/fleet/users/${id}/admin`;
|
2021-10-19 18:13:18 +00:00
|
|
|
},
|
|
|
|
USER_SESSIONS: (id: number): string => {
|
2022-04-11 20:04:38 +00:00
|
|
|
return `/${API_VERSION}/fleet/users/${id}/sessions`;
|
2021-10-19 18:13:18 +00:00
|
|
|
},
|
2022-04-11 20:04:38 +00:00
|
|
|
USERS: `/${API_VERSION}/fleet/users`,
|
|
|
|
USERS_ADMIN: `/${API_VERSION}/fleet/users/admin`,
|
|
|
|
VERSION: `/${API_VERSION}/fleet/version`,
|
2016-09-13 19:50:37 +00:00
|
|
|
};
|