crowdstrike-falcon
v0.4.0
Published
CrowdStrike Falcon API library for browser and node
Downloads
1,330
Readme
falconjs
CrowdStrike Falcon API JS library for the browser and Node
Experimental
falconjs is an open source project, not a CrowdStrike product. As such it carries no formal support, expressed or implied.
Installation
npm install crowdstrike-falcon
Exemplary use
With falconjs, there are two ways to call CrowdStrike API service collections. You can use the FalconClient object, which has always been available, or you can use the new Falcon object, which behaves like the API Harness, or UberClass, from FalconPy.
FalconClient
import { FalconClient, FalconErrorExplain } from "crowdstrike-falcon";
const client = new FalconClient({
cloud: "us-1",
clientId: "",
clientSecret: "",
});
await client.sensorDownload
.getSensorInstallersCCIDByQuery()
.catch(async function (err) {
alert("Could not fetch CCID: " + (await FalconErrorExplain(err)));
})
.then((value) => {
console.log("my CCID: ", value);
});
Falcon
when using request body properties:
const body = { ids: ["123", "456", "789"]}
try {
detDetails = await falcon.command("GetDetectSummaries", body)
return detDetails
} catch (error) {
console.log(error)
return
}
when using query params:
const params = { filter: "score:<=75"}
const args = {"getAssessmentsByScoreV1", params }
try {
ztaDetails = await falcon.command(args)
return ztaDetails
} catch(error) {
console.log(error)
return
}