mirror of
https://github.com/empayre/fleet.git
synced 2024-11-07 01:15:22 +00:00
0b7747bef0
Replaces (and appropriately refactors) a number of endpoints that were removed long ago when we decided to kill the UI with the fleetctl release. We turned out not to do this, and now need to restore these missing endpoints. This is not a straight up replacement of the existing code because of refactoring to the DB schemas that was also done in the migration. Most of the replaced code was removed in #1670 and #1686. Fixes #1811, fixes #1810 |
||
---|---|---|
.. | ||
entities | ||
base.js | ||
endpoints.js | ||
helpers.js | ||
helpers.tests.js | ||
index.js | ||
index.tests.js | ||
README.md | ||
request.js | ||
websockets.js |
Kolide API Client
The Kolide API Client is used for communicating with the Kolide API. Kolide has a number of entities (hosts, labels, packs, queries, users, etc), all of which have CRUD methods to perform on a specific entity or collection of entities.
Entities are assigned to the API Client in the constructor
function. Each
entity's methods can be found in the /frontend/kolide/entities
directory.
The CRUD methods that are typically implemented in the API client are as follows:
create
- The
create
method is used for creating a new entity. The input parameter is typically an object containing the attributes for the new entity.
destroy
- The
destroy
method is used for deleting an entity. Then input parameter is typically the entity to be deleted.
load
- The
load
method is used for loading a single entity. The input parameter is typically theid
of the entity to load.
loadAll
- The
loadAll
method is used for loading all of the entities.
update
- The
update
method is used to update an entity. The input parameters are typically the entity being updated and an object with the updated attributes.