client_id and client_secret are 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.
ListCollections
List available collection names in alphabetical order.
PEP8 method name
list_collections
Endpoint
Method
Route
/customobjects/v1/collections
Required Scope
Content-Type
Consumes: application/json
Produces: application/json
Keyword Arguments
Name
Service
Uber
Type
Data type
Description
end
query
string
The end key to end listing to.
limit
query
integer
The limit of results to return.
parameters
query
dictionary
Full query string parameters payload in JSON format.
Fetch metadata about one or more existing collections.
PEP8 method name
describe_collections
Endpoint
Method
Route
/customobjects/v1/collections
Required Scope
Content-Type
Consumes: application/octet-stream
Produces: application/json
Keyword Arguments
Name
Service
Uber
Type
Data type
Description
names
query
array (string)
A set of collection names.
parameters
query
dictionary
Full query string parameters payload in JSON format.
Usage
Service class example (PEP8 syntax)
fromfalconpyimportCustomStoragefalcon=CustomStorage(client_id=CLIENT_ID,
client_secret=CLIENT_SECRET
)
name_list='ID1,ID2,ID3'# Can also pass a list here: ['ID1', 'ID2', 'ID3']response=falcon.describe_collections(names=name_list)
print(response)
Service class example (Operation ID syntax)
fromfalconpyimportCustomStoragefalcon=CustomStorage(client_id=CLIENT_ID,
client_secret=CLIENT_SECRET
)
name_list='ID1,ID2,ID3'# Can also pass a list here: ['ID1', 'ID2', 'ID3']response=falcon.DescribeCollections(names=name_list)
print(response)
Uber class example
fromfalconpyimportAPIHarnessV2falcon=APIHarnessV2(client_id=CLIENT_ID,
client_secret=CLIENT_SECRET
)
name_list='ID1,ID2,ID3'# Can also pass a list here: ['ID1', 'ID2', 'ID3']}response=falcon.command("DescribeCollections", names=name_list)
print(response)
Full query string parameters payload in JSON format.
start
query
string
The start key to start listing from
Usage
Service class example (PEP8 syntax)
fromfalconpyimportCustomStorage# Do not hardcode API credentials!falcon=CustomStorage(client_id=CLIENT_ID,
client_secret=CLIENT_SECRET
)
response=falcon.list(end="string",
limit=integer,
start="string",
collection_name="string"
)
print(response)
Service class example (Operation ID syntax)
fromfalconpyimportCustomStorage# Do not hardcode API credentials!falcon=CustomStorage(client_id=CLIENT_ID,
client_secret=CLIENT_SECRET
)
response=falcon.ListObjects(end="string",
limit=integer,
start="string",
collection_name="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("ListObjects",
end="string"limit=integer,
start="string",
collection_name="string"
)
print(response)
SearchObjects
Search for objects that match the specified filter criteria (returns metadata, not actual objects)
Full query string parameters payload in JSON format.
sort
query
string
The sort order for the returned results.
Usage
Service class example (PEP8 syntax)
fromfalconpyimportCustomStorage# Do not hardcode API credentials!falcon=CustomStorage(client_id=CLIENT_ID,
client_secret=CLIENT_SECRET
)
response=falcon.search(filter="string",
limit=integer,
offset=integer,
sort="string",
collection_name="string"
)
print(response)
Service class example (Operation ID syntax)
fromfalconpyimportCustomStorage# Do not hardcode API credentials!falcon=CustomStorage(client_id=CLIENT_ID,
client_secret=CLIENT_SECRET
)
response=falcon.SearchObjects(filter="string",
limit=integer,
offset=integer,
sort="string",
collection_name="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("SearchObjects",
filter="string",
limit=integer,
offset=integer,
sort="string",
collection_name="string"
)
print(response)
fromfalconpyimportCustomStorage# Do not hardcode API credentials!falcon=CustomStorage(client_id=CLIENT_ID,
client_secret=CLIENT_SECRET
)
withopen("some_file.ext", "wb", encoding="utf-8") assave_file:
save_file.write(falcon.get(collection_name="string", object_key="string"))
Service class example (Operation ID syntax)
fromfalconpyimportCustomStorage# Do not hardcode API credentials!falcon=CustomStorage(client_id=CLIENT_ID,
client_secret=CLIENT_SECRET
)
withopen("some_file.ext", "wb", encoding="utf-8") assave_file:
save_file.write(falcon.GetObject(collection_name="string", object_key="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", encoding="utf-8") assave_file:
save_file.write(falcon.command("GetObject", collection_name="string", object_key="string"))
PutObject
Put the specified new object at the given key or overwrite an existing object at the given key
If false, run the operation as normal. If true, validate that the request would succeed, but don't execute it.
object_key
path
string
The object key
parameters
query
dictionary
Full query string parameters payload in JSON format.
Usage
Service class example (PEP8 syntax)
fromfalconpyimportCustomStorage# Do not hardcode API credentials!falcon=CustomStorage(client_id=CLIENT_ID,
client_secret=CLIENT_SECRET
)
response=falcon.delete(collection_name="string", object_key="string", dry_run=boolean)
print(response)
Service class example (Operation ID syntax)
fromfalconpyimportCustomStorage# Do not hardcode API credentials!falcon=CustomStorage(client_id=CLIENT_ID,
client_secret=CLIENT_SECRET
)
response=falcon.DeleteObject(collection_name="string", object_key="string", dry_run=boolean)
print(response)
Uber class example
fromfalconpyimportAPIHarnessV2# Do not hardcode API credentials!falcon=APIHarnessV2(client_id=CLIENT_ID,
client_secret=CLIENT_SECRET
)
response=falcon.command("DeleteObject",
collection_name="string",
object_key="string",
dry_run=boolean
)
print(response)
fromfalconpyimportCustomStorage# Do not hardcode API credentials!falcon=CustomStorage(client_id=CLIENT_ID,
client_secret=CLIENT_SECRET
)
response=falcon.metadata(collection_name="string", object_key="string")
print(response)
Service class example (Operation ID syntax)
fromfalconpyimportCustomStorage# Do not hardcode API credentials!falcon=CustomStorage(client_id=CLIENT_ID,
client_secret=CLIENT_SECRET
)
response=falcon.GetObjectMetadata(collection_name="string", object_key="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("GetObjectMetadata", collection_name="string", object_key="string")
print(response)
ListSchemas
Get the list of schemas for the requested collection in reverse version order (latest first).
Full query string parameters payload in JSON format.
start
query
string
The start key to start listing from
Usage
Service class example (PEP8 syntax)
fromfalconpyimportCustomStorage# Do not hardcode API credentials!falcon=CustomStorage(client_id=CLIENT_ID,
client_secret=CLIENT_SECRET
)
response=falcon.list_by_version(end="string",
limit=integer,
start="string",
collection_name="string",
collection_version="string"
)
print(response)
Service class example (Operation ID syntax)
fromfalconpyimportCustomStorage# Do not hardcode API credentials!falcon=CustomStorage(client_id=CLIENT_ID,
client_secret=CLIENT_SECRET
)
response=falcon.ListObjectsByVersion(end="string",
limit=integer,
start="string",
collection_name="string",
collection_version="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("ListObjectsByVersion",
end="string"limit=integer,
start="string",
collection_name="string",
collection_version="string"
)
print(response)
SearchObjectsByVersion
Search for objects that match the specified filter criteria (returns metadata, not actual objects)
If false, run the operation as normal. If true, validate that the request would succeed, but don't execute it.
object_key
path
string
The object key
parameters
query
dictionary
Full query string parameters payload in JSON format.
Usage
Service class example (PEP8 syntax)
fromfalconpyimportCustomStorage# Do not hardcode API credentials!falcon=CustomStorage(client_id=CLIENT_ID,
client_secret=CLIENT_SECRET
)
response=falcon.delete_version(collection_name="string",
collection_version="string",
object_key="string",
dry_run=boolean
)
print(response)
Service class example (Operation ID syntax)
fromfalconpyimportCustomStorage# Do not hardcode API credentials!falcon=CustomStorage(client_id=CLIENT_ID,
client_secret=CLIENT_SECRET
)
response=falcon.DeleteVersionedObject(collection_name="string",
collection_version="string",
object_key="string",
dry_run=boolean
)
print(response)
Uber class example
fromfalconpyimportAPIHarnessV2# Do not hardcode API credentials!falcon=APIHarnessV2(client_id=CLIENT_ID,
client_secret=CLIENT_SECRET
)
response=falcon.command("DeleteVersionedObject",
collection_name="string",
collection_version="string",
object_key="string",
dry_run=boolean
)
print(response)
fromfalconpyimportCustomStorage# Do not hardcode API credentials!falcon=CustomStorage(client_id=CLIENT_ID,
client_secret=CLIENT_SECRET
)
response=falcon.version_metadata(collection_name="string",
collection_version="string",
object_key="string"
)
print(response)
Service class example (Operation ID syntax)
fromfalconpyimportCustomStorage# Do not hardcode API credentials!falcon=CustomStorage(client_id=CLIENT_ID,
client_secret=CLIENT_SECRET
)
response=falcon.GetVersionedObjectMetadata(collection_name="string",
collection_version="string",
object_key="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("GetVersionedObjectMetadata",
collection_name="string",
collection_version="string",
object_key="string"
)
print(response)