fromfalconpyimportNGSIEM# Do not hardcode API credentials!falcon=NGSIEM(client_id=CLIENT_ID,
client_secret=CLIENT_SECRET
)
response=falcon.upload_file(lookup_file="string", repository="string")
print(response)
Service class example (Operation ID syntax)
fromfalconpyimportNGSIEM# Do not hardcode API credentials!falcon=NGSIEM(client_id=CLIENT_ID,
client_secret=CLIENT_SECRET
)
response=falcon.UploadLookupV1(lookup_file="string", repository="string")
print(response)
Uber class example
fromfalconpyimportAPIHarnessV2# Do not hardcode API credentials!falcon=APIHarnessV2(client_id=CLIENT_ID,
client_secret=CLIENT_SECRET
)
lookup_file="string"withopen(lookup_file, "rb") asupload_file:
file_extended= {"file": upload_file}
response=falcon.command("UploadLookupV1", repository="string", files=file_extended)
print(response)
fromfalconpyimportNGSIEM# Do not hardcode API credentials!falcon=NGSIEM(client_id=CLIENT_ID,
client_secret=CLIENT_SECRET
)
withopen("some_file.ext", "wb") assave_file:
save_file.write(falcon.get_file(repository="string", name="string"))
Service class example (Operation ID syntax)
fromfalconpyimportNGSIEM# Do not hardcode API credentials!falcon=NGSIEM(client_id=CLIENT_ID,
client_secret=CLIENT_SECRET
)
withopen("some_file.ext", "wb") assave_file:
save_file.write(falcon.GetLookupV1(repository="string", name="string"))
Uber class example
fromfalconpyimportAPIHarnessV2# Do not hardcode API credentials!falcon=APIHarnessV2(client_id=CLIENT_ID,
client_secret=CLIENT_SECRET
)
withopen("some_file.ext", "wb") assave_file:
save_file.write(falcon.command("GetLookupV1", repository="string", name="string"))
GetLookupFromPackageWithNamespaceV1
Download lookup file in namespaced package from NGSIEM.
fromfalconpyimportNGSIEM# Do not hardcode API credentials!falcon=NGSIEM(client_id=CLIENT_ID,
client_secret=CLIENT_SECRET
)
withopen("some_file.ext", "wb") assave_file:
response=falcon.get_file_from_package_with_namespace(repository="string",
namespace="string",
package="string",
filename="string"
)
save_file.write(response)
Service class example (Operation ID syntax)
fromfalconpyimportNGSIEM# Do not hardcode API credentials!falcon=NGSIEM(client_id=CLIENT_ID,
client_secret=CLIENT_SECRET
)
withopen("some_file.ext", "wb") assave_file:
response=falcon.GetLookupFromPackageWithNamespaceV1()
save_file.write(response)
Uber class example
fromfalconpyimportAPIHarnessV2# Do not hardcode API credentials!falcon=APIHarnessV2(client_id=CLIENT_ID,
client_secret=CLIENT_SECRET
)
withopen("some_file.ext", "wb") assave_file:
response=falcon.command("GetLookupFromPackageWithNamespaceV1",
repository="string",
namespace="string",
package="string",
filename="string"
)
save_file.write(response)
fromfalconpyimportNGSIEM# Do not hardcode API credentials!falcon=NGSIEM(client_id=CLIENT_ID,
client_secret=CLIENT_SECRET
)
withopen("some_file.ext", "wb") assave_file:
response=falcon.get_file_from_package(repository="string",
package="string",
filename="string"
)
save_file.write(response)
Service class example (Operation ID syntax)
fromfalconpyimportNGSIEM# Do not hardcode API credentials!falcon=NGSIEM(client_id=CLIENT_ID,
client_secret=CLIENT_SECRET
)
withopen("some_file.ext", "wb") assave_file:
response=falcon.GetLookupFromPackageV1(repository="string",
package="string",
filename="string"
)
save_file.write(response)
Uber class example
fromfalconpyimportAPIHarnessV2# Do not hardcode API credentials!falcon=APIHarnessV2(client_id=CLIENT_ID,
client_secret=CLIENT_SECRET
)
withopen("some_file.ext", "wb") assave_file:
response=falcon.command("GetLookupFromPackageV1",
repository="string",
package="string",
filename="string"
)
save_file.write(response)
StartSearchV1
Initiate a NGSIEM search.
PEP8 method name
start_search
Endpoint
Method
Route
/humio/api/v1/repositories/{repository}/queryjobs
Required Scope
Content-Type
Consumes: application/json
Produces: application/json
Keyword Arguments
Name
Service
Uber
Type
Data type
Description
allow_event_skipping
body
boolean
Flag indicating if event skipping is allowed.
arguments
body
dictionary
Search arguments in JSON format.
around
body
dictionary
Search proximity arguments.
autobucket_count
body
integer
Number of events per bucket.
body
body
dictionary
Full body payload provided as a dictionary.
end
body
string
Last event limit.
ingest_end
body
integer
Ingest maximum.
ingest_start
body
integer
Ingest start.
is_live
body
boolean
Flag indicating if this is a live search.
query_string
body
string
Search query string.
repository
path
string
Name of the repository.
search
body
dictionary
Search query to perform. Can be used in replace of other keywords.
start
body
string
Search starting time range.
timezone
body
string
Timezone applied to the search.
timezone_offset_minutes
body
integer
Timezone offset.
Usage
Service class example (PEP8 syntax)
fromfalconpyimportNGSIEM# Do not hardcode API credentials!falcon=NGSIEM(client_id=CLIENT_ID,
client_secret=CLIENT_SECRET
)
response=falcon.start_search(repository="string",
is_live=False,
start="1d",
query_string="#event_simpleName=*"
)
print(response)
Service class example (Operation ID syntax)
fromfalconpyimportNGSIEM# Do not hardcode API credentials!falcon=NGSIEM(client_id=CLIENT_ID,
client_secret=CLIENT_SECRET
)
response=falcon.StartSearchV1(repository="string",
is_live=False,
start="1d",
query_string="#event_simpleName=*"
)
print(response)
Uber class example
fromfalconpyimportAPIHarnessV2# Do not hardcode API credentials!falcon=APIHarnessV2(client_id=CLIENT_ID,
client_secret=CLIENT_SECRET
)
search_query= {
"isLive" : False,
"start" : "1d",
"queryString" : "#event_simpleName=*"
}
response=falcon.command("StartSearchV1", repository="string", body=search_query)
print(response)
fromfalconpyimportNGSIEM# Do not hardcode API credentials!falcon=NGSIEM(client_id=CLIENT_ID,
client_secret=CLIENT_SECRET
)
response=falcon.get_search_status(repository="string", search_id="string")
print(response)
Service class example (Operation ID syntax)
fromfalconpyimportNGSIEM# Do not hardcode API credentials!falcon=NGSIEM(client_id=CLIENT_ID,
client_secret=CLIENT_SECRET
)
response=falcon.GetSearchStatusV1(repository="string", search_id="string")
print(response)
Uber class example
fromfalconpyimportAPIHarnessV2# Do not hardcode API credentials!falcon=APIHarnessV2(client_id=CLIENT_ID,
client_secret=CLIENT_SECRET
)
response=falcon.command("GetSearchStatusV1", repository="string", search_id="string")
print(response)
fromfalconpyimportNGSIEM# Do not hardcode API credentials!falcon=NGSIEM(client_id=CLIENT_ID,
client_secret=CLIENT_SECRET
)
response=falcon.stop_search(repository="string", id="string")
print(response)
Service class example (Operation ID syntax)
fromfalconpyimportNGSIEM# Do not hardcode API credentials!falcon=NGSIEM(client_id=CLIENT_ID,
client_secret=CLIENT_SECRET
)
response=falcon.StopSearchV1(repository="string", id="string")
print(response)
Uber class example
fromfalconpyimportAPIHarnessV2# Do not hardcode API credentials!falcon=APIHarnessV2(client_id=CLIENT_ID,
client_secret=CLIENT_SECRET
)
response=falcon.command("StopSearchV1", repository="string", id="string")
print(response)