fleet/frontend/services/entities/api_endpoints.ts
Nico 578f35292c
[Frontend] Create API-only users that only have access to customer-defined Fleet API endpoints (#43281)
**Related issue:** Resolves #42879

* Full UI for API-only user management: create/edit flows, fleet/role
assignment, selectable API endpoint permissions, and one-time API key
display.
* New reusable components: API user form, endpoint selector, API access
section, and API key presentation.
* Admin workflow switched from in-page modals to dedicated pages and
streamlined action dropdown navigation.
* Layout and styling refinements for user management, team lists, and
dropdown behaviors.

---------

Co-authored-by: Juan Fernandez <juan@fleetdm.com>
2026-04-20 09:18:02 -04:00

20 lines
489 B
TypeScript

import sendRequest from "services";
import endpoints from "utilities/endpoints";
import { IApiEndpoint } from "interfaces/api_endpoint";
export interface IListApiEndpointsResponse {
api_endpoints: IApiEndpoint[];
}
export default {
loadAll: async (): Promise<IApiEndpoint[]> => {
const { REST_API_ENDPOINTS } = endpoints;
const response: IListApiEndpointsResponse = await sendRequest(
"GET",
REST_API_ENDPOINTS
);
return response.api_endpoints;
},
};