CrowdStrike Falcon CrowdStrike Subreddit

Using the API Integrations service collection

Uber class support Service class support Documentation Version Page Updated

Table of Contents

Operation IDDescription
GetCombinedPluginConfigs
PEP8get_plugin_configs
Queries for config resources and returns details
ExecuteCommand
PEP8execute_command
Execute a command.

Passing credentials

WARNING

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.

GetCombinedPluginConfigs

Queries for config resources and returns details

PEP8 method name

get_plugin_configs

Endpoint

MethodRoute
GET/plugins/combined/configs/v1

Content-Type

  • Consumes: application/json
  • Produces: application/json

Keyword Arguments

NameServiceUberTypeData typeDescription
filterService Class SupportUber Class SupportquerystringFilter items using a query in Falcon Query Language (FQL).
limitService Class SupportUber Class SupportqueryintegerThe number of items to return in this response (default: 100, max: 500). Use with the offset parameter to manage pagination of results.
offsetService Class SupportUber Class SupportqueryintegerThe first item to return, where 0 is the latest item. Use with the limit parameter to manage pagination of results.
parametersService Class SupportUber Class SupportquerydictionaryFull query string parameters payload as a dictionary. Not required when using other keywords.
sortService Class SupportUber Class SupportquerystringSort items using their properties.

Usage

Service class example (PEP8 syntax)
from falconpy import APIIntegrations

falcon = APIIntegrations(client_id=CLIENT_ID,
                         client_secret=CLIENT_SECRET
                         )

response = falcon.get_plugin_configs(filter="string",
                                     limit=integer,
                                     offset=integer,
                                     sort="string"
                                     )
print(response)
Service class example (Operation ID syntax)
from falconpy import APIIntegrations

falcon = APIIntegrations(client_id=CLIENT_ID,
                         client_secret=CLIENT_SECRET
                         )

response = falcon.GetCombinedPluginConfigs(filter="string",
                                           limit=integer,
                                           offset=integer,
                                           sort="string"
                                           )
print(response)
Uber class example
from falconpy import APIHarnessV2

falcon = APIHarnessV2(client_id=CLIENT_ID,
                      client_secret=CLIENT_SECRET
                      )

response = falcon.command("GetCombinedPluginConfigs",
                          filter="string",
                          limit=integer,
                          offset=integer,
                          sort="string"
                          )
print(response)

Back to Table of Contents

ExecuteCommand

Execute a command.

PEP8 method name

execute_command

Endpoint

MethodRoute
POST/plugins/entities/execute/v1

Content-Type

  • Consumes: application/json
  • Produces: application/json

Keyword Arguments

NameServiceUberTypeData typeDescription
bodyService Class SupportUber Class SupportbodydictionaryFull body payload as a dictionary. Not required when using other keywords.
config_auth_typeService Class SupportNo Uber Class SupportbodystringConfiguration authorization type for plugin to execute. Only application for security scheme plugins. If not provided, execution will use the default authorization type.
config_idService Class SupportNo Uber Class SupportbodystringConfiguration ID. If omitted, the oldest configuration ID will be used.
definition_idService Class SupportNo Uber Class SupportbodystringID of the definition containing the operation to execute.
idService Class SupportNo Uber Class SupportbodystringID of the specific plugin to execute provided in "definition_name.operation_name" format.
operation_idService Class SupportNo Uber Class SupportbodystringThe specific operation to execute.
descriptionService Class SupportNo Uber Class SupportbodystringCommand description.
versionService Class SupportNo Uber Class SupportbodyintegerThe version of the definition to execute.

Usage

Service class example (PEP8 syntax)
from falconpy import APIIntegrations

falcon = APIIntegrations(client_id=CLIENT_ID,
                         client_secret=CLIENT_SECRET
                         )

response = falcon.execute_command(config_auth_type="string",
                                  config_id="string",
                                  definition_id="string",
                                  id="string",
                                  operation_id="string",
                                  description="string",
                                  version=integer
                                  )

print(response)
Service class example (Operation ID syntax)
from falconpy import APIIntegrations

falcon = APIIntegrations(client_id=CLIENT_ID,
                         client_secret=CLIENT_SECRET
                         )

response = falcon.ExecuteCommand(config_auth_type="string",
                                 config_id="string",
                                 definition_id="string",
                                 id="string",
                                 operation_id="string",
                                 description="string",
                                 version=integer
                                 )
print(response)
Uber class example
from falconpy import APIHarnessV2

falcon = APIHarnessV2(client_id=CLIENT_ID,
                      client_secret=CLIENT_SECRET
                      )

body_payload = {
    "resources": [
        {
        "config_auth_type": "string",
        "config_id": "string",
        "definition_id": "string",
        "id": "string",
        "operation_id": "string",
        "request": {
            "description": "string"
        },
        "version": integer
        }
    ]
}

response = falcon.command("ExecuteCommand", body=body_payload)

print(response)

Back to Table of Contents