Serverless Exports - CrowdStrike/falconpy GitHub Wiki
| Operation ID | Description | ||||
|---|---|---|---|---|---|
|
Read export jobs entities. | ||||
|
Query export jobs entities. | ||||
|
Download an export file. | ||||
|
Retrieve all lambda vulnerabilities that match the given query and return in the SARIF format. | ||||
|
Launch an export job of a Lambda Security resource. | ||||
WARNING
client_idandclient_secretare keyword arguments that contain your CrowdStrike API credentials. Please note that all examples below do not hard code these values. (These values are ingested as strings.)CrowdStrike does not recommend hard coding API credentials or customer identifiers within source code.
Read export jobs entities.
read_export_jobs
| Method | Route |
|---|---|
/lambdas/entities/exports/v1 |
- Produces: application/json
| Name | Service | Uber | Type | Data type | Description |
|---|---|---|---|---|---|
| ids | query | string or list of strings | Export Job IDs to read. Allowed up to 100 IDs per request. | ||
| parameters | query | dictionary | Full query string parameters payload in JSON format. |
from falconpy import ServerlessExports
# Do not hardcode API credentials!
falcon = ServerlessExports(client_id=CLIENT_ID,
client_secret=CLIENT_SECRET
)
id_list = 'ID1,ID2,ID3' # Can also pass a list here: ['ID1', 'ID2', 'ID3']
response = falcon.read_export_jobs(ids=id_list)
print(response)from falconpy import ServerlessExports
# Do not hardcode API credentials!
falcon = ServerlessExports(client_id=CLIENT_ID,
client_secret=CLIENT_SECRET
)
id_list = 'ID1,ID2,ID3' # Can also pass a list here: ['ID1', 'ID2', 'ID3']
response = falcon.ReadExportJobsMixin0(ids=id_list)
print(response)from falconpy import APIHarnessV2
# Do not hardcode API credentials!
falcon = APIHarnessV2(client_id=CLIENT_ID,
client_secret=CLIENT_SECRET
)
id_list = 'ID1,ID2,ID3' # Can also pass a list here: ['ID1', 'ID2', 'ID3']
response = falcon.command("ReadExportJobsMixin0", ids=id_list)
print(response)Back to Table of Contents
Query export jobs entities.
query_export_jobs
| Method | Route |
|---|---|
/lambdas/queries/exports/v1 |
- Produces: application/json
| Name | Service | Uber | Type | Data type | Description |
|---|---|---|---|---|---|
| filter | query | string | Filter exports using a query in Falcon Query Language (FQL). Only the last 100 jobs are returned. Supported filter fields: resource, status. |
||
| parameters | query | dictionary | Full query string parameters payload in JSON format. |
from falconpy import ServerlessExports
# Do not hardcode API credentials!
falcon = ServerlessExports(client_id=CLIENT_ID,
client_secret=CLIENT_SECRET
)
response = falcon.query_export_jobs(filter="string")
print(response)from falconpy import ServerlessExports
# Do not hardcode API credentials!
falcon = ServerlessExports(client_id=CLIENT_ID,
client_secret=CLIENT_SECRET
)
response = falcon.QueryExportJobsMixin0(filter="string")
print(response)from falconpy import APIHarnessV2
# Do not hardcode API credentials!
falcon = APIHarnessV2(client_id=CLIENT_ID,
client_secret=CLIENT_SECRET
)
response = falcon.command("QueryExportJobsMixin0", filter="string")
print(response)Back to Table of Contents
Download an export file.
download_export_file
| Method | Route |
|---|---|
/lambdas/entities/exports/files/v1 |
- Produces: application/json
| Name | Service | Uber | Type | Data type | Description |
|---|---|---|---|---|---|
| id | query | string | Export job ID. | ||
| parameters | query | dictionary | Full query string parameters payload in JSON format. |
from falconpy import ServerlessExports
# Do not hardcode API credentials!
falcon = ServerlessExports(client_id=CLIENT_ID,
client_secret=CLIENT_SECRET
)
response = falcon.download_export_file(id="string")
print(response)from falconpy import ServerlessExports
# Do not hardcode API credentials!
falcon = ServerlessExports(client_id=CLIENT_ID,
client_secret=CLIENT_SECRET
)
response = falcon.DownloadExportFileMixin0(id="string")
print(response)from falconpy import APIHarnessV2
# Do not hardcode API credentials!
falcon = APIHarnessV2(client_id=CLIENT_ID,
client_secret=CLIENT_SECRET
)
response = falcon.command("DownloadExportFileMixin0", id="string")
print(response)Back to Table of Contents
Launch an export job of a Lambda Security resource. Maximum of 1 job in progress per resource. Use expand_vulnerabilities=true to get detailed vulnerability information.
launch_export_job
| Method | Route |
|---|---|
/lambdas/entities/exports/v1 |
- Produces: application/json
| Name | Service | Uber | Type | Data type | Description |
|---|---|---|---|---|---|
| expand_vulnerabilities | body | boolean | Flag to include detailed vulnerability information. | ||
| format | body | string | The export file format. | ||
| fql | body | string | Filter the export using Falcon Query Language (FQL). | ||
| resource | body | string | The resource to export. Supported resources: function.detections, function.vulnerabilities-expanded, function.vulnerabilities. |
||
| sort | body | string | The fields to sort the records on. | ||
| body | body | dictionary | Full body payload as a JSON formatted dictionary. |
from falconpy import ServerlessExports
# Do not hardcode API credentials!
falcon = ServerlessExports(client_id=CLIENT_ID,
client_secret=CLIENT_SECRET
)
response = falcon.launch_export_job(expand_vulnerabilities=boolean,
format="string",
fql="string",
resource="string",
sort="string"
)
print(response)from falconpy import ServerlessExports
# Do not hardcode API credentials!
falcon = ServerlessExports(client_id=CLIENT_ID,
client_secret=CLIENT_SECRET
)
response = falcon.LaunchExportJobMixin0(expand_vulnerabilities=boolean,
format="string",
fql="string",
resource="string",
sort="string"
)
print(response)from falconpy import APIHarnessV2
# Do not hardcode API credentials!
falcon = APIHarnessV2(client_id=CLIENT_ID,
client_secret=CLIENT_SECRET
)
response = falcon.command("LaunchExportJobMixin0",
body={
"expand_vulnerabilities": boolean,
"format": "string",
"fql": "string",
"resource": "string",
"sort": "string"
})
print(response)Back to Table of Contents
