Firewall Management
The Firewall Management service collection provides operations for managing firewall policies, rule groups, rules, network locations, and related entities. Aggregate event and rule data, manage policy containers, create and update rule groups, and query firewall configuration.
| Language | Last Update |
|---|---|
| Python | v1.4.6 |
| PowerShell | v2.2.9 |
| Go | v0.20.0 |
| TypeScript | v0.6.0 |
| Rust | v0.7.0 |
| Ruby | v1.2.0 |
Table of Contents
Section titled “Table of Contents”| Operation | Description |
|---|---|
aggregate_eventsaggregate_events | Aggregate events for customer |
aggregate_policy_rulesaggregate_policy_rules | Aggregate rules within a policy for customer |
aggregate_rule_groupsaggregate_rule_groups | Aggregate rule groups for customer |
aggregate_rulesaggregate_rules | Aggregate rules for customer |
get_eventsget_events | Get events entities by ID and optionally version |
get_firewall_fieldsget_firewall_fields | Get the firewall field specifications by ID |
get_network_locations_detailsget_network_locations_details | Get network locations entities by ID |
update_network_locations_metadataupdate_network_locations_metadata | Updates the network locations metadata such as polling_intervals for the cid |
update_network_locations_precedenceupdate_network_locations_precedence | Updates the network locations precedence according to the list of ids provided. |
get_network_locationsget_network_locations | Get a summary of network locations entities by ID |
upsert_network_locationsupsert_network_locations | Updates the network locations provided, and return the ID. |
create_network_locationscreate_network_locations | Create new network locations provided, and return the ID. |
delete_network_locationsdelete_network_locations | Delete network location entities by ID. |
update_network_locationsupdate_network_locations | Updates the network locations provided, and return the ID. |
get_platformsget_platforms | Get platforms by ID, e.g., windows or mac or droid |
get_policy_containersget_policy_containers | Get policy container entities by policy ID |
update_policy_container_v1update_policy_container_v1 | Update an identified policy container deprecated |
update_policy_containerupdate_policy_container | Update an identified policy container |
get_rule_groupsget_rule_groups | Get rule group entities by ID. These groups do not contain their rule entites, just the rule IDs in precedence order. |
create_rule_groupcreate_rule_group | Create new rule group on a platform for a customer with a name and description, and return the ID |
delete_rule_groupsdelete_rule_groups | Delete rule group entities by ID |
update_rule_groupupdate_rule_group | Update name, description, or enabled status of a rule group, or create, edit, delete, or reorder rules |
create_rule_group_validationcreate_rule_group_validation | Validates the request of creating a new rule group on a platform for a customer with a name and description |
update_rule_group_validationupdate_rule_group_validation | Validates the request of updating name, description, or enabled status of a rule group, or create, edit, delete, or reorder rules |
get_rulesget_rules | Get rule entities by ID (64-bit unsigned int as decimal string) or Family ID (32-character hexadecimal string) |
validate_filepath_patternvalidate_filepath_pattern | Validates that the test pattern matches the executable filepath glob pattern. |
query_eventsquery_events | Find all event IDs matching the query with filter |
query_firewall_fieldsquery_firewall_fields | Get the firewall field specification IDs for the provided platform |
query_network_locationsquery_network_locations | Get a list of network location IDs |
query_platformsquery_platforms | Get the list of platform names |
query_policy_rulesquery_policy_rules | Find all firewall rule IDs matching the query with filter, and return them in precedence order |
query_rule_groupsquery_rule_groups | Find all rule group IDs matching the query with filter |
query_rulesquery_rules | Find all rule IDs matching the query with filter |
aggregate_events
Section titled “aggregate_events”Aggregate events for customer
aggregate_eventsParameters
Section titled “Parameters”| Name | Type | Data type | Description |
|---|---|---|---|
| body | body | list of dictionaries | Full body payload in JSON format. |
| date_ranges | body | list of dictionaries | Applies to date_range aggregations. Example: [{“from”: “2016-05-28T09:00:31Z”, “to”: “2016-05-30T09:00:31Z”}, {“from”: “2016-06-01T09:00:31Z”, “to”: “2016-06-10T09:00:31Z”}] |
| exclude | body | string | Elements to exclude. |
| field | body | string | The field on which to compute the aggregation. |
| filter | body | string | FQL syntax formatted string to use to filter the results. |
| from | body | integer | Starting position. |
| include | body | string | Elements to include. |
| interval | body | string | Time interval for date histogram aggregations. Valid values include: year, month, week, day, hour, minute. |
| max_doc_count | body | integer | Only return buckets if values are less than or equal to the value here. |
| min_doc_count | body | integer | Only return buckets if values are greater than or equal to the value here. |
| missing | body | string | Missing is the value to be used when the aggregation field is missing from the object. In other words, the missing parameter defines how documents that are missing a value should be treated. By default they will be ignored, but it is also possible to treat them as if they had a value. |
| name | body | string | Name of the aggregate query, as chosen by the user. Used to identify the results returned to you. |
| q | body | string | Full text search across all metadata fields. |
| ranges | body | list of dictionaries | Applies to range aggregations. Ranges values will depend on field. For example, if max_severity is used, ranges might look like: [{“From”: 0, “To”: 70}, {“From”: 70, “To”: 100}] |
| size | body | integer | The max number of term buckets to be returned. |
| sub_aggregates | body | list of dictionaries | A nested aggregation, such as: [{“name”: “max_first_behavior”, “type”: “max”, “field”: “first_behavior”}]. There is a maximum of 3 nested aggregations per request. |
| sort | body | string | FQL syntax string to sort bucket results. _count - sort by document count; _term - sort by the string value alphabetically. Supports asc and desc using | format. Example: _count|desc |
| time_zone | body | string | Time zone for bucket results. |
| type | body | string | Type of aggregation. Valid values include: date_histogram (aggregates counts on a specified time interval, requires use of “interval” field), date_range (aggregates counts on custom defined date range buckets), terms (buckets alerts by the value of a specified field), range (buckets alerts by specified numeric ranges of a specified field), cardinality (returns the count of distinct values in a specified field), max (returns the maximum value of a specified field), min (returns the minimum value of a specified field), avg (returns the average value of the specified field), sum (returns the total sum of all values for the specified field), percentiles (returns the following percentiles for the specified field: 1, 5, 25, 50, 75, 95, 99). |
Code Examples
Section titled “Code Examples”from falconpy import FirewallManagement
falcon = FirewallManagement(client_id=CLIENT_ID, client_secret=CLIENT_SECRET )
ranges = [ { "From": 0, "To": 0 }]
response = falcon.aggregate_events(date_ranges="string", exclude="string", field="string", filter="string", from=integer, include="string", interval="string", max_doc_count=integer, min_doc_count=integer, missing="string", name="string", q="string", ranges=ranges, size=integer, sort="string", sub_aggregates=["string"], time_zone="string", type="string")print(response)from falconpy import FirewallManagement
falcon = FirewallManagement(client_id=CLIENT_ID, client_secret=CLIENT_SECRET )
ranges = [ { "From": 0, "To": 0 }]
response = falcon.aggregate_events(date_ranges="string", exclude="string", field="string", filter="string", from=integer, include="string", interval="string", max_doc_count=integer, min_doc_count=integer, missing="string", name="string", q="string", ranges=ranges, size=integer, sort="string", sub_aggregates=["string"], time_zone="string", type="string")print(response)from falconpy import APIHarnessV2
falcon = APIHarnessV2(client_id=CLIENT_ID, client_secret=CLIENT_SECRET )
body_payload = [ { "date_ranges": [ { "from": "string", "to": "string" } ], "exclude": "string", "extended_bounds": { "max": "string", "min": "string" }, "field": "string", "filter": "string", "filters_spec": { "filters": {}, "other_bucket": boolean, "other_bucket_key": "string" }, "from": integer, "include": "string", "interval": "string", "max_doc_count": integer, "min_doc_count": integer, "missing": "string", "name": "string", "percents": ["string"], "q": "string", "ranges": [ { "from": integer, "to": integer } ], "size": integer, "sort": "string", "sub_aggregates": [ { "date_ranges": ["string"], "exclude": "string", "extended_bounds": {}, "field": "string", "filter": "string", "filters_spec": {}, "from": integer, "include": "string", "interval": "string", "max_doc_count": integer, "min_doc_count": integer, "missing": "string", "name": "string", "percents": ["string"], "q": "string", "ranges": ["string"], "size": integer, "sort": "string", "sub_aggregates": ["string"], "time_zone": "string", "type": "string" } ], "time_zone": "string", "type": "string" }]
response = falcon.command("aggregate_events", body=body_payload)print(response)Examples coming soon.
package main
import ( "context" "fmt" "os"
"github.com/crowdstrike/gofalcon/falcon" "github.com/crowdstrike/gofalcon/falcon/client/firewall_management" "github.com/crowdstrike/gofalcon/falcon/models")
func main() { client, err := falcon.NewClient(&falcon.ApiConfig{ ClientId: os.Getenv("FALCON_CLIENT_ID"), ClientSecret: os.Getenv("FALCON_CLIENT_SECRET"), Context: context.Background(), }) if err != nil { panic(err) }
from := "string" to := "string" exclude := "string" field := "string" filter := "string" from := integer include := "string" interval := "string" max_doc_count := integer min_doc_count := integer missing := "string" name := "string" q := "string" From := integer To := integer size := integer sort := "string" time_zone := "string" type := "string"
response, err := client.FirewallManagement.AggregateEvents( &firewall_management.AggregateEventsParams{ Body: []*models.FwmgrMsaAggregateQueryRequest{ { DateRanges: []interface{}{ { From: &from, To: &to, }, }, Exclude: &exclude, ExtendedBounds: &struct{}{}, Field: &field, Filter: &filter, FiltersSpec: &struct{}{}, From: &from, Include: &include, Interval: &interval, MaxDocCount: &max_doc_count, MinDocCount: &min_doc_count, Missing: &missing, Name: &name, Percents: []interface{}{}, Q: &q, Ranges: []interface{}{ { From: &From, To: &To, }, }, Size: &size, Sort: &sort, SubAggregates: []interface{}{ { DateRanges: []interface{}{ { From: &from, To: &to, }, }, Exclude: &exclude, ExtendedBounds: &struct{}{}, Field: &field, Filter: &filter, FiltersSpec: &struct{}{}, From: &from, Include: &include, Interval: &interval, MaxDocCount: &max_doc_count, MinDocCount: &min_doc_count, Missing: &missing, Name: &name, Percents: []interface{}{}, Q: &q, Ranges: []interface{}{ { From: &From, To: &To, }, }, Size: &size, Sort: &sort, SubAggregates: []interface{}{ { DateRanges: []interface{}{}, Exclude: &exclude, ExtendedBounds: &struct{}{}, Field: &field, Filter: &filter, FiltersSpec: &struct{}{}, From: &from, Include: &include, Interval: &interval, MaxDocCount: &max_doc_count, MinDocCount: &min_doc_count, Missing: &missing, Name: &name, Percents: []interface{}{}, Q: &q, Ranges: []interface{}{}, Size: &size, Sort: &sort, SubAggregates: []interface{}{}, TimeZone: &time_zone, Type: &type, }, }, TimeZone: &time_zone, Type: &type, }, }, TimeZone: &time_zone, Type: &type, }, }, Context: context.Background(), }, ) if err != nil { panic(falcon.ErrorExplain(err)) }
fmt.Printf("%+v\n", response.Payload)}import { FalconClient } from "crowdstrike-falcon";
const client = new FalconClient({ cloud: process.env.FALCON_CLOUD!, clientId: process.env.FALCON_CLIENT_ID!, clientSecret: process.env.FALCON_CLIENT_SECRET!,});
const response = await client.firewallManagement.aggregateEvents( [{ dateRanges: [{ from: "string", to: "string" }], exclude: "string", extendedBounds: { max: "string", min: "string" }, field: "string", filter: "string", filtersSpec: { filters: {}, otherBucket: boolean, otherBucketKey: "string" }, from: integer, include: "string", interval: "string", maxDocCount: integer, minDocCount: integer, missing: "string", name: "string", percents: [], q: "string", ranges: [{ From: integer, To: integer }], size: integer, sort: "string", subAggregates: [{ dateRanges: [{ from: "string", to: "string" }], exclude: "string", extendedBounds: { max: "string", min: "string" }, field: "string", filter: "string", filtersSpec: { filters: {}, otherBucket: boolean, otherBucketKey: "string" }, from: integer, include: "string", interval: "string", maxDocCount: integer, minDocCount: integer, missing: "string", name: "string", percents: [], q: "string", ranges: [{ From: integer, To: integer }], size: integer, sort: "string", subAggregates: [{ dateRanges: [], exclude: "string", extendedBounds: {}, field: "string", filter: "string", filtersSpec: {}, from: integer, include: "string", interval: "string", maxDocCount: integer, minDocCount: integer, missing: "string", name: "string", percents: [], q: "string", ranges: [], size: integer, sort: "string", subAggregates: [], timeZone: "string", type: "string" }], timeZone: "string", type: "string" }], timeZone: "string", type: "string"}] // body);
console.log(response);use rusty_falcon::apis::firewall_management_api::aggregate_events;use rusty_falcon::easy::client::FalconHandle;use rusty_falcon::models::FwmgrMsaAggregateQueryRequest;
#[tokio::main]async fn main() { let falcon = FalconHandle::from_env().await.expect("Could not authenticate");
let body = vec![FwmgrMsaAggregateQueryRequest { date_ranges: vec![DateRangeSpec { from: Some("string".to_string()), to: Some("string".to_string()), ..Default::default() }], exclude: Some("string".to_string()), field: Some("string".to_string()), filter: Some("string".to_string()), filters_spec: Default::default(), from: Some(integer), include: Some("string".to_string()), interval: Some("string".to_string()), missing: Some("string".to_string()), name: Some("string".to_string()), percents: vec![], q: Some("string".to_string()), ranges: vec![RangeSpec { from: Some(integer), to: Some(integer), ..Default::default() }], size: Some(integer), sort: Some("string".to_string()), sub_aggregates: vec![AggregateQueryRequest { date_ranges: vec![DateRangeSpec { from: Some("string".to_string()), to: Some("string".to_string()), ..Default::default() }], exclude: Some("string".to_string()), field: Some("string".to_string()), filter: Some("string".to_string()), filters_spec: Default::default(), from: Some(integer), include: Some("string".to_string()), interval: Some("string".to_string()), missing: Some("string".to_string()), name: Some("string".to_string()), percents: vec![], q: Some("string".to_string()), ranges: vec![RangeSpec { from: Some(integer), to: Some(integer), ..Default::default() }], size: Some(integer), sort: Some("string".to_string()), sub_aggregates: vec![AggregateQueryRequest { date_ranges: vec![], exclude: Some("string".to_string()), field: Some("string".to_string()), filter: Some("string".to_string()), filters_spec: Default::default(), from: Some(integer), include: Some("string".to_string()), interval: Some("string".to_string()), missing: Some("string".to_string()), name: Some("string".to_string()), percents: vec![], q: Some("string".to_string()), ranges: vec![], size: Some(integer), sort: Some("string".to_string()), sub_aggregates: vec![], time_zone: Some("string".to_string()), type: Some("string".to_string()), ..Default::default() }], time_zone: Some("string".to_string()), type: Some("string".to_string()), ..Default::default() }], time_zone: Some("string".to_string()), type: Some("string".to_string()), ..Default::default() }];
let response = aggregate_events( &falcon.cfg, // configuration body, // body ).await.expect("API call failed");
println!("{:?}", response);}require "crimson-falcon"
Falcon.configure do |config| config.client_id = ENV["FALCON_CLIENT_ID"] config.client_secret = ENV["FALCON_CLIENT_SECRET"] config.cloud = ENV["FALCON_CLOUD"]end
api = Falcon::FirewallManagement.new
body = [Falcon::FwmgrMsaAggregateQueryRequest.new( date_ranges: [{ from: 'string', to: 'string' }], exclude: 'string', extended_bounds: { max: 'string', min: 'string' }, field: 'string', filter: 'string', filters_spec: { filters: {}, other_bucket: boolean, other_bucket_key: 'string' }, from: integer, include: 'string', interval: 'string', max_doc_count: integer, min_doc_count: integer, missing: 'string', name: 'string', percents: [], q: 'string', ranges: [{ From: integer, To: integer }], size: integer, sort: 'string', sub_aggregates: [{ date_ranges: [{ from: 'string', to: 'string' }], exclude: 'string', extended_bounds: { max: 'string', min: 'string' }, field: 'string', filter: 'string', filters_spec: { filters: {}, other_bucket: boolean, other_bucket_key: 'string' }, from: integer, include: 'string', interval: 'string', max_doc_count: integer, min_doc_count: integer, missing: 'string', name: 'string', percents: [], q: 'string', ranges: [{ From: integer, To: integer }], size: integer, sort: 'string', sub_aggregates: [{ date_ranges: [], exclude: 'string', extended_bounds: {}, field: 'string', filter: 'string', filters_spec: {}, from: integer, include: 'string', interval: 'string', max_doc_count: integer, min_doc_count: integer, missing: 'string', name: 'string', percents: [], q: 'string', ranges: [], size: integer, sort: 'string', sub_aggregates: [], time_zone: 'string', type: 'string' }], time_zone: 'string', type: 'string' }], time_zone: 'string', type: 'string')]
response = api.aggregate_events(body)
puts responseaggregate_policy_rules
Section titled “aggregate_policy_rules”Aggregate rules within a policy for customer
aggregate_policy_rulesParameters
Section titled “Parameters”| Name | Type | Data type | Description |
|---|---|---|---|
| body | body | list of dictionaries | Full body payload in JSON format. |
| date_ranges | body | list of dictionaries | Applies to date_range aggregations. Example: [{“from”: “2016-05-28T09:00:31Z”, “to”: “2016-05-30T09:00:31Z”}, {“from”: “2016-06-01T09:00:31Z”, “to”: “2016-06-10T09:00:31Z”}] |
| exclude | body | string | Elements to exclude. |
| field | body | string | The field on which to compute the aggregation. |
| filter | body | string | FQL syntax formatted string to use to filter the results. |
| from | body | integer | Starting position. |
| include | body | string | Elements to include. |
| interval | body | string | Time interval for date histogram aggregations. Valid values include: year, month, week, day, hour, minute. |
| max_doc_count | body | integer | Only return buckets if values are less than or equal to the value here. |
| min_doc_count | body | integer | Only return buckets if values are greater than or equal to the value here. |
| missing | body | string | Missing is the value to be used when the aggregation field is missing from the object. In other words, the missing parameter defines how documents that are missing a value should be treated. By default they will be ignored, but it is also possible to treat them as if they had a value. |
| name | body | string | Name of the aggregate query, as chosen by the user. Used to identify the results returned to you. |
| q | body | string | Full text search across all metadata fields. |
| ranges | body | list of dictionaries | Applies to range aggregations. Ranges values will depend on field. For example, if max_severity is used, ranges might look like: [{“From”: 0, “To”: 70}, {“From”: 70, “To”: 100}] |
| size | body | integer | The max number of term buckets to be returned. |
| sub_aggregates | body | list of dictionaries | A nested aggregation, such as: [{“name”: “max_first_behavior”, “type”: “max”, “field”: “first_behavior”}]. There is a maximum of 3 nested aggregations per request. |
| sort | body | string | FQL syntax string to sort bucket results. _count - sort by document count; _term - sort by the string value alphabetically. Supports asc and desc using | format. Example: _count|desc |
| time_zone | body | string | Time zone for bucket results. |
| type | body | string | Type of aggregation. Valid values include: date_histogram (aggregates counts on a specified time interval, requires use of “interval” field), date_range (aggregates counts on custom defined date range buckets), terms (buckets alerts by the value of a specified field), range (buckets alerts by specified numeric ranges of a specified field), cardinality (returns the count of distinct values in a specified field), max (returns the maximum value of a specified field), min (returns the minimum value of a specified field), avg (returns the average value of the specified field), sum (returns the total sum of all values for the specified field), percentiles (returns the following percentiles for the specified field: 1, 5, 25, 50, 75, 95, 99). |
Code Examples
Section titled “Code Examples”from falconpy import FirewallManagement
falcon = FirewallManagement(client_id=CLIENT_ID, client_secret=CLIENT_SECRET )
ranges = [ { "From": 0, "To": 0 }]
response = falcon.aggregate_policy_rules(date_ranges="string", exclude="string", field="string", filter="string", from=integer, include="string", interval="string", max_doc_count=integer, min_doc_count=integer, missing="string", name="string", q="string", ranges=ranges, size=integer, sort="string", sub_aggregates=["string"], time_zone="string", type="string")print(response)from falconpy import FirewallManagement
falcon = FirewallManagement(client_id=CLIENT_ID, client_secret=CLIENT_SECRET )
ranges = [ { "From": 0, "To": 0 }]
response = falcon.aggregate_policy_rules(date_ranges="string", exclude="string", field="string", filter="string", from=integer, include="string", interval="string", max_doc_count=integer, min_doc_count=integer, missing="string", name="string", q="string", ranges=ranges, size=integer, sort="string", sub_aggregates=["string"], time_zone="string", type="string")print(response)from falconpy import APIHarnessV2
falcon = APIHarnessV2(client_id=CLIENT_ID, client_secret=CLIENT_SECRET )
body_payload = [ { "date_ranges": [ { "from": "string", "to": "string" } ], "exclude": "string", "extended_bounds": { "max": "string", "min": "string" }, "field": "string", "filter": "string", "filters_spec": { "filters": {}, "other_bucket": boolean, "other_bucket_key": "string" }, "from": integer, "include": "string", "interval": "string", "max_doc_count": integer, "min_doc_count": integer, "missing": "string", "name": "string", "percents": ["string"], "q": "string", "ranges": [ { "from": integer, "to": integer } ], "size": integer, "sort": "string", "sub_aggregates": [ { "date_ranges": ["string"], "exclude": "string", "extended_bounds": {}, "field": "string", "filter": "string", "filters_spec": {}, "from": integer, "include": "string", "interval": "string", "max_doc_count": integer, "min_doc_count": integer, "missing": "string", "name": "string", "percents": ["string"], "q": "string", "ranges": ["string"], "size": integer, "sort": "string", "sub_aggregates": ["string"], "time_zone": "string", "type": "string" } ], "time_zone": "string", "type": "string" }]
response = falcon.command("aggregate_policy_rules", body=body_payload)print(response)Examples coming soon.
package main
import ( "context" "fmt" "os"
"github.com/crowdstrike/gofalcon/falcon" "github.com/crowdstrike/gofalcon/falcon/client/firewall_management" "github.com/crowdstrike/gofalcon/falcon/models")
func main() { client, err := falcon.NewClient(&falcon.ApiConfig{ ClientId: os.Getenv("FALCON_CLIENT_ID"), ClientSecret: os.Getenv("FALCON_CLIENT_SECRET"), Context: context.Background(), }) if err != nil { panic(err) }
from := "string" to := "string" exclude := "string" field := "string" filter := "string" from := integer include := "string" interval := "string" max_doc_count := integer min_doc_count := integer missing := "string" name := "string" q := "string" From := integer To := integer size := integer sort := "string" time_zone := "string" type := "string"
response, err := client.FirewallManagement.AggregatePolicyRules( &firewall_management.AggregatePolicyRulesParams{ Body: []*models.FwmgrMsaAggregateQueryRequest{ { DateRanges: []interface{}{ { From: &from, To: &to, }, }, Exclude: &exclude, ExtendedBounds: &struct{}{}, Field: &field, Filter: &filter, FiltersSpec: &struct{}{}, From: &from, Include: &include, Interval: &interval, MaxDocCount: &max_doc_count, MinDocCount: &min_doc_count, Missing: &missing, Name: &name, Percents: []interface{}{}, Q: &q, Ranges: []interface{}{ { From: &From, To: &To, }, }, Size: &size, Sort: &sort, SubAggregates: []interface{}{ { DateRanges: []interface{}{ { From: &from, To: &to, }, }, Exclude: &exclude, ExtendedBounds: &struct{}{}, Field: &field, Filter: &filter, FiltersSpec: &struct{}{}, From: &from, Include: &include, Interval: &interval, MaxDocCount: &max_doc_count, MinDocCount: &min_doc_count, Missing: &missing, Name: &name, Percents: []interface{}{}, Q: &q, Ranges: []interface{}{ { From: &From, To: &To, }, }, Size: &size, Sort: &sort, SubAggregates: []interface{}{ { DateRanges: []interface{}{}, Exclude: &exclude, ExtendedBounds: &struct{}{}, Field: &field, Filter: &filter, FiltersSpec: &struct{}{}, From: &from, Include: &include, Interval: &interval, MaxDocCount: &max_doc_count, MinDocCount: &min_doc_count, Missing: &missing, Name: &name, Percents: []interface{}{}, Q: &q, Ranges: []interface{}{}, Size: &size, Sort: &sort, SubAggregates: []interface{}{}, TimeZone: &time_zone, Type: &type, }, }, TimeZone: &time_zone, Type: &type, }, }, TimeZone: &time_zone, Type: &type, }, }, Context: context.Background(), }, ) if err != nil { panic(falcon.ErrorExplain(err)) }
fmt.Printf("%+v\n", response.Payload)}import { FalconClient } from "crowdstrike-falcon";
const client = new FalconClient({ cloud: process.env.FALCON_CLOUD!, clientId: process.env.FALCON_CLIENT_ID!, clientSecret: process.env.FALCON_CLIENT_SECRET!,});
const response = await client.firewallManagement.aggregatePolicyRules( [{ dateRanges: [{ from: "string", to: "string" }], exclude: "string", extendedBounds: { max: "string", min: "string" }, field: "string", filter: "string", filtersSpec: { filters: {}, otherBucket: boolean, otherBucketKey: "string" }, from: integer, include: "string", interval: "string", maxDocCount: integer, minDocCount: integer, missing: "string", name: "string", percents: [], q: "string", ranges: [{ From: integer, To: integer }], size: integer, sort: "string", subAggregates: [{ dateRanges: [{ from: "string", to: "string" }], exclude: "string", extendedBounds: { max: "string", min: "string" }, field: "string", filter: "string", filtersSpec: { filters: {}, otherBucket: boolean, otherBucketKey: "string" }, from: integer, include: "string", interval: "string", maxDocCount: integer, minDocCount: integer, missing: "string", name: "string", percents: [], q: "string", ranges: [{ From: integer, To: integer }], size: integer, sort: "string", subAggregates: [{ dateRanges: [], exclude: "string", extendedBounds: {}, field: "string", filter: "string", filtersSpec: {}, from: integer, include: "string", interval: "string", maxDocCount: integer, minDocCount: integer, missing: "string", name: "string", percents: [], q: "string", ranges: [], size: integer, sort: "string", subAggregates: [], timeZone: "string", type: "string" }], timeZone: "string", type: "string" }], timeZone: "string", type: "string"}] // body);
console.log(response);use rusty_falcon::apis::firewall_management_api::aggregate_policy_rules;use rusty_falcon::easy::client::FalconHandle;use rusty_falcon::models::FwmgrMsaAggregateQueryRequest;
#[tokio::main]async fn main() { let falcon = FalconHandle::from_env().await.expect("Could not authenticate");
let body = vec![FwmgrMsaAggregateQueryRequest { date_ranges: vec![DateRangeSpec { from: Some("string".to_string()), to: Some("string".to_string()), ..Default::default() }], exclude: Some("string".to_string()), field: Some("string".to_string()), filter: Some("string".to_string()), filters_spec: Default::default(), from: Some(integer), include: Some("string".to_string()), interval: Some("string".to_string()), missing: Some("string".to_string()), name: Some("string".to_string()), percents: vec![], q: Some("string".to_string()), ranges: vec![RangeSpec { from: Some(integer), to: Some(integer), ..Default::default() }], size: Some(integer), sort: Some("string".to_string()), sub_aggregates: vec![AggregateQueryRequest { date_ranges: vec![DateRangeSpec { from: Some("string".to_string()), to: Some("string".to_string()), ..Default::default() }], exclude: Some("string".to_string()), field: Some("string".to_string()), filter: Some("string".to_string()), filters_spec: Default::default(), from: Some(integer), include: Some("string".to_string()), interval: Some("string".to_string()), missing: Some("string".to_string()), name: Some("string".to_string()), percents: vec![], q: Some("string".to_string()), ranges: vec![RangeSpec { from: Some(integer), to: Some(integer), ..Default::default() }], size: Some(integer), sort: Some("string".to_string()), sub_aggregates: vec![AggregateQueryRequest { date_ranges: vec![], exclude: Some("string".to_string()), field: Some("string".to_string()), filter: Some("string".to_string()), filters_spec: Default::default(), from: Some(integer), include: Some("string".to_string()), interval: Some("string".to_string()), missing: Some("string".to_string()), name: Some("string".to_string()), percents: vec![], q: Some("string".to_string()), ranges: vec![], size: Some(integer), sort: Some("string".to_string()), sub_aggregates: vec![], time_zone: Some("string".to_string()), type: Some("string".to_string()), ..Default::default() }], time_zone: Some("string".to_string()), type: Some("string".to_string()), ..Default::default() }], time_zone: Some("string".to_string()), type: Some("string".to_string()), ..Default::default() }];
let response = aggregate_policy_rules( &falcon.cfg, // configuration body, // body ).await.expect("API call failed");
println!("{:?}", response);}require "crimson-falcon"
Falcon.configure do |config| config.client_id = ENV["FALCON_CLIENT_ID"] config.client_secret = ENV["FALCON_CLIENT_SECRET"] config.cloud = ENV["FALCON_CLOUD"]end
api = Falcon::FirewallManagement.new
body = [Falcon::FwmgrMsaAggregateQueryRequest.new( date_ranges: [{ from: 'string', to: 'string' }], exclude: 'string', extended_bounds: { max: 'string', min: 'string' }, field: 'string', filter: 'string', filters_spec: { filters: {}, other_bucket: boolean, other_bucket_key: 'string' }, from: integer, include: 'string', interval: 'string', max_doc_count: integer, min_doc_count: integer, missing: 'string', name: 'string', percents: [], q: 'string', ranges: [{ From: integer, To: integer }], size: integer, sort: 'string', sub_aggregates: [{ date_ranges: [{ from: 'string', to: 'string' }], exclude: 'string', extended_bounds: { max: 'string', min: 'string' }, field: 'string', filter: 'string', filters_spec: { filters: {}, other_bucket: boolean, other_bucket_key: 'string' }, from: integer, include: 'string', interval: 'string', max_doc_count: integer, min_doc_count: integer, missing: 'string', name: 'string', percents: [], q: 'string', ranges: [{ From: integer, To: integer }], size: integer, sort: 'string', sub_aggregates: [{ date_ranges: [], exclude: 'string', extended_bounds: {}, field: 'string', filter: 'string', filters_spec: {}, from: integer, include: 'string', interval: 'string', max_doc_count: integer, min_doc_count: integer, missing: 'string', name: 'string', percents: [], q: 'string', ranges: [], size: integer, sort: 'string', sub_aggregates: [], time_zone: 'string', type: 'string' }], time_zone: 'string', type: 'string' }], time_zone: 'string', type: 'string')]
response = api.aggregate_policy_rules(body)
puts responseaggregate_rule_groups
Section titled “aggregate_rule_groups”Aggregate rule groups for customer
aggregate_rule_groupsParameters
Section titled “Parameters”| Name | Type | Data type | Description |
|---|---|---|---|
| body | body | list of dictionaries | Full body payload in JSON format. |
| date_ranges | body | list of dictionaries | Applies to date_range aggregations. Example: [{“from”: “2016-05-28T09:00:31Z”, “to”: “2016-05-30T09:00:31Z”}, {“from”: “2016-06-01T09:00:31Z”, “to”: “2016-06-10T09:00:31Z”}] |
| exclude | body | string | Elements to exclude. |
| field | body | string | The field on which to compute the aggregation. |
| filter | body | string | FQL syntax formatted string to use to filter the results. |
| from | body | integer | Starting position. |
| include | body | string | Elements to include. |
| interval | body | string | Time interval for date histogram aggregations. Valid values include: year, month, week, day, hour, minute. |
| max_doc_count | body | integer | Only return buckets if values are less than or equal to the value here. |
| min_doc_count | body | integer | Only return buckets if values are greater than or equal to the value here. |
| missing | body | string | Missing is the value to be used when the aggregation field is missing from the object. In other words, the missing parameter defines how documents that are missing a value should be treated. By default they will be ignored, but it is also possible to treat them as if they had a value. |
| name | body | string | Name of the aggregate query, as chosen by the user. Used to identify the results returned to you. |
| q | body | string | Full text search across all metadata fields. |
| ranges | body | list of dictionaries | Applies to range aggregations. Ranges values will depend on field. For example, if max_severity is used, ranges might look like: [{“From”: 0, “To”: 70}, {“From”: 70, “To”: 100}] |
| size | body | integer | The max number of term buckets to be returned. |
| sub_aggregates | body | list of dictionaries | A nested aggregation, such as: [{“name”: “max_first_behavior”, “type”: “max”, “field”: “first_behavior”}]. There is a maximum of 3 nested aggregations per request. |
| sort | body | string | FQL syntax string to sort bucket results. _count - sort by document count; _term - sort by the string value alphabetically. Supports asc and desc using | format. Example: _count|desc |
| time_zone | body | string | Time zone for bucket results. |
| type | body | string | Type of aggregation. Valid values include: date_histogram (aggregates counts on a specified time interval, requires use of “interval” field), date_range (aggregates counts on custom defined date range buckets), terms (buckets alerts by the value of a specified field), range (buckets alerts by specified numeric ranges of a specified field), cardinality (returns the count of distinct values in a specified field), max (returns the maximum value of a specified field), min (returns the minimum value of a specified field), avg (returns the average value of the specified field), sum (returns the total sum of all values for the specified field), percentiles (returns the following percentiles for the specified field: 1, 5, 25, 50, 75, 95, 99). |
Code Examples
Section titled “Code Examples”from falconpy import FirewallManagement
falcon = FirewallManagement(client_id=CLIENT_ID, client_secret=CLIENT_SECRET )
ranges = [ { "From": 0, "To": 0 }]
response = falcon.aggregate_rule_groups(date_ranges="string", exclude="string", field="string", filter="string", from=integer, include="string", interval="string", max_doc_count=integer, min_doc_count=integer, missing="string", name="string", q="string", ranges=ranges, size=integer, sort="string", sub_aggregates=["string"], time_zone="string", type="string")print(response)from falconpy import FirewallManagement
falcon = FirewallManagement(client_id=CLIENT_ID, client_secret=CLIENT_SECRET )
ranges = [ { "From": 0, "To": 0 }]
response = falcon.aggregate_rule_groups(date_ranges="string", exclude="string", field="string", filter="string", from=integer, include="string", interval="string", max_doc_count=integer, min_doc_count=integer, missing="string", name="string", q="string", ranges=ranges, size=integer, sort="string", sub_aggregates=["string"], time_zone="string", type="string")print(response)from falconpy import APIHarnessV2
falcon = APIHarnessV2(client_id=CLIENT_ID, client_secret=CLIENT_SECRET )
body_payload = [ { "date_ranges": [ { "from": "string", "to": "string" } ], "exclude": "string", "extended_bounds": { "max": "string", "min": "string" }, "field": "string", "filter": "string", "filters_spec": { "filters": {}, "other_bucket": boolean, "other_bucket_key": "string" }, "from": integer, "include": "string", "interval": "string", "max_doc_count": integer, "min_doc_count": integer, "missing": "string", "name": "string", "percents": ["string"], "q": "string", "ranges": [ { "from": integer, "to": integer } ], "size": integer, "sort": "string", "sub_aggregates": [ { "date_ranges": ["string"], "exclude": "string", "extended_bounds": {}, "field": "string", "filter": "string", "filters_spec": {}, "from": integer, "include": "string", "interval": "string", "max_doc_count": integer, "min_doc_count": integer, "missing": "string", "name": "string", "percents": ["string"], "q": "string", "ranges": ["string"], "size": integer, "sort": "string", "sub_aggregates": ["string"], "time_zone": "string", "type": "string" } ], "time_zone": "string", "type": "string" }]
response = falcon.command("aggregate_rule_groups", body=body_payload)print(response)Examples coming soon.
package main
import ( "context" "fmt" "os"
"github.com/crowdstrike/gofalcon/falcon" "github.com/crowdstrike/gofalcon/falcon/client/firewall_management" "github.com/crowdstrike/gofalcon/falcon/models")
func main() { client, err := falcon.NewClient(&falcon.ApiConfig{ ClientId: os.Getenv("FALCON_CLIENT_ID"), ClientSecret: os.Getenv("FALCON_CLIENT_SECRET"), Context: context.Background(), }) if err != nil { panic(err) }
from := "string" to := "string" exclude := "string" field := "string" filter := "string" from := integer include := "string" interval := "string" max_doc_count := integer min_doc_count := integer missing := "string" name := "string" q := "string" From := integer To := integer size := integer sort := "string" time_zone := "string" type := "string"
response, err := client.FirewallManagement.AggregateRuleGroups( &firewall_management.AggregateRuleGroupsParams{ Body: []*models.FwmgrMsaAggregateQueryRequest{ { DateRanges: []interface{}{ { From: &from, To: &to, }, }, Exclude: &exclude, ExtendedBounds: &struct{}{}, Field: &field, Filter: &filter, FiltersSpec: &struct{}{}, From: &from, Include: &include, Interval: &interval, MaxDocCount: &max_doc_count, MinDocCount: &min_doc_count, Missing: &missing, Name: &name, Percents: []interface{}{}, Q: &q, Ranges: []interface{}{ { From: &From, To: &To, }, }, Size: &size, Sort: &sort, SubAggregates: []interface{}{ { DateRanges: []interface{}{ { From: &from, To: &to, }, }, Exclude: &exclude, ExtendedBounds: &struct{}{}, Field: &field, Filter: &filter, FiltersSpec: &struct{}{}, From: &from, Include: &include, Interval: &interval, MaxDocCount: &max_doc_count, MinDocCount: &min_doc_count, Missing: &missing, Name: &name, Percents: []interface{}{}, Q: &q, Ranges: []interface{}{ { From: &From, To: &To, }, }, Size: &size, Sort: &sort, SubAggregates: []interface{}{ { DateRanges: []interface{}{}, Exclude: &exclude, ExtendedBounds: &struct{}{}, Field: &field, Filter: &filter, FiltersSpec: &struct{}{}, From: &from, Include: &include, Interval: &interval, MaxDocCount: &max_doc_count, MinDocCount: &min_doc_count, Missing: &missing, Name: &name, Percents: []interface{}{}, Q: &q, Ranges: []interface{}{}, Size: &size, Sort: &sort, SubAggregates: []interface{}{}, TimeZone: &time_zone, Type: &type, }, }, TimeZone: &time_zone, Type: &type, }, }, TimeZone: &time_zone, Type: &type, }, }, Context: context.Background(), }, ) if err != nil { panic(falcon.ErrorExplain(err)) }
fmt.Printf("%+v\n", response.Payload)}import { FalconClient } from "crowdstrike-falcon";
const client = new FalconClient({ cloud: process.env.FALCON_CLOUD!, clientId: process.env.FALCON_CLIENT_ID!, clientSecret: process.env.FALCON_CLIENT_SECRET!,});
const response = await client.firewallManagement.aggregateRuleGroups( [{ dateRanges: [{ from: "string", to: "string" }], exclude: "string", extendedBounds: { max: "string", min: "string" }, field: "string", filter: "string", filtersSpec: { filters: {}, otherBucket: boolean, otherBucketKey: "string" }, from: integer, include: "string", interval: "string", maxDocCount: integer, minDocCount: integer, missing: "string", name: "string", percents: [], q: "string", ranges: [{ From: integer, To: integer }], size: integer, sort: "string", subAggregates: [{ dateRanges: [{ from: "string", to: "string" }], exclude: "string", extendedBounds: { max: "string", min: "string" }, field: "string", filter: "string", filtersSpec: { filters: {}, otherBucket: boolean, otherBucketKey: "string" }, from: integer, include: "string", interval: "string", maxDocCount: integer, minDocCount: integer, missing: "string", name: "string", percents: [], q: "string", ranges: [{ From: integer, To: integer }], size: integer, sort: "string", subAggregates: [{ dateRanges: [], exclude: "string", extendedBounds: {}, field: "string", filter: "string", filtersSpec: {}, from: integer, include: "string", interval: "string", maxDocCount: integer, minDocCount: integer, missing: "string", name: "string", percents: [], q: "string", ranges: [], size: integer, sort: "string", subAggregates: [], timeZone: "string", type: "string" }], timeZone: "string", type: "string" }], timeZone: "string", type: "string"}] // body);
console.log(response);use rusty_falcon::apis::firewall_management_api::aggregate_rule_groups;use rusty_falcon::easy::client::FalconHandle;use rusty_falcon::models::FwmgrMsaAggregateQueryRequest;
#[tokio::main]async fn main() { let falcon = FalconHandle::from_env().await.expect("Could not authenticate");
let body = vec![FwmgrMsaAggregateQueryRequest { date_ranges: vec![DateRangeSpec { from: Some("string".to_string()), to: Some("string".to_string()), ..Default::default() }], exclude: Some("string".to_string()), field: Some("string".to_string()), filter: Some("string".to_string()), filters_spec: Default::default(), from: Some(integer), include: Some("string".to_string()), interval: Some("string".to_string()), missing: Some("string".to_string()), name: Some("string".to_string()), percents: vec![], q: Some("string".to_string()), ranges: vec![RangeSpec { from: Some(integer), to: Some(integer), ..Default::default() }], size: Some(integer), sort: Some("string".to_string()), sub_aggregates: vec![AggregateQueryRequest { date_ranges: vec![DateRangeSpec { from: Some("string".to_string()), to: Some("string".to_string()), ..Default::default() }], exclude: Some("string".to_string()), field: Some("string".to_string()), filter: Some("string".to_string()), filters_spec: Default::default(), from: Some(integer), include: Some("string".to_string()), interval: Some("string".to_string()), missing: Some("string".to_string()), name: Some("string".to_string()), percents: vec![], q: Some("string".to_string()), ranges: vec![RangeSpec { from: Some(integer), to: Some(integer), ..Default::default() }], size: Some(integer), sort: Some("string".to_string()), sub_aggregates: vec![AggregateQueryRequest { date_ranges: vec![], exclude: Some("string".to_string()), field: Some("string".to_string()), filter: Some("string".to_string()), filters_spec: Default::default(), from: Some(integer), include: Some("string".to_string()), interval: Some("string".to_string()), missing: Some("string".to_string()), name: Some("string".to_string()), percents: vec![], q: Some("string".to_string()), ranges: vec![], size: Some(integer), sort: Some("string".to_string()), sub_aggregates: vec![], time_zone: Some("string".to_string()), type: Some("string".to_string()), ..Default::default() }], time_zone: Some("string".to_string()), type: Some("string".to_string()), ..Default::default() }], time_zone: Some("string".to_string()), type: Some("string".to_string()), ..Default::default() }];
let response = aggregate_rule_groups( &falcon.cfg, // configuration body, // body ).await.expect("API call failed");
println!("{:?}", response);}require "crimson-falcon"
Falcon.configure do |config| config.client_id = ENV["FALCON_CLIENT_ID"] config.client_secret = ENV["FALCON_CLIENT_SECRET"] config.cloud = ENV["FALCON_CLOUD"]end
api = Falcon::FirewallManagement.new
body = [Falcon::FwmgrMsaAggregateQueryRequest.new( date_ranges: [{ from: 'string', to: 'string' }], exclude: 'string', extended_bounds: { max: 'string', min: 'string' }, field: 'string', filter: 'string', filters_spec: { filters: {}, other_bucket: boolean, other_bucket_key: 'string' }, from: integer, include: 'string', interval: 'string', max_doc_count: integer, min_doc_count: integer, missing: 'string', name: 'string', percents: [], q: 'string', ranges: [{ From: integer, To: integer }], size: integer, sort: 'string', sub_aggregates: [{ date_ranges: [{ from: 'string', to: 'string' }], exclude: 'string', extended_bounds: { max: 'string', min: 'string' }, field: 'string', filter: 'string', filters_spec: { filters: {}, other_bucket: boolean, other_bucket_key: 'string' }, from: integer, include: 'string', interval: 'string', max_doc_count: integer, min_doc_count: integer, missing: 'string', name: 'string', percents: [], q: 'string', ranges: [{ From: integer, To: integer }], size: integer, sort: 'string', sub_aggregates: [{ date_ranges: [], exclude: 'string', extended_bounds: {}, field: 'string', filter: 'string', filters_spec: {}, from: integer, include: 'string', interval: 'string', max_doc_count: integer, min_doc_count: integer, missing: 'string', name: 'string', percents: [], q: 'string', ranges: [], size: integer, sort: 'string', sub_aggregates: [], time_zone: 'string', type: 'string' }], time_zone: 'string', type: 'string' }], time_zone: 'string', type: 'string')]
response = api.aggregate_rule_groups(body)
puts responseaggregate_rules
Section titled “aggregate_rules”Aggregate rules for customer
aggregate_rulesParameters
Section titled “Parameters”| Name | Type | Data type | Description |
|---|---|---|---|
| body | body | list of dictionaries | Full body payload in JSON format. |
| date_ranges | body | list of dictionaries | Applies to date_range aggregations. Example: [{“from”: “2016-05-28T09:00:31Z”, “to”: “2016-05-30T09:00:31Z”}, {“from”: “2016-06-01T09:00:31Z”, “to”: “2016-06-10T09:00:31Z”}] |
| exclude | body | string | Elements to exclude. |
| field | body | string | The field on which to compute the aggregation. |
| filter | body | string | FQL syntax formatted string to use to filter the results. |
| from | body | integer | Starting position. |
| include | body | string | Elements to include. |
| interval | body | string | Time interval for date histogram aggregations. Valid values include: year, month, week, day, hour, minute. |
| max_doc_count | body | integer | Only return buckets if values are less than or equal to the value here. |
| min_doc_count | body | integer | Only return buckets if values are greater than or equal to the value here. |
| missing | body | string | Missing is the value to be used when the aggregation field is missing from the object. In other words, the missing parameter defines how documents that are missing a value should be treated. By default they will be ignored, but it is also possible to treat them as if they had a value. |
| name | body | string | Name of the aggregate query, as chosen by the user. Used to identify the results returned to you. |
| q | body | string | Full text search across all metadata fields. |
| ranges | body | list of dictionaries | Applies to range aggregations. Ranges values will depend on field. For example, if max_severity is used, ranges might look like: [{“From”: 0, “To”: 70}, {“From”: 70, “To”: 100}] |
| size | body | integer | The max number of term buckets to be returned. |
| sub_aggregates | body | list of dictionaries | A nested aggregation, such as: [{“name”: “max_first_behavior”, “type”: “max”, “field”: “first_behavior”}]. There is a maximum of 3 nested aggregations per request. |
| sort | body | string | FQL syntax string to sort bucket results. _count - sort by document count; _term - sort by the string value alphabetically. Supports asc and desc using | format. Example: _count|desc |
| time_zone | body | string | Time zone for bucket results. |
| type | body | string | Type of aggregation. Valid values include: date_histogram (aggregates counts on a specified time interval, requires use of “interval” field), date_range (aggregates counts on custom defined date range buckets), terms (buckets alerts by the value of a specified field), range (buckets alerts by specified numeric ranges of a specified field), cardinality (returns the count of distinct values in a specified field), max (returns the maximum value of a specified field), min (returns the minimum value of a specified field), avg (returns the average value of the specified field), sum (returns the total sum of all values for the specified field), percentiles (returns the following percentiles for the specified field: 1, 5, 25, 50, 75, 95, 99). |
Code Examples
Section titled “Code Examples”from falconpy import FirewallManagement
falcon = FirewallManagement(client_id=CLIENT_ID, client_secret=CLIENT_SECRET )
ranges = [ { "From": 0, "To": 0 }]
response = falcon.aggregate_rules(date_ranges="string", exclude="string", field="string", filter="string", from=integer, include="string", interval="string", max_doc_count=integer, min_doc_count=integer, missing="string", name="string", q="string", ranges=ranges, size=integer, sort="string", sub_aggregates=["string"], time_zone="string", type="string")print(response)from falconpy import FirewallManagement
falcon = FirewallManagement(client_id=CLIENT_ID, client_secret=CLIENT_SECRET )
ranges = [ { "From": 0, "To": 0 }]
response = falcon.aggregate_rules(date_ranges="string", exclude="string", field="string", filter="string", from=integer, include="string", interval="string", max_doc_count=integer, min_doc_count=integer, missing="string", name="string", q="string", ranges=ranges, size=integer, sort="string", sub_aggregates=["string"], time_zone="string", type="string")print(response)from falconpy import APIHarnessV2
falcon = APIHarnessV2(client_id=CLIENT_ID, client_secret=CLIENT_SECRET )
body_payload = [ { "date_ranges": [ { "from": "string", "to": "string" } ], "exclude": "string", "extended_bounds": { "max": "string", "min": "string" }, "field": "string", "filter": "string", "filters_spec": { "filters": {}, "other_bucket": boolean, "other_bucket_key": "string" }, "from": integer, "include": "string", "interval": "string", "max_doc_count": integer, "min_doc_count": integer, "missing": "string", "name": "string", "percents": ["string"], "q": "string", "ranges": [ { "from": integer, "to": integer } ], "size": integer, "sort": "string", "sub_aggregates": [ { "date_ranges": ["string"], "exclude": "string", "extended_bounds": {}, "field": "string", "filter": "string", "filters_spec": {}, "from": integer, "include": "string", "interval": "string", "max_doc_count": integer, "min_doc_count": integer, "missing": "string", "name": "string", "percents": ["string"], "q": "string", "ranges": ["string"], "size": integer, "sort": "string", "sub_aggregates": ["string"], "time_zone": "string", "type": "string" } ], "time_zone": "string", "type": "string" }]
response = falcon.command("aggregate_rules", body=body_payload)print(response)Examples coming soon.
package main
import ( "context" "fmt" "os"
"github.com/crowdstrike/gofalcon/falcon" "github.com/crowdstrike/gofalcon/falcon/client/firewall_management" "github.com/crowdstrike/gofalcon/falcon/models")
func main() { client, err := falcon.NewClient(&falcon.ApiConfig{ ClientId: os.Getenv("FALCON_CLIENT_ID"), ClientSecret: os.Getenv("FALCON_CLIENT_SECRET"), Context: context.Background(), }) if err != nil { panic(err) }
from := "string" to := "string" exclude := "string" field := "string" filter := "string" from := integer include := "string" interval := "string" max_doc_count := integer min_doc_count := integer missing := "string" name := "string" q := "string" From := integer To := integer size := integer sort := "string" time_zone := "string" type := "string"
response, err := client.FirewallManagement.AggregateRules( &firewall_management.AggregateRulesParams{ Body: []*models.FwmgrMsaAggregateQueryRequest{ { DateRanges: []interface{}{ { From: &from, To: &to, }, }, Exclude: &exclude, ExtendedBounds: &struct{}{}, Field: &field, Filter: &filter, FiltersSpec: &struct{}{}, From: &from, Include: &include, Interval: &interval, MaxDocCount: &max_doc_count, MinDocCount: &min_doc_count, Missing: &missing, Name: &name, Percents: []interface{}{}, Q: &q, Ranges: []interface{}{ { From: &From, To: &To, }, }, Size: &size, Sort: &sort, SubAggregates: []interface{}{ { DateRanges: []interface{}{ { From: &from, To: &to, }, }, Exclude: &exclude, ExtendedBounds: &struct{}{}, Field: &field, Filter: &filter, FiltersSpec: &struct{}{}, From: &from, Include: &include, Interval: &interval, MaxDocCount: &max_doc_count, MinDocCount: &min_doc_count, Missing: &missing, Name: &name, Percents: []interface{}{}, Q: &q, Ranges: []interface{}{ { From: &From, To: &To, }, }, Size: &size, Sort: &sort, SubAggregates: []interface{}{ { DateRanges: []interface{}{}, Exclude: &exclude, ExtendedBounds: &struct{}{}, Field: &field, Filter: &filter, FiltersSpec: &struct{}{}, From: &from, Include: &include, Interval: &interval, MaxDocCount: &max_doc_count, MinDocCount: &min_doc_count, Missing: &missing, Name: &name, Percents: []interface{}{}, Q: &q, Ranges: []interface{}{}, Size: &size, Sort: &sort, SubAggregates: []interface{}{}, TimeZone: &time_zone, Type: &type, }, }, TimeZone: &time_zone, Type: &type, }, }, TimeZone: &time_zone, Type: &type, }, }, Context: context.Background(), }, ) if err != nil { panic(falcon.ErrorExplain(err)) }
fmt.Printf("%+v\n", response.Payload)}import { FalconClient } from "crowdstrike-falcon";
const client = new FalconClient({ cloud: process.env.FALCON_CLOUD!, clientId: process.env.FALCON_CLIENT_ID!, clientSecret: process.env.FALCON_CLIENT_SECRET!,});
const response = await client.firewallManagement.aggregateRules( [{ dateRanges: [{ from: "string", to: "string" }], exclude: "string", extendedBounds: { max: "string", min: "string" }, field: "string", filter: "string", filtersSpec: { filters: {}, otherBucket: boolean, otherBucketKey: "string" }, from: integer, include: "string", interval: "string", maxDocCount: integer, minDocCount: integer, missing: "string", name: "string", percents: [], q: "string", ranges: [{ From: integer, To: integer }], size: integer, sort: "string", subAggregates: [{ dateRanges: [{ from: "string", to: "string" }], exclude: "string", extendedBounds: { max: "string", min: "string" }, field: "string", filter: "string", filtersSpec: { filters: {}, otherBucket: boolean, otherBucketKey: "string" }, from: integer, include: "string", interval: "string", maxDocCount: integer, minDocCount: integer, missing: "string", name: "string", percents: [], q: "string", ranges: [{ From: integer, To: integer }], size: integer, sort: "string", subAggregates: [{ dateRanges: [], exclude: "string", extendedBounds: {}, field: "string", filter: "string", filtersSpec: {}, from: integer, include: "string", interval: "string", maxDocCount: integer, minDocCount: integer, missing: "string", name: "string", percents: [], q: "string", ranges: [], size: integer, sort: "string", subAggregates: [], timeZone: "string", type: "string" }], timeZone: "string", type: "string" }], timeZone: "string", type: "string"}] // body);
console.log(response);use rusty_falcon::apis::firewall_management_api::aggregate_rules;use rusty_falcon::easy::client::FalconHandle;use rusty_falcon::models::FwmgrMsaAggregateQueryRequest;
#[tokio::main]async fn main() { let falcon = FalconHandle::from_env().await.expect("Could not authenticate");
let body = vec![FwmgrMsaAggregateQueryRequest { date_ranges: vec![DateRangeSpec { from: Some("string".to_string()), to: Some("string".to_string()), ..Default::default() }], exclude: Some("string".to_string()), field: Some("string".to_string()), filter: Some("string".to_string()), filters_spec: Default::default(), from: Some(integer), include: Some("string".to_string()), interval: Some("string".to_string()), missing: Some("string".to_string()), name: Some("string".to_string()), percents: vec![], q: Some("string".to_string()), ranges: vec![RangeSpec { from: Some(integer), to: Some(integer), ..Default::default() }], size: Some(integer), sort: Some("string".to_string()), sub_aggregates: vec![AggregateQueryRequest { date_ranges: vec![DateRangeSpec { from: Some("string".to_string()), to: Some("string".to_string()), ..Default::default() }], exclude: Some("string".to_string()), field: Some("string".to_string()), filter: Some("string".to_string()), filters_spec: Default::default(), from: Some(integer), include: Some("string".to_string()), interval: Some("string".to_string()), missing: Some("string".to_string()), name: Some("string".to_string()), percents: vec![], q: Some("string".to_string()), ranges: vec![RangeSpec { from: Some(integer), to: Some(integer), ..Default::default() }], size: Some(integer), sort: Some("string".to_string()), sub_aggregates: vec![AggregateQueryRequest { date_ranges: vec![], exclude: Some("string".to_string()), field: Some("string".to_string()), filter: Some("string".to_string()), filters_spec: Default::default(), from: Some(integer), include: Some("string".to_string()), interval: Some("string".to_string()), missing: Some("string".to_string()), name: Some("string".to_string()), percents: vec![], q: Some("string".to_string()), ranges: vec![], size: Some(integer), sort: Some("string".to_string()), sub_aggregates: vec![], time_zone: Some("string".to_string()), type: Some("string".to_string()), ..Default::default() }], time_zone: Some("string".to_string()), type: Some("string".to_string()), ..Default::default() }], time_zone: Some("string".to_string()), type: Some("string".to_string()), ..Default::default() }];
let response = aggregate_rules( &falcon.cfg, // configuration body, // body ).await.expect("API call failed");
println!("{:?}", response);}require "crimson-falcon"
Falcon.configure do |config| config.client_id = ENV["FALCON_CLIENT_ID"] config.client_secret = ENV["FALCON_CLIENT_SECRET"] config.cloud = ENV["FALCON_CLOUD"]end
api = Falcon::FirewallManagement.new
body = [Falcon::FwmgrMsaAggregateQueryRequest.new( date_ranges: [{ from: 'string', to: 'string' }], exclude: 'string', extended_bounds: { max: 'string', min: 'string' }, field: 'string', filter: 'string', filters_spec: { filters: {}, other_bucket: boolean, other_bucket_key: 'string' }, from: integer, include: 'string', interval: 'string', max_doc_count: integer, min_doc_count: integer, missing: 'string', name: 'string', percents: [], q: 'string', ranges: [{ From: integer, To: integer }], size: integer, sort: 'string', sub_aggregates: [{ date_ranges: [{ from: 'string', to: 'string' }], exclude: 'string', extended_bounds: { max: 'string', min: 'string' }, field: 'string', filter: 'string', filters_spec: { filters: {}, other_bucket: boolean, other_bucket_key: 'string' }, from: integer, include: 'string', interval: 'string', max_doc_count: integer, min_doc_count: integer, missing: 'string', name: 'string', percents: [], q: 'string', ranges: [{ From: integer, To: integer }], size: integer, sort: 'string', sub_aggregates: [{ date_ranges: [], exclude: 'string', extended_bounds: {}, field: 'string', filter: 'string', filters_spec: {}, from: integer, include: 'string', interval: 'string', max_doc_count: integer, min_doc_count: integer, missing: 'string', name: 'string', percents: [], q: 'string', ranges: [], size: integer, sort: 'string', sub_aggregates: [], time_zone: 'string', type: 'string' }], time_zone: 'string', type: 'string' }], time_zone: 'string', type: 'string')]
response = api.aggregate_rules(body)
puts responseget_events
Section titled “get_events”Get events entities by ID and optionally version
get_eventsParameters
Section titled “Parameters”| Name | Type | Data type | Description |
|---|---|---|---|
| ids | query | string or list of strings | The events to retrieve, identified by ID. |
| parameters | query | dictionary | Full query string parameters payload in JSON format. |
Code Examples
Section titled “Code Examples”from falconpy import FirewallManagement
falcon = FirewallManagement(client_id=CLIENT_ID, client_secret=CLIENT_SECRET )
id_list = 'ID1,ID2,ID3' # Can also pass a list here: ['ID1', 'ID2', 'ID3']
response = falcon.get_events(ids=id_list)print(response)from falconpy import FirewallManagement
falcon = FirewallManagement(client_id=CLIENT_ID, client_secret=CLIENT_SECRET )
id_list = 'ID1,ID2,ID3' # Can also pass a list here: ['ID1', 'ID2', 'ID3']
response = falcon.get_events(ids=id_list)print(response)from falconpy import APIHarnessV2
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("get_events", ids=id_list)print(response)Get-FalconFirewallEvent -Id @("ID1", "ID2")package main
import ( "context" "fmt" "os"
"github.com/crowdstrike/gofalcon/falcon" "github.com/crowdstrike/gofalcon/falcon/client/firewall_management")
func main() { client, err := falcon.NewClient(&falcon.ApiConfig{ ClientId: os.Getenv("FALCON_CLIENT_ID"), ClientSecret: os.Getenv("FALCON_CLIENT_SECRET"), Context: context.Background(), }) if err != nil { panic(err) }
response, err := client.FirewallManagement.GetEvents( &firewall_management.GetEventsParams{ Ids: []string{"ID1", "ID2", "ID3"}, Context: context.Background(), }, ) if err != nil { panic(falcon.ErrorExplain(err)) }
fmt.Printf("%+v\n", response.Payload)}import { FalconClient } from "crowdstrike-falcon";
const client = new FalconClient({ cloud: process.env.FALCON_CLOUD!, clientId: process.env.FALCON_CLIENT_ID!, clientSecret: process.env.FALCON_CLIENT_SECRET!,});
const response = await client.firewallManagement.getEvents(["ID1", "ID2", "ID3"]); // ids
console.log(response);use rusty_falcon::apis::firewall_management_api::get_events;use rusty_falcon::easy::client::FalconHandle;
#[tokio::main]async fn main() { let falcon = FalconHandle::from_env().await.expect("Could not authenticate");
let response = get_events( &falcon.cfg, // configuration vec!["string".to_string()], // ids ).await.expect("API call failed");
println!("{:?}", response);}require "crimson-falcon"
Falcon.configure do |config| config.client_id = ENV["FALCON_CLIENT_ID"] config.client_secret = ENV["FALCON_CLIENT_SECRET"] config.cloud = ENV["FALCON_CLOUD"]end
api = Falcon::FirewallManagement.new
response = api.get_events(['ID1', 'ID2', 'ID3'])
puts responseget_firewall_fields
Section titled “get_firewall_fields”Get the firewall field specifications by ID
get_firewall_fieldsParameters
Section titled “Parameters”| Name | Type | Data type | Description |
|---|---|---|---|
| ids | query | string or list of strings | The rule types to retrieve, identified by ID. |
| parameters | query | dictionary | Full query string parameters payload in JSON format. |
Code Examples
Section titled “Code Examples”from falconpy import FirewallManagement
falcon = FirewallManagement(client_id=CLIENT_ID, client_secret=CLIENT_SECRET )
id_list = 'ID1,ID2,ID3' # Can also pass a list here: ['ID1', 'ID2', 'ID3']
response = falcon.get_firewall_fields(ids=id_list)print(response)from falconpy import FirewallManagement
falcon = FirewallManagement(client_id=CLIENT_ID, client_secret=CLIENT_SECRET )
id_list = 'ID1,ID2,ID3' # Can also pass a list here: ['ID1', 'ID2', 'ID3']
response = falcon.get_firewall_fields(ids=id_list)print(response)from falconpy import APIHarnessV2
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("get_firewall_fields", ids=id_list)print(response)Get-FalconFirewallField -Id @("ID1", "ID2")package main
import ( "context" "fmt" "os"
"github.com/crowdstrike/gofalcon/falcon" "github.com/crowdstrike/gofalcon/falcon/client/firewall_management")
func main() { client, err := falcon.NewClient(&falcon.ApiConfig{ ClientId: os.Getenv("FALCON_CLIENT_ID"), ClientSecret: os.Getenv("FALCON_CLIENT_SECRET"), Context: context.Background(), }) if err != nil { panic(err) }
response, err := client.FirewallManagement.GetFirewallFields( &firewall_management.GetFirewallFieldsParams{ Ids: []string{"ID1", "ID2", "ID3"}, Context: context.Background(), }, ) if err != nil { panic(falcon.ErrorExplain(err)) }
fmt.Printf("%+v\n", response.Payload)}import { FalconClient } from "crowdstrike-falcon";
const client = new FalconClient({ cloud: process.env.FALCON_CLOUD!, clientId: process.env.FALCON_CLIENT_ID!, clientSecret: process.env.FALCON_CLIENT_SECRET!,});
const response = await client.firewallManagement.getFirewallFields(["ID1", "ID2", "ID3"]); // ids
console.log(response);use rusty_falcon::apis::firewall_management_api::get_firewall_fields;use rusty_falcon::easy::client::FalconHandle;
#[tokio::main]async fn main() { let falcon = FalconHandle::from_env().await.expect("Could not authenticate");
let response = get_firewall_fields( &falcon.cfg, // configuration vec!["string".to_string()], // ids ).await.expect("API call failed");
println!("{:?}", response);}require "crimson-falcon"
Falcon.configure do |config| config.client_id = ENV["FALCON_CLIENT_ID"] config.client_secret = ENV["FALCON_CLIENT_SECRET"] config.cloud = ENV["FALCON_CLOUD"]end
api = Falcon::FirewallManagement.new
response = api.get_firewall_fields(['ID1', 'ID2', 'ID3'])
puts responseget_network_locations_details
Section titled “get_network_locations_details”Get network locations entities by ID
get_network_locations_detailsParameters
Section titled “Parameters”| Name | Type | Data type | Description |
|---|---|---|---|
| ids | query | string or list of strings | The ID of the network location to retrieve. |
| parameters | query | dictionary | Full query string parameters payload in JSON format, not required if using ids keyword. |
Code Examples
Section titled “Code Examples”from falconpy import FirewallManagement
falcon = FirewallManagement(client_id=CLIENT_ID, client_secret=CLIENT_SECRET )
id_list = 'ID1,ID2,ID3' # Can also pass a list here: ['ID1', 'ID2', 'ID3']
response = falcon.get_network_locations_details(ids=id_list)print(response)from falconpy import FirewallManagement
falcon = FirewallManagement(client_id=CLIENT_ID, client_secret=CLIENT_SECRET )
id_list = 'ID1,ID2,ID3' # Can also pass a list here: ['ID1', 'ID2', 'ID3']
response = falcon.get_network_locations_details(ids=id_list)print(response)from falconpy import APIHarnessV2
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("get_network_locations_details", ids=id_list)print(response)Get-FalconFirewallLocation -Id @("ID1", "ID2")package main
import ( "context" "fmt" "os"
"github.com/crowdstrike/gofalcon/falcon" "github.com/crowdstrike/gofalcon/falcon/client/firewall_management")
func main() { client, err := falcon.NewClient(&falcon.ApiConfig{ ClientId: os.Getenv("FALCON_CLIENT_ID"), ClientSecret: os.Getenv("FALCON_CLIENT_SECRET"), Context: context.Background(), }) if err != nil { panic(err) }
response, err := client.FirewallManagement.GetNetworkLocationsDetails( &firewall_management.GetNetworkLocationsDetailsParams{ Ids: []string{"ID1", "ID2", "ID3"}, Context: context.Background(), }, ) if err != nil { panic(falcon.ErrorExplain(err)) }
fmt.Printf("%+v\n", response.Payload)}import { FalconClient } from "crowdstrike-falcon";
const client = new FalconClient({ cloud: process.env.FALCON_CLOUD!, clientId: process.env.FALCON_CLIENT_ID!, clientSecret: process.env.FALCON_CLIENT_SECRET!,});
const response = await client.firewallManagement.getNetworkLocationsDetails(["ID1", "ID2", "ID3"]); // ids
console.log(response);use rusty_falcon::apis::firewall_management_api::get_network_locations_details;use rusty_falcon::easy::client::FalconHandle;
#[tokio::main]async fn main() { let falcon = FalconHandle::from_env().await.expect("Could not authenticate");
let response = get_network_locations_details( &falcon.cfg, // configuration vec!["string".to_string()], // ids ).await.expect("API call failed");
println!("{:?}", response);}require "crimson-falcon"
Falcon.configure do |config| config.client_id = ENV["FALCON_CLIENT_ID"] config.client_secret = ENV["FALCON_CLIENT_SECRET"] config.cloud = ENV["FALCON_CLOUD"]end
api = Falcon::FirewallManagement.new
response = api.get_network_locations_details(['ID1', 'ID2', 'ID3'])
puts responseupdate_network_locations_metadata
Section titled “update_network_locations_metadata”Updates the network locations metadata such as polling_intervals for the cid
update_network_locations_metadataParameters
Section titled “Parameters”| Name | Type | Data type | Description |
|---|---|---|---|
| body | body | dictionary | Full body payload in JSON format. |
| cid | body | string | CID for the location. |
| comment | query | string | Audit log comment for this action. |
| dns_resolution_targets_polling_interval | body | integer | Change the DNS resolution target polling interval. |
| https_reachable_hosts_polling_interval | body | integer | Change the HTTPS reachable hosts polling interval. |
| icmp_request_targets_polling_interval | body | integer | Change the ICMP request targets polling interval. |
| location_precedence | body | list of strings | Reorder location precedence of network locations based upon the order of the list of network location IDs provided. |
| parameters | query | dictionary | Full query string parameters payload in JSON format, not required if using the comment keyword. |
Code Examples
Section titled “Code Examples”from falconpy import FirewallManagement
falcon = FirewallManagement(client_id=CLIENT_ID, client_secret=CLIENT_SECRET )
response = falcon.update_network_locations_metadata(cid="string", comment="string", dns_resolution_targets_polling_interval=integer, https_reachable_hsots_polling_interval=integer, icmp_request_targets_polling_interval=integer, location_precedencee=["string"])print(response)from falconpy import FirewallManagement
falcon = FirewallManagement(client_id=CLIENT_ID, client_secret=CLIENT_SECRET )
response = falcon.update_network_locations_metadata(cid="string", comment="string", dns_resolution_targets_polling_interval=integer, https_reachable_hsots_polling_interval=integer, icmp_request_targets_polling_interval=integer, location_precedencee=["string"])print(response)from falconpy import APIHarnessV2
falcon = APIHarnessV2(client_id=CLIENT_ID, client_secret=CLIENT_SECRET )
body_payload = { "cid": "string", "dns_resolution_targets_polling_interval": integer, "https_reachable_hosts_polling_interval": integer, "icmp_request_targets_polling_interval": integer, "location_precedence": ["string"]}
response = falcon.command("update_network_locations_metadata", comment="string", body=body_payload)print(response)Edit-FalconFirewallLocationSettingpackage main
import ( "context" "fmt" "os"
"github.com/crowdstrike/gofalcon/falcon" "github.com/crowdstrike/gofalcon/falcon/client/firewall_management" "github.com/crowdstrike/gofalcon/falcon/models")
func main() { client, err := falcon.NewClient(&falcon.ApiConfig{ ClientId: os.Getenv("FALCON_CLIENT_ID"), ClientSecret: os.Getenv("FALCON_CLIENT_SECRET"), Context: context.Background(), }) if err != nil { panic(err) }
cid := "string" dns_resolution_targets_polling_interval := integer https_reachable_hosts_polling_interval := integer icmp_request_targets_polling_interval := integer comment := "string"
response, err := client.FirewallManagement.UpdateNetworkLocationsMetadata( &firewall_management.UpdateNetworkLocationsMetadataParams{ Body: &models.FwmgrAPINetworkLocationModifyMetadataRequestV1{ CID: &cid, DnsResolutionTargetsPollingInterval: &dns_resolution_targets_polling_interval, HttpsReachableHostsPollingInterval: &https_reachable_hosts_polling_interval, IcmpRequestTargetsPollingInterval: &icmp_request_targets_polling_interval, LocationPrecedence: []string{"string"}, }, Comment: &comment, Context: context.Background(), }, ) if err != nil { panic(falcon.ErrorExplain(err)) }
fmt.Printf("%+v\n", response.Payload)}import { FalconClient } from "crowdstrike-falcon";
const client = new FalconClient({ cloud: process.env.FALCON_CLOUD!, clientId: process.env.FALCON_CLIENT_ID!, clientSecret: process.env.FALCON_CLIENT_SECRET!,});
const response = await client.firewallManagement.updateNetworkLocationsMetadata( { // body cid: "string", dnsResolutionTargetsPollingInterval: integer, httpsReachableHostsPollingInterval: integer, icmpRequestTargetsPollingInterval: integer, locationPrecedence: [] }, "string" // comment);
console.log(response);use rusty_falcon::apis::firewall_management_api::update_network_locations_metadata;use rusty_falcon::easy::client::FalconHandle;use rusty_falcon::models::FwmgrApiNetworkLocationModifyMetadataRequestV1;
#[tokio::main]async fn main() { let falcon = FalconHandle::from_env().await.expect("Could not authenticate");
let body = FwmgrApiNetworkLocationModifyMetadataRequestV1 { cid: Some("string".to_string()), dns_resolution_targets_polling_interval: Some(integer), https_reachable_hosts_polling_interval: Some(integer), icmp_request_targets_polling_interval: Some(integer), location_precedence: vec!["string".to_string()], ..Default::default() };
let response = update_network_locations_metadata( &falcon.cfg, // configuration body, // body Some("string"), // comment ).await.expect("API call failed");
println!("{:?}", response);}require "crimson-falcon"
Falcon.configure do |config| config.client_id = ENV["FALCON_CLIENT_ID"] config.client_secret = ENV["FALCON_CLIENT_SECRET"] config.cloud = ENV["FALCON_CLOUD"]end
api = Falcon::FirewallManagement.new
body = Falcon::FwmgrApiNetworkLocationModifyMetadataRequestV1.new( cid: 'string', dns_resolution_targets_polling_interval: integer, https_reachable_hosts_polling_interval: integer, icmp_request_targets_polling_interval: integer, location_precedence: [])
response = api.update_network_locations_metadata(body)
puts responseupdate_network_locations_precedence
Section titled “update_network_locations_precedence”Updates the network locations precedence according to the list of ids provided.
update_network_locations_precedenceParameters
Section titled “Parameters”| Name | Type | Data type | Description |
|---|---|---|---|
| body | body | dictionary | Full body payload in JSON format. |
| cid | body | string | CID for the location. |
| comment | query | string | Audit log comment for this action. |
| location_precedence | body | list of strings | Reorder location precedence of network locations based upon the order of the list of network location IDs provided. |
| parameters | query | dictionary | Full query string parameters payload in JSON format, not required if using the comment keyword. |
Code Examples
Section titled “Code Examples”from falconpy import FirewallManagement
falcon = FirewallManagement(client_id=CLIENT_ID, client_secret=CLIENT_SECRET )
response = falcon.update_network_locations_precedence(cid="string", comment="string", location_precedencee=["string"])print(response)from falconpy import FirewallManagement
falcon = FirewallManagement(client_id=CLIENT_ID, client_secret=CLIENT_SECRET )
response = falcon.update_network_locations_precedence(cid="string", comment="string", location_precedencee=["string"])print(response)from falconpy import APIHarnessV2
falcon = APIHarnessV2(client_id=CLIENT_ID, client_secret=CLIENT_SECRET )
body_payload = { "cid": "string", "location_precedence": ["string"]}
response = falcon.command("update_network_locations_precedence", comment="string", body=body_payload)print(response)Set-FalconFirewallLocationPrecedence -Id @("ID1", "ID2")package main
import ( "context" "fmt" "os"
"github.com/crowdstrike/gofalcon/falcon" "github.com/crowdstrike/gofalcon/falcon/client/firewall_management" "github.com/crowdstrike/gofalcon/falcon/models")
func main() { client, err := falcon.NewClient(&falcon.ApiConfig{ ClientId: os.Getenv("FALCON_CLIENT_ID"), ClientSecret: os.Getenv("FALCON_CLIENT_SECRET"), Context: context.Background(), }) if err != nil { panic(err) }
cid := "string" comment := "string"
response, err := client.FirewallManagement.UpdateNetworkLocationsPrecedence( &firewall_management.UpdateNetworkLocationsPrecedenceParams{ Body: &models.FwmgrAPINetworkLocationModifyPrecedenceRequestV1{ CID: &cid, LocationPrecedence: []string{"string"}, }, Comment: &comment, Context: context.Background(), }, ) if err != nil { panic(falcon.ErrorExplain(err)) }
fmt.Printf("%+v\n", response.Payload)}import { FalconClient } from "crowdstrike-falcon";
const client = new FalconClient({ cloud: process.env.FALCON_CLOUD!, clientId: process.env.FALCON_CLIENT_ID!, clientSecret: process.env.FALCON_CLIENT_SECRET!,});
const response = await client.firewallManagement.updateNetworkLocationsPrecedence( { // body cid: "string", locationPrecedence: [] }, "string" // comment);
console.log(response);use rusty_falcon::apis::firewall_management_api::update_network_locations_precedence;use rusty_falcon::easy::client::FalconHandle;use rusty_falcon::models::FwmgrApiNetworkLocationModifyPrecedenceRequestV1;
#[tokio::main]async fn main() { let falcon = FalconHandle::from_env().await.expect("Could not authenticate");
let body = FwmgrApiNetworkLocationModifyPrecedenceRequestV1 { cid: Some("string".to_string()), location_precedence: vec!["string".to_string()], ..Default::default() };
let response = update_network_locations_precedence( &falcon.cfg, // configuration body, // body Some("string"), // comment ).await.expect("API call failed");
println!("{:?}", response);}require "crimson-falcon"
Falcon.configure do |config| config.client_id = ENV["FALCON_CLIENT_ID"] config.client_secret = ENV["FALCON_CLIENT_SECRET"] config.cloud = ENV["FALCON_CLOUD"]end
api = Falcon::FirewallManagement.new
body = Falcon::FwmgrApiNetworkLocationModifyPrecedenceRequestV1.new( cid: 'string', location_precedence: [])
response = api.update_network_locations_precedence(body)
puts responseget_network_locations
Section titled “get_network_locations”Get a summary of network locations entities by ID
get_network_locationsParameters
Section titled “Parameters”| Name | Type | Data type | Description |
|---|---|---|---|
| ids | query | string or list of strings | The ID of the network location to retrieve. |
| parameters | query | dictionary | Full query string parameters payload in JSON format, not required if using ids keyword. |
Code Examples
Section titled “Code Examples”from falconpy import FirewallManagement
falcon = FirewallManagement(client_id=CLIENT_ID, client_secret=CLIENT_SECRET )
id_list = 'ID1,ID2,ID3' # Can also pass a list here: ['ID1', 'ID2', 'ID3']
response = falcon.get_network_locations(ids=id_list)print(response)from falconpy import FirewallManagement
falcon = FirewallManagement(client_id=CLIENT_ID, client_secret=CLIENT_SECRET )
id_list = 'ID1,ID2,ID3' # Can also pass a list here: ['ID1', 'ID2', 'ID3']
response = falcon.get_network_locations(ids=id_list)print(response)from falconpy import APIHarnessV2
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("get_network_locations", ids=id_list)print(response)Examples coming soon.
package main
import ( "context" "fmt" "os"
"github.com/crowdstrike/gofalcon/falcon" "github.com/crowdstrike/gofalcon/falcon/client/firewall_management")
func main() { client, err := falcon.NewClient(&falcon.ApiConfig{ ClientId: os.Getenv("FALCON_CLIENT_ID"), ClientSecret: os.Getenv("FALCON_CLIENT_SECRET"), Context: context.Background(), }) if err != nil { panic(err) }
response, err := client.FirewallManagement.GetNetworkLocations( &firewall_management.GetNetworkLocationsParams{ Ids: []string{"ID1", "ID2", "ID3"}, Context: context.Background(), }, ) if err != nil { panic(falcon.ErrorExplain(err)) }
fmt.Printf("%+v\n", response.Payload)}import { FalconClient } from "crowdstrike-falcon";
const client = new FalconClient({ cloud: process.env.FALCON_CLOUD!, clientId: process.env.FALCON_CLIENT_ID!, clientSecret: process.env.FALCON_CLIENT_SECRET!,});
const response = await client.firewallManagement.getNetworkLocations(["ID1", "ID2", "ID3"]); // ids
console.log(response);use rusty_falcon::apis::firewall_management_api::get_network_locations;use rusty_falcon::easy::client::FalconHandle;
#[tokio::main]async fn main() { let falcon = FalconHandle::from_env().await.expect("Could not authenticate");
let response = get_network_locations( &falcon.cfg, // configuration vec!["string".to_string()], // ids ).await.expect("API call failed");
println!("{:?}", response);}require "crimson-falcon"
Falcon.configure do |config| config.client_id = ENV["FALCON_CLIENT_ID"] config.client_secret = ENV["FALCON_CLIENT_SECRET"] config.cloud = ENV["FALCON_CLOUD"]end
api = Falcon::FirewallManagement.new
response = api.get_network_locations(['ID1', 'ID2', 'ID3'])
puts responseupsert_network_locations
Section titled “upsert_network_locations”Updates the network locations provided, and return the ID.
upsert_network_locationsParameters
Section titled “Parameters”| Name | Type | Data type | Description |
|---|---|---|---|
| body | body | dictionary | Full body payload in JSON format. |
| comment | query | string | Audit log comment for this action. |
| connection_types | body | dictionary | Connections available at this location. |
| created_by | body | string | User UUID that created the change. |
| created_on | body | string | Datetime formatted string reflecting the time of the change. |
| default_gateways | body | list of strings | List of available gateways at this location. |
| description | body | string | Description for the location. |
| dhcp_servers | body | list of strings | List of available DHCP servers at this location. |
| dns_resolution_targets | body | dictionary | Dictionary containing a list of DNS resolution targets for the location. |
| dns_servers | body | list of strings | List of available DNS servers at this location. |
| enabled | body | boolean | Flag indicating if this location is enabled. |
| host_addresses | body | list of strings | List of available host address ranges for this location. |
| https_reachable_hosts | body | dictionary | Dictionary containing a list of hostnames reachable via HTTPS at this location. |
| icmp_request_targets | body | dictionary | Dictionary containing targets for ICMP monitoring requests at this location. |
| id | body | string | Network location ID to upsert. |
| modified_by | body | string | User UUID performing this change. |
| modified_on | body | string | UTC formatted date string when this location was modified. |
| name | body | string | Name for this location. |
| parameters | query | dictionary | Full query string parameters payload in JSON format, not required if using the comment keyword. |
Code Examples
Section titled “Code Examples”from falconpy import FirewallManagement
falcon = FirewallManagement(client_id=CLIENT_ID, client_secret=CLIENT_SECRET )
connection_types = { "wired": true, "wireless": { "enabled": true, "require_encryption": true, "ssids": [ "string" ] }}
dns_resolution_targets = { "targets": [ { "hostname": "string", "ip_match": [ "string" ] } ]}
https_reachable_hosts = { "hostnames": [ "string" ]}
icmp_request_targets = { "targets": [ "string" ]}
response = falcon.upsert_network_locations(comment="string", connection_types=connection_types, created_on="string", created_by="string", default_gateways=["string"], description="string", dhcp_servers=["string"], dns_resolution_targets=dns_resolution_targets, dns_servers=["string"], enabled=boolean, host_addresses=["string"], https_reachable_hosts=https_reachable_hosts, icmp_request_targets=icmp_request_targets, id="string", modified_by="string", modified_on="string", name="string")print(response)from falconpy import FirewallManagement
falcon = FirewallManagement(client_id=CLIENT_ID, client_secret=CLIENT_SECRET )
connection_types = { "wired": true, "wireless": { "enabled": true, "require_encryption": true, "ssids": [ "string" ] }}
dns_resolution_targets = { "targets": [ { "hostname": "string", "ip_match": [ "string" ] } ]}
https_reachable_hosts = { "hostnames": [ "string" ]}
icmp_request_targets = { "targets": [ "string" ]}
response = falcon.upsert_network_locations(comment="string", connection_types=connection_types, created_on="string", created_by="string", default_gateways=["string"], description="string", dhcp_servers=["string"], dns_resolution_targets=dns_resolution_targets, dns_servers=["string"], enabled=boolean, host_addresses=["string"], https_reachable_hosts=https_reachable_hosts, icmp_request_targets=icmp_request_targets, id="string", modified_by="string", modified_on="string", name="string")print(response)from falconpy import APIHarnessV2
falcon = APIHarnessV2(client_id=CLIENT_ID, client_secret=CLIENT_SECRET )
body_payload = { "connection_types": { "wired": boolean, "wireless": { "enabled": boolean, "require_encryption": boolean, "ssids": ["string"] } }, "created_by": "string", "created_on": "string", "default_gateways": ["string"], "description": "string", "dhcp_servers": ["string"], "dns_resolution_targets": { "targets": [ { "hostname": "string", "ip_match": ["string"] } ] }, "dns_servers": ["string"], "enabled": boolean, "host_addresses": ["string"], "https_reachable_hosts": { "hostnames": ["string"] }, "icmp_request_targets": { "targets": ["string"] }, "id": "string", "modified_by": "string", "modified_on": "string", "name": "string"}
response = falcon.command("upsert_network_locations", comment="string", body=body_payload)print(response)Examples coming soon.
package main
import ( "context" "fmt" "os"
"github.com/crowdstrike/gofalcon/falcon" "github.com/crowdstrike/gofalcon/falcon/client/firewall_management" "github.com/crowdstrike/gofalcon/falcon/models")
func main() { client, err := falcon.NewClient(&falcon.ApiConfig{ ClientId: os.Getenv("FALCON_CLIENT_ID"), ClientSecret: os.Getenv("FALCON_CLIENT_SECRET"), Context: context.Background(), }) if err != nil { panic(err) }
created_by := "string" created_on := "string" description := "string" enabled := boolean id := "string" modified_by := "string" modified_on := "string" name := "string" comment := "string"
response, err := client.FirewallManagement.UpsertNetworkLocations( &firewall_management.UpsertNetworkLocationsParams{ Body: &models.FwmgrAPINetworkLocationModifyRequestV1{ ConnectionTypes: &struct{}{}, CreatedBy: &created_by, CreatedOn: &created_on, DefaultGateways: []string{"string"}, Description: &description, DhcpServers: []string{"string"}, DnsResolutionTargets: &struct{}{}, DnsServers: []string{"string"}, Enabled: &enabled, HostAddresses: []string{"string"}, HttpsReachableHosts: &struct{}{}, IcmpRequestTargets: &struct{}{}, ID: &id, ModifiedBy: &modified_by, ModifiedOn: &modified_on, Name: &name, }, Comment: &comment, Context: context.Background(), }, ) if err != nil { panic(falcon.ErrorExplain(err)) }
fmt.Printf("%+v\n", response.Payload)}import { FalconClient } from "crowdstrike-falcon";
const client = new FalconClient({ cloud: process.env.FALCON_CLOUD!, clientId: process.env.FALCON_CLIENT_ID!, clientSecret: process.env.FALCON_CLIENT_SECRET!,});
const response = await client.firewallManagement.upsertNetworkLocations( { // body connectionTypes: { wired: boolean, wireless: { enabled: boolean, requireEncryption: boolean, ssids: [] } }, createdBy: "string", createdOn: "string", defaultGateways: [], description: "string", dhcpServers: [], dnsResolutionTargets: { targets: [{ hostname: "string", ipMatch: [] }] }, dnsServers: [], enabled: boolean, hostAddresses: [], httpsReachableHosts: { hostnames: [] }, icmpRequestTargets: { targets: [] }, id: "string", modifiedBy: "string", modifiedOn: "string", name: "string" }, "string" // comment);
console.log(response);use rusty_falcon::apis::firewall_management_api::upsert_network_locations;use rusty_falcon::easy::client::FalconHandle;use rusty_falcon::models::FwmgrApiNetworkLocationModifyRequestV1;
#[tokio::main]async fn main() { let falcon = FalconHandle::from_env().await.expect("Could not authenticate");
let body = FwmgrApiNetworkLocationModifyRequestV1 { connection_types: Default::default(), default_gateways: vec!["string".to_string()], description: Some("string".to_string()), dhcp_servers: vec!["string".to_string()], dns_resolution_targets: Default::default(), dns_servers: vec!["string".to_string()], enabled: Some(boolean), host_addresses: vec!["string".to_string()], https_reachable_hosts: Default::default(), icmp_request_targets: Default::default(), id: Some("string".to_string()), name: Some("string".to_string()), ..Default::default() };
let response = upsert_network_locations( &falcon.cfg, // configuration body, // body Some("string"), // comment ).await.expect("API call failed");
println!("{:?}", response);}require "crimson-falcon"
Falcon.configure do |config| config.client_id = ENV["FALCON_CLIENT_ID"] config.client_secret = ENV["FALCON_CLIENT_SECRET"] config.cloud = ENV["FALCON_CLOUD"]end
api = Falcon::FirewallManagement.new
body = Falcon::FwmgrApiNetworkLocationModifyRequestV1.new( connection_types: { wired: boolean, wireless: { enabled: boolean, require_encryption: boolean, ssids: [] } }, created_by: 'string', created_on: 'string', default_gateways: [], description: 'string', dhcp_servers: [], dns_resolution_targets: { targets: [{ hostname: 'string', ip_match: [] }] }, dns_servers: [], enabled: boolean, host_addresses: [], https_reachable_hosts: { hostnames: [] }, icmp_request_targets: { targets: [] }, id: 'string', modified_by: 'string', modified_on: 'string', name: 'string')
response = api.upsert_network_locations(body)
puts responsecreate_network_locations
Section titled “create_network_locations”Create new network locations provided, and return the ID.
create_network_locationsParameters
Section titled “Parameters”| Name | Type | Data type | Description |
|---|---|---|---|
| add_fw_rules | query | boolean | Flag to indicate that the cloned location needs to be added to the same firewall rules that encompass the original location. |
| body | body | dictionary | Full body payload in JSON format. |
| clone_id | query | string | A rule group ID from which to copy rules. If this keyword is provided then all other keywords excluding add_fw_rules and comment are ignored. |
| comment | query | string | Audit log comment for this action. |
| connection_types | body | dictionary | Connections available at this location. |
| default_gateways | body | list of strings | List of available gateways at this location. |
| description | body | string | Description for the location. |
| dhcp_servers | body | list of strings | List of available DHCP servers at this location. |
| dns_resolution_targets | body | dictionary | Dictionary containing a list of DNS resolution targets for the location. |
| dns_servers | body | list of strings | List of available DNS servers at this location. |
| enabled | body | boolean | Flag indicating if this location is enabled. |
| host_addresses | body | list of strings | List of available host address ranges for this location. |
| https_reachable_hosts | body | dictionary | Dictionary containing a list of hostnames reachable via HTTPS at this location. |
| icmp_request_targets | body | dictionary | Dictionary containing targets for ICMP monitoring requests at this location. |
| name | body | string | Name for this location. |
| parameters | query | dictionary | Full query string parameters payload in JSON format, not required if using the add_fw_rules, clone_id or comment keywords. |
Code Examples
Section titled “Code Examples”from falconpy import FirewallManagement
falcon = FirewallManagement(client_id=CLIENT_ID, client_secret=CLIENT_SECRET )
connection_types = { "wired": true, "wireless": { "enabled": true, "require_encryption": true, "ssids": [ "string" ] }}
dns_resolution_targets = { "targets": [ { "hostname": "string", "ip_match": [ "string" ] } ]}
https_reachable_hosts = { "hostnames": [ "string" ]}
icmp_request_targets = { "targets": [ "string" ]}
response = falcon.create_network_locations(add_fw_rules="string", clone_id="string", comment="string", connection_types=connection_types, default_gateways=["string"], description="string", dhcp_servers=["string"], dns_resolution_targets=dns_resolution_targets, dns_servers=["string"], enabled=boolean, host_addresses=["string"], https_reachable_hosts=https_reachable_hosts, icmp_request_targets=icmp_request_targets, name="string")print(response)from falconpy import FirewallManagement
falcon = FirewallManagement(client_id=CLIENT_ID, client_secret=CLIENT_SECRET )
connection_types = { "wired": true, "wireless": { "enabled": true, "require_encryption": true, "ssids": [ "string" ] }}
dns_resolution_targets = { "targets": [ { "hostname": "string", "ip_match": [ "string" ] } ]}
https_reachable_hosts = { "hostnames": [ "string" ]}
icmp_request_targets = { "targets": [ "string" ]}
response = falcon.create_network_locations(add_fw_rules="string", clone_id="string", comment="string", connection_types=connection_types, default_gateways=["string"], description="string", dhcp_servers=["string"], dns_resolution_targets=dns_resolution_targets, dns_servers=["string"], enabled=boolean, host_addresses=["string"], https_reachable_hosts=https_reachable_hosts, icmp_request_targets=icmp_request_targets, name="string")print(response)from falconpy import APIHarnessV2
falcon = APIHarnessV2(client_id=CLIENT_ID, client_secret=CLIENT_SECRET )
body_payload = { "connection_types": { "wired": boolean, "wireless": { "enabled": boolean, "require_encryption": boolean, "ssids": ["string"] } }, "default_gateways": ["string"], "description": "string", "dhcp_servers": ["string"], "dns_resolution_targets": { "targets": [ { "hostname": "string", "ip_match": ["string"] } ] }, "dns_servers": ["string"], "enabled": boolean, "host_addresses": ["string"], "https_reachable_hosts": { "hostnames": ["string"] }, "icmp_request_targets": { "targets": ["string"] }, "name": "string"}
response = falcon.command("create_network_locations", clone_id="string", add_fw_rules=boolean, comment="string", body=body_payload)print(response)New-FalconFirewallLocation -Name "string"package main
import ( "context" "fmt" "os"
"github.com/crowdstrike/gofalcon/falcon" "github.com/crowdstrike/gofalcon/falcon/client/firewall_management" "github.com/crowdstrike/gofalcon/falcon/models")
func main() { client, err := falcon.NewClient(&falcon.ApiConfig{ ClientId: os.Getenv("FALCON_CLIENT_ID"), ClientSecret: os.Getenv("FALCON_CLIENT_SECRET"), Context: context.Background(), }) if err != nil { panic(err) }
description := "string" enabled := boolean name := "string" cloneID := "string" addFwRules := boolean comment := "string"
response, err := client.FirewallManagement.CreateNetworkLocations( &firewall_management.CreateNetworkLocationsParams{ Body: &models.FwmgrAPINetworkLocationCreateRequestV1{ ConnectionTypes: &struct{}{}, DefaultGateways: []string{"string"}, Description: &description, DhcpServers: []string{"string"}, DnsResolutionTargets: &struct{}{}, DnsServers: []string{"string"}, Enabled: &enabled, HostAddresses: []string{"string"}, HttpsReachableHosts: &struct{}{}, IcmpRequestTargets: &struct{}{}, Name: &name, }, CloneID: &cloneID, AddFwRules: &addFwRules, Comment: &comment, Context: context.Background(), }, ) if err != nil { panic(falcon.ErrorExplain(err)) }
fmt.Printf("%+v\n", response.Payload)}import { FalconClient } from "crowdstrike-falcon";
const client = new FalconClient({ cloud: process.env.FALCON_CLOUD!, clientId: process.env.FALCON_CLIENT_ID!, clientSecret: process.env.FALCON_CLIENT_SECRET!,});
const response = await client.firewallManagement.createNetworkLocations( { // body connectionTypes: { wired: boolean, wireless: { enabled: boolean, requireEncryption: boolean, ssids: [] } }, defaultGateways: [], description: "string", dhcpServers: [], dnsResolutionTargets: { targets: [{ hostname: "string", ipMatch: [] }] }, dnsServers: [], enabled: boolean, hostAddresses: [], httpsReachableHosts: { hostnames: [] }, icmpRequestTargets: { targets: [] }, name: "string" }, "string", // cloneId boolean, // addFwRules "string" // comment);
console.log(response);use rusty_falcon::apis::firewall_management_api::create_network_locations;use rusty_falcon::easy::client::FalconHandle;use rusty_falcon::models::FwmgrApiNetworkLocationCreateRequestV1;
#[tokio::main]async fn main() { let falcon = FalconHandle::from_env().await.expect("Could not authenticate");
let body = FwmgrApiNetworkLocationCreateRequestV1 { connection_types: Default::default(), default_gateways: vec!["string".to_string()], description: Some("string".to_string()), dhcp_servers: vec!["string".to_string()], dns_resolution_targets: Default::default(), dns_servers: vec!["string".to_string()], enabled: Some(boolean), host_addresses: vec!["string".to_string()], https_reachable_hosts: Default::default(), icmp_request_targets: Default::default(), name: Some("string".to_string()), ..Default::default() };
let response = create_network_locations( &falcon.cfg, // configuration body, // body Some("string"), // clone_id Some(boolean), // add_fw_rules Some("string"), // comment ).await.expect("API call failed");
println!("{:?}", response);}require "crimson-falcon"
Falcon.configure do |config| config.client_id = ENV["FALCON_CLIENT_ID"] config.client_secret = ENV["FALCON_CLIENT_SECRET"] config.cloud = ENV["FALCON_CLOUD"]end
api = Falcon::FirewallManagement.new
body = { connection_types: { wired: boolean, wireless: { enabled: boolean, require_encryption: boolean, ssids: [] } }, default_gateways: [], description: 'string', dhcp_servers: [], dns_resolution_targets: { targets: [{ hostname: 'string', ip_match: [] }] }, dns_servers: [], enabled: boolean, host_addresses: [], https_reachable_hosts: { hostnames: [] }, icmp_request_targets: { targets: [] }, name: 'string'}
response = api.create_network_locations(body)
puts responsedelete_network_locations
Section titled “delete_network_locations”Delete network location entities by ID.
delete_network_locationsParameters
Section titled “Parameters”| Name | Type | Data type | Description |
|---|---|---|---|
| ids | query | string or list of strings | The ID of the network location to delete. |
| parameters | query | dictionary | Full query string parameters payload in JSON format, not required if using ids keyword. |
Code Examples
Section titled “Code Examples”from falconpy import FirewallManagement
falcon = FirewallManagement(client_id=CLIENT_ID, client_secret=CLIENT_SECRET )
id_list = 'ID1,ID2,ID3' # Can also pass a list here: ['ID1', 'ID2', 'ID3']
response = falcon.delete_network_locations(ids=id_list)print(response)from falconpy import FirewallManagement
falcon = FirewallManagement(client_id=CLIENT_ID, client_secret=CLIENT_SECRET )
id_list = 'ID1,ID2,ID3' # Can also pass a list here: ['ID1', 'ID2', 'ID3']
response = falcon.delete_network_locations(ids=id_list)print(response)from falconpy import APIHarnessV2
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("delete_network_locations", ids=id_list)print(response)Remove-FalconFirewallLocation -Id @("ID1", "ID2")package main
import ( "context" "fmt" "os"
"github.com/crowdstrike/gofalcon/falcon" "github.com/crowdstrike/gofalcon/falcon/client/firewall_management")
func main() { client, err := falcon.NewClient(&falcon.ApiConfig{ ClientId: os.Getenv("FALCON_CLIENT_ID"), ClientSecret: os.Getenv("FALCON_CLIENT_SECRET"), Context: context.Background(), }) if err != nil { panic(err) }
response, err := client.FirewallManagement.DeleteNetworkLocations( &firewall_management.DeleteNetworkLocationsParams{ Ids: []string{"ID1", "ID2", "ID3"}, Context: context.Background(), }, ) if err != nil { panic(falcon.ErrorExplain(err)) }
fmt.Printf("%+v\n", response.Payload)}import { FalconClient } from "crowdstrike-falcon";
const client = new FalconClient({ cloud: process.env.FALCON_CLOUD!, clientId: process.env.FALCON_CLIENT_ID!, clientSecret: process.env.FALCON_CLIENT_SECRET!,});
const response = await client.firewallManagement.deleteNetworkLocations(["ID1", "ID2", "ID3"]); // ids
console.log(response);use rusty_falcon::apis::firewall_management_api::delete_network_locations;use rusty_falcon::easy::client::FalconHandle;
#[tokio::main]async fn main() { let falcon = FalconHandle::from_env().await.expect("Could not authenticate");
let response = delete_network_locations( &falcon.cfg, // configuration vec!["string".to_string()], // ids ).await.expect("API call failed");
println!("{:?}", response);}require "crimson-falcon"
Falcon.configure do |config| config.client_id = ENV["FALCON_CLIENT_ID"] config.client_secret = ENV["FALCON_CLIENT_SECRET"] config.cloud = ENV["FALCON_CLOUD"]end
api = Falcon::FirewallManagement.new
response = api.delete_network_locations(['ID1', 'ID2', 'ID3'])
puts responseupdate_network_locations
Section titled “update_network_locations”Updates the network locations provided, and return the ID.
update_network_locationsParameters
Section titled “Parameters”| Name | Type | Data type | Description |
|---|---|---|---|
| body | body | dictionary | Full body payload in JSON format. |
| comment | query | string | Audit log comment for this action. |
| connection_types | body | dictionary | Connections available at this location. |
| created_by | body | string | User UUID that created the change. |
| created_on | body | string | Datetime formatted string reflecting the time of the change. |
| default_gateways | body | list of strings | List of available gateways at this location. |
| description | body | string | Description for the location. |
| dhcp_servers | body | list of strings | List of available DHCP servers at this location. |
| dns_resolution_targets | body | dictionary | Dictionary containing a list of DNS resolution targets for the location. |
| dns_servers | body | list of strings | List of available DNS servers at this location. |
| enabled | body | boolean | Flag indicating if this location is enabled. |
| host_addresses | body | list of strings | List of available host address ranges for this location. |
| https_reachable_hosts | body | dictionary | Dictionary containing a list of hostnames reachable via HTTPS at this location. |
| icmp_request_targets | body | dictionary | Dictionary containing targets for ICMP monitoring requests at this location. |
| id | body | string | Network location ID to upsert. |
| modified_by | body | string | User UUID performing this change. |
| modified_on | body | string | UTC formatted date string when this location was modified. |
| name | body | string | Name for this location. |
| parameters | query | dictionary | Full query string parameters payload in JSON format, not required if using the comment keyword. |
Code Examples
Section titled “Code Examples”from falconpy import FirewallManagement
falcon = FirewallManagement(client_id=CLIENT_ID, client_secret=CLIENT_SECRET )
connection_types = { "wired": true, "wireless": { "enabled": true, "require_encryption": true, "ssids": [ "string" ] }}
dns_resolution_targets = { "targets": [ { "hostname": "string", "ip_match": [ "string" ] } ]}
https_reachable_hosts = { "hostnames": [ "string" ]}
icmp_request_targets = { "targets": [ "string" ]}
response = falcon.update_network_locations(comment="string", connection_types=connection_types, created_on="string", created_by="string", default_gateways=["string"], description="string", dhcp_servers=["string"], dns_resolution_targets=dns_resolution_targets, dns_servers=["string"], enabled=boolean, host_addresses=["string"], https_reachable_hosts=https_reachable_hosts, icmp_request_targets=icmp_request_targets, id="string", modified_by="string", modified_on="string", name="string")print(response)from falconpy import FirewallManagement
falcon = FirewallManagement(client_id=CLIENT_ID, client_secret=CLIENT_SECRET )
connection_types = { "wired": true, "wireless": { "enabled": true, "require_encryption": true, "ssids": [ "string" ] }}
dns_resolution_targets = { "targets": [ { "hostname": "string", "ip_match": [ "string" ] } ]}
https_reachable_hosts = { "hostnames": [ "string" ]}
icmp_request_targets = { "targets": [ "string" ]}
response = falcon.update_network_locations(comment="string", connection_types=connection_types, created_on="string", created_by="string", default_gateways=["string"], description="string", dhcp_servers=["string"], dns_resolution_targets=dns_resolution_targets, dns_servers=["string"], enabled=boolean, host_addresses=["string"], https_reachable_hosts=https_reachable_hosts, icmp_request_targets=icmp_request_targets, id="string", modified_by="string", modified_on="string", name="string")print(response)from falconpy import APIHarnessV2
falcon = APIHarnessV2(client_id=CLIENT_ID, client_secret=CLIENT_SECRET )
body_payload = { "connection_types": { "wired": boolean, "wireless": { "enabled": boolean, "require_encryption": boolean, "ssids": ["string"] } }, "created_by": "string", "created_on": "string", "default_gateways": ["string"], "description": "string", "dhcp_servers": ["string"], "dns_resolution_targets": { "targets": [ { "hostname": "string", "ip_match": ["string"] } ] }, "dns_servers": ["string"], "enabled": boolean, "host_addresses": ["string"], "https_reachable_hosts": { "hostnames": ["string"] }, "icmp_request_targets": { "targets": ["string"] }, "id": "string", "modified_by": "string", "modified_on": "string", "name": "string"}
response = falcon.command("update_network_locations", comment="string", body=body_payload)print(response)Edit-FalconFirewallLocation -Id "string"package main
import ( "context" "fmt" "os"
"github.com/crowdstrike/gofalcon/falcon" "github.com/crowdstrike/gofalcon/falcon/client/firewall_management" "github.com/crowdstrike/gofalcon/falcon/models")
func main() { client, err := falcon.NewClient(&falcon.ApiConfig{ ClientId: os.Getenv("FALCON_CLIENT_ID"), ClientSecret: os.Getenv("FALCON_CLIENT_SECRET"), Context: context.Background(), }) if err != nil { panic(err) }
created_by := "string" created_on := "string" description := "string" enabled := boolean id := "string" modified_by := "string" modified_on := "string" name := "string" comment := "string"
response, err := client.FirewallManagement.UpdateNetworkLocations( &firewall_management.UpdateNetworkLocationsParams{ Body: &models.FwmgrAPINetworkLocationModifyRequestV1{ ConnectionTypes: &struct{}{}, CreatedBy: &created_by, CreatedOn: &created_on, DefaultGateways: []string{"string"}, Description: &description, DhcpServers: []string{"string"}, DnsResolutionTargets: &struct{}{}, DnsServers: []string{"string"}, Enabled: &enabled, HostAddresses: []string{"string"}, HttpsReachableHosts: &struct{}{}, IcmpRequestTargets: &struct{}{}, ID: &id, ModifiedBy: &modified_by, ModifiedOn: &modified_on, Name: &name, }, Comment: &comment, Context: context.Background(), }, ) if err != nil { panic(falcon.ErrorExplain(err)) }
fmt.Printf("%+v\n", response.Payload)}import { FalconClient } from "crowdstrike-falcon";
const client = new FalconClient({ cloud: process.env.FALCON_CLOUD!, clientId: process.env.FALCON_CLIENT_ID!, clientSecret: process.env.FALCON_CLIENT_SECRET!,});
const response = await client.firewallManagement.updateNetworkLocations( { // body connectionTypes: { wired: boolean, wireless: { enabled: boolean, requireEncryption: boolean, ssids: [] } }, createdBy: "string", createdOn: "string", defaultGateways: [], description: "string", dhcpServers: [], dnsResolutionTargets: { targets: [{ hostname: "string", ipMatch: [] }] }, dnsServers: [], enabled: boolean, hostAddresses: [], httpsReachableHosts: { hostnames: [] }, icmpRequestTargets: { targets: [] }, id: "string", modifiedBy: "string", modifiedOn: "string", name: "string" }, "string" // comment);
console.log(response);use rusty_falcon::apis::firewall_management_api::update_network_locations;use rusty_falcon::easy::client::FalconHandle;use rusty_falcon::models::FwmgrApiNetworkLocationModifyRequestV1;
#[tokio::main]async fn main() { let falcon = FalconHandle::from_env().await.expect("Could not authenticate");
let body = FwmgrApiNetworkLocationModifyRequestV1 { connection_types: Default::default(), default_gateways: vec!["string".to_string()], description: Some("string".to_string()), dhcp_servers: vec!["string".to_string()], dns_resolution_targets: Default::default(), dns_servers: vec!["string".to_string()], enabled: Some(boolean), host_addresses: vec!["string".to_string()], https_reachable_hosts: Default::default(), icmp_request_targets: Default::default(), id: Some("string".to_string()), name: Some("string".to_string()), ..Default::default() };
let response = update_network_locations( &falcon.cfg, // configuration body, // body Some("string"), // comment ).await.expect("API call failed");
println!("{:?}", response);}require "crimson-falcon"
Falcon.configure do |config| config.client_id = ENV["FALCON_CLIENT_ID"] config.client_secret = ENV["FALCON_CLIENT_SECRET"] config.cloud = ENV["FALCON_CLOUD"]end
api = Falcon::FirewallManagement.new
body = Falcon::FwmgrApiNetworkLocationModifyRequestV1.new( connection_types: { wired: boolean, wireless: { enabled: boolean, require_encryption: boolean, ssids: [] } }, created_by: 'string', created_on: 'string', default_gateways: [], description: 'string', dhcp_servers: [], dns_resolution_targets: { targets: [{ hostname: 'string', ip_match: [] }] }, dns_servers: [], enabled: boolean, host_addresses: [], https_reachable_hosts: { hostnames: [] }, icmp_request_targets: { targets: [] }, id: 'string', modified_by: 'string', modified_on: 'string', name: 'string')
response = api.update_network_locations(body)
puts responseget_platforms
Section titled “get_platforms”Get platforms by ID, e.g., windows or mac or droid
get_platformsParameters
Section titled “Parameters”| Name | Type | Data type | Description |
|---|---|---|---|
| ids | query | string or list of strings | The platforms to retrieve, identified by ID. |
| parameters | query | dictionary | Full query string parameters payload in JSON format. |
Code Examples
Section titled “Code Examples”from falconpy import FirewallManagement
falcon = FirewallManagement(client_id=CLIENT_ID, client_secret=CLIENT_SECRET )
id_list = 'ID1,ID2,ID3' # Can also pass a list here: ['ID1', 'ID2', 'ID3']
response = falcon.get_platforms(ids=id_list)print(response)from falconpy import FirewallManagement
falcon = FirewallManagement(client_id=CLIENT_ID, client_secret=CLIENT_SECRET )
id_list = 'ID1,ID2,ID3' # Can also pass a list here: ['ID1', 'ID2', 'ID3']
response = falcon.get_platforms(ids=id_list)print(response)from falconpy import APIHarnessV2
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("get_platforms", ids=id_list)print(response)Get-FalconFirewallPlatform -Id @("ID1", "ID2")package main
import ( "context" "fmt" "os"
"github.com/crowdstrike/gofalcon/falcon" "github.com/crowdstrike/gofalcon/falcon/client/firewall_management")
func main() { client, err := falcon.NewClient(&falcon.ApiConfig{ ClientId: os.Getenv("FALCON_CLIENT_ID"), ClientSecret: os.Getenv("FALCON_CLIENT_SECRET"), Context: context.Background(), }) if err != nil { panic(err) }
response, err := client.FirewallManagement.GetPlatforms( &firewall_management.GetPlatformsParams{ Ids: []string{"ID1", "ID2", "ID3"}, Context: context.Background(), }, ) if err != nil { panic(falcon.ErrorExplain(err)) }
fmt.Printf("%+v\n", response.Payload)}import { FalconClient } from "crowdstrike-falcon";
const client = new FalconClient({ cloud: process.env.FALCON_CLOUD!, clientId: process.env.FALCON_CLIENT_ID!, clientSecret: process.env.FALCON_CLIENT_SECRET!,});
const response = await client.firewallManagement.getPlatforms(["ID1", "ID2", "ID3"]); // ids
console.log(response);use rusty_falcon::apis::firewall_management_api::get_platforms;use rusty_falcon::easy::client::FalconHandle;
#[tokio::main]async fn main() { let falcon = FalconHandle::from_env().await.expect("Could not authenticate");
let response = get_platforms( &falcon.cfg, // configuration vec!["string".to_string()], // ids ).await.expect("API call failed");
println!("{:?}", response);}require "crimson-falcon"
Falcon.configure do |config| config.client_id = ENV["FALCON_CLIENT_ID"] config.client_secret = ENV["FALCON_CLIENT_SECRET"] config.cloud = ENV["FALCON_CLOUD"]end
api = Falcon::FirewallManagement.new
response = api.get_platforms(['ID1', 'ID2', 'ID3'])
puts responseget_policy_containers
Section titled “get_policy_containers”Get policy container entities by policy ID
get_policy_containersParameters
Section titled “Parameters”| Name | Type | Data type | Description |
|---|---|---|---|
| ids | query | string or list of strings | The policy container(s) to retrieve, identified by policy ID. |
| parameters | query | dictionary | Full query string parameters payload in JSON format. |
Code Examples
Section titled “Code Examples”from falconpy import FirewallManagement
falcon = FirewallManagement(client_id=CLIENT_ID, client_secret=CLIENT_SECRET )
id_list = 'ID1,ID2,ID3' # Can also pass a list here: ['ID1', 'ID2', 'ID3']
response = falcon.get_policy_containers(ids=id_list)print(response)from falconpy import FirewallManagement
falcon = FirewallManagement(client_id=CLIENT_ID, client_secret=CLIENT_SECRET )
id_list = 'ID1,ID2,ID3' # Can also pass a list here: ['ID1', 'ID2', 'ID3']
response = falcon.get_policy_containers(ids=id_list)print(response)from falconpy import APIHarnessV2
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("get_policy_containers", ids=id_list)print(response)Get-FalconFirewallSetting -Id @("ID1", "ID2")package main
import ( "context" "fmt" "os"
"github.com/crowdstrike/gofalcon/falcon" "github.com/crowdstrike/gofalcon/falcon/client/firewall_management")
func main() { client, err := falcon.NewClient(&falcon.ApiConfig{ ClientId: os.Getenv("FALCON_CLIENT_ID"), ClientSecret: os.Getenv("FALCON_CLIENT_SECRET"), Context: context.Background(), }) if err != nil { panic(err) }
response, err := client.FirewallManagement.GetPolicyContainers( &firewall_management.GetPolicyContainersParams{ Ids: []string{"ID1", "ID2", "ID3"}, Context: context.Background(), }, ) if err != nil { panic(falcon.ErrorExplain(err)) }
fmt.Printf("%+v\n", response.Payload)}import { FalconClient } from "crowdstrike-falcon";
const client = new FalconClient({ cloud: process.env.FALCON_CLOUD!, clientId: process.env.FALCON_CLIENT_ID!, clientSecret: process.env.FALCON_CLIENT_SECRET!,});
const response = await client.firewallManagement.getPolicyContainers(["ID1", "ID2", "ID3"]); // ids
console.log(response);use rusty_falcon::apis::firewall_management_api::get_policy_containers;use rusty_falcon::easy::client::FalconHandle;
#[tokio::main]async fn main() { let falcon = FalconHandle::from_env().await.expect("Could not authenticate");
let response = get_policy_containers( &falcon.cfg, // configuration vec!["string".to_string()], // ids ).await.expect("API call failed");
println!("{:?}", response);}require "crimson-falcon"
Falcon.configure do |config| config.client_id = ENV["FALCON_CLIENT_ID"] config.client_secret = ENV["FALCON_CLIENT_SECRET"] config.cloud = ENV["FALCON_CLOUD"]end
api = Falcon::FirewallManagement.new
response = api.get_policy_containers(['ID1', 'ID2', 'ID3'])
puts responseupdate_policy_container_v1
Section titled “update_policy_container_v1”Update an identified policy container.
deprecatedPLEASE NOTE: This endpoint is deprecated in favor of
update_policy_container(also known asupdate_policy_container_v2). Using this legacy endpoint could potentially disable your local logging setting.
update_policy_container_v1Parameters
Section titled “Parameters”| Name | Type | Data type | Description |
|---|---|---|---|
| body | body | dictionary | Full body payload in JSON format. |
| default_inbound | body | string | Default inbound. |
| default_outbound | body | string | Default outbound. |
| enforce | body | boolean | Enforcement flag. |
| is_default_policy | body | boolean | Default policy flag. |
| local_logging | body | boolean | Local logging flag. |
| platform_id | body | string | ID of the platform this policy container. |
| policy_id | body | string | Policy ID to apply to this container. |
| rule_group_ids | body | string or list of strings | Rule group IDs to include in this container. |
| test_mode | body | boolean | Flag indicating if this container is in test mode. |
| tracking | body | string | Tracking. |
Code Examples
Section titled “Code Examples”from falconpy import FirewallManagement
falcon = FirewallManagement(client_id=CLIENT_ID, client_secret=CLIENT_SECRET )
id_list = 'ID1,ID2,ID3' # Can also pass a list here: ['ID1', 'ID2', 'ID3']
response = falcon.update_policy_container_v1(default_inbound="string", default_outbound="string", enforce=boolean, is_default_policy=boolean, local_logging=boolean, platform_id="string", policy_id="string", rule_group_ids=id_list, test_mode=boolean, tracking="string")print(response)from falconpy import FirewallManagement
falcon = FirewallManagement(client_id=CLIENT_ID, client_secret=CLIENT_SECRET )
id_list = 'ID1,ID2,ID3' # Can also pass a list here: ['ID1', 'ID2', 'ID3']
response = falcon.update_policy_container_v1(default_inbound="string", default_outbound="string", enforce=boolean, is_default_policy=boolean, local_logging=boolean, platform_id="string", policy_id="string", rule_group_ids=id_list, test_mode=boolean, tracking="string")print(response)from falconpy import APIHarnessV2
falcon = APIHarnessV2(client_id=CLIENT_ID, client_secret=CLIENT_SECRET )
id_list = 'ID1,ID2,ID3' # Can also pass a list here: ['ID1', 'ID2', 'ID3']
body_payload = { "default_inbound": "string", "default_outbound": "string", "enforce": boolean, "is_default_policy": boolean, "local_logging": boolean, "platform_id": "string", "policy_id": "string", "rule_group_ids": ["string"], "test_mode": boolean, "tracking": "string"}
response = falcon.command("update_policy_container_v1", body=body_payload)print(response)Examples coming soon.
package main
import ( "context" "fmt" "os"
"github.com/crowdstrike/gofalcon/falcon" "github.com/crowdstrike/gofalcon/falcon/client/firewall_management" "github.com/crowdstrike/gofalcon/falcon/models")
func main() { client, err := falcon.NewClient(&falcon.ApiConfig{ ClientId: os.Getenv("FALCON_CLIENT_ID"), ClientSecret: os.Getenv("FALCON_CLIENT_SECRET"), Context: context.Background(), }) if err != nil { panic(err) }
default_inbound := "string" default_outbound := "string" enforce := boolean is_default_policy := boolean local_logging := boolean platform_id := "string" policy_id := "string" test_mode := boolean tracking := "string"
response, err := client.FirewallManagement.UpdatePolicyContainerV1( &firewall_management.UpdatePolicyContainerV1Params{ Body: &models.FwmgrAPIPolicyContainerUpsertRequestV1{ DefaultInbound: &default_inbound, DefaultOutbound: &default_outbound, Enforce: &enforce, IsDefaultPolicy: &is_default_policy, LocalLogging: &local_logging, PlatformID: &platform_id, PolicyID: &policy_id, RuleGroupIds: []string{"string"}, TestMode: &test_mode, Tracking: &tracking, }, Context: context.Background(), }, ) if err != nil { panic(falcon.ErrorExplain(err)) }
fmt.Printf("%+v\n", response.Payload)}import { FalconClient } from "crowdstrike-falcon";
const client = new FalconClient({ cloud: process.env.FALCON_CLOUD!, clientId: process.env.FALCON_CLIENT_ID!, clientSecret: process.env.FALCON_CLIENT_SECRET!,});
const response = await client.firewallManagement.updatePolicyContainerV1( { defaultInbound: "string", defaultOutbound: "string", enforce: boolean, isDefaultPolicy: boolean, localLogging: boolean, platformId: "string", policyId: "string", ruleGroupIds: [], testMode: boolean, tracking: "string"} // body);
console.log(response);use rusty_falcon::apis::firewall_management_api::update_policy_container_v1;use rusty_falcon::easy::client::FalconHandle;use rusty_falcon::models::FwmgrApiPolicyContainerUpsertRequestV1;
#[tokio::main]async fn main() { let falcon = FalconHandle::from_env().await.expect("Could not authenticate");
let body = FwmgrApiPolicyContainerUpsertRequestV1 { default_inbound: Some("string".to_string()), default_outbound: Some("string".to_string()), enforce: Some(boolean), local_logging: Some(boolean), platform_id: Some("string".to_string()), policy_id: Some("string".to_string()), rule_group_ids: vec!["string".to_string()], test_mode: Some(boolean), ..Default::default() };
let response = update_policy_container_v1( &falcon.cfg, // configuration body, // body ).await.expect("API call failed");
println!("{:?}", response);}require "crimson-falcon"
Falcon.configure do |config| config.client_id = ENV["FALCON_CLIENT_ID"] config.client_secret = ENV["FALCON_CLIENT_SECRET"] config.cloud = ENV["FALCON_CLOUD"]end
api = Falcon::FirewallManagement.new
body = Falcon::FwmgrApiPolicyContainerUpsertRequestV1.new( default_inbound: 'string', default_outbound: 'string', enforce: boolean, is_default_policy: boolean, local_logging: boolean, platform_id: 'string', policy_id: 'string', rule_group_ids: [], test_mode: boolean, tracking: 'string')
response = api.update_policy_container_v1(body)
puts responseupdate_policy_container
Section titled “update_policy_container”Update an identified policy container
update_policy_containerParameters
Section titled “Parameters”| Name | Type | Data type | Description |
|---|---|---|---|
| body | body | dictionary | Full body payload in JSON format. |
| default_inbound | body | string | Default inbound. |
| default_outbound | body | string | Default outbound. |
| enforce | body | boolean | Enforcement flag. |
| is_default_policy | body | boolean | Default policy flag. |
| local_logging | body | boolean | Local logging flag. |
| platform_id | body | string | ID of the platform this policy container. |
| policy_id | body | string | Policy ID to apply to this container. |
| rule_group_ids | body | string or list of strings | Rule group IDs to include in this container. |
| test_mode | body | boolean | Flag indicating if this container is in test mode. |
| tracking | body | string | Tracking. |
Code Examples
Section titled “Code Examples”from falconpy import FirewallManagement
falcon = FirewallManagement(client_id=CLIENT_ID, client_secret=CLIENT_SECRET )
id_list = 'ID1,ID2,ID3' # Can also pass a list here: ['ID1', 'ID2', 'ID3']
response = falcon.update_policy_container(default_inbound="string", default_outbound="string", enforce=boolean, is_default_policy=boolean, local_logging=boolean, platform_id="string", policy_id="string", rule_group_ids=id_list, test_mode=boolean, tracking="string")print(response)from falconpy import FirewallManagement
falcon = FirewallManagement(client_id=CLIENT_ID, client_secret=CLIENT_SECRET )
id_list = 'ID1,ID2,ID3' # Can also pass a list here: ['ID1', 'ID2', 'ID3']
response = falcon.update_policy_container(default_inbound="string", default_outbound="string", enforce=boolean, is_default_policy=boolean, local_logging=boolean, platform_id="string", policy_id="string", rule_group_ids=id_list, test_mode=boolean, tracking="string")print(response)from falconpy import APIHarnessV2
falcon = APIHarnessV2(client_id=CLIENT_ID, client_secret=CLIENT_SECRET )
id_list = 'ID1,ID2,ID3' # Can also pass a list here: ['ID1', 'ID2', 'ID3']
body_payload = { "default_inbound": "string", "default_outbound": "string", "enforce": boolean, "is_default_policy": boolean, "local_logging": boolean, "platform_id": "string", "policy_id": "string", "rule_group_ids": ["string"], "test_mode": boolean, "tracking": "string"}
response = falcon.command("update_policy_container", body=body_payload)print(response)Edit-FalconFirewallSetting -Id "string"package main
import ( "context" "fmt" "os"
"github.com/crowdstrike/gofalcon/falcon" "github.com/crowdstrike/gofalcon/falcon/client/firewall_management" "github.com/crowdstrike/gofalcon/falcon/models")
func main() { client, err := falcon.NewClient(&falcon.ApiConfig{ ClientId: os.Getenv("FALCON_CLIENT_ID"), ClientSecret: os.Getenv("FALCON_CLIENT_SECRET"), Context: context.Background(), }) if err != nil { panic(err) }
default_inbound := "string" default_outbound := "string" enforce := boolean is_default_policy := boolean local_logging := boolean platform_id := "string" policy_id := "string" test_mode := boolean tracking := "string"
response, err := client.FirewallManagement.UpdatePolicyContainer( &firewall_management.UpdatePolicyContainerParams{ Body: &models.FwmgrAPIPolicyContainerUpsertRequestV1{ DefaultInbound: &default_inbound, DefaultOutbound: &default_outbound, Enforce: &enforce, IsDefaultPolicy: &is_default_policy, LocalLogging: &local_logging, PlatformID: &platform_id, PolicyID: &policy_id, RuleGroupIds: []string{"string"}, TestMode: &test_mode, Tracking: &tracking, }, Context: context.Background(), }, ) if err != nil { panic(falcon.ErrorExplain(err)) }
fmt.Printf("%+v\n", response.Payload)}import { FalconClient } from "crowdstrike-falcon";
const client = new FalconClient({ cloud: process.env.FALCON_CLOUD!, clientId: process.env.FALCON_CLIENT_ID!, clientSecret: process.env.FALCON_CLIENT_SECRET!,});
const response = await client.firewallManagement.updatePolicyContainer( { defaultInbound: "string", defaultOutbound: "string", enforce: boolean, isDefaultPolicy: boolean, localLogging: boolean, platformId: "string", policyId: "string", ruleGroupIds: [], testMode: boolean, tracking: "string"} // body);
console.log(response);use rusty_falcon::apis::firewall_management_api::update_policy_container;use rusty_falcon::easy::client::FalconHandle;use rusty_falcon::models::FwmgrApiPolicyContainerUpsertRequestV1;
#[tokio::main]async fn main() { let falcon = FalconHandle::from_env().await.expect("Could not authenticate");
let body = FwmgrApiPolicyContainerUpsertRequestV1 { default_inbound: Some("string".to_string()), default_outbound: Some("string".to_string()), enforce: Some(boolean), local_logging: Some(boolean), platform_id: Some("string".to_string()), policy_id: Some("string".to_string()), rule_group_ids: vec!["string".to_string()], test_mode: Some(boolean), ..Default::default() };
let response = update_policy_container( &falcon.cfg, // configuration body, // body ).await.expect("API call failed");
println!("{:?}", response);}require "crimson-falcon"
Falcon.configure do |config| config.client_id = ENV["FALCON_CLIENT_ID"] config.client_secret = ENV["FALCON_CLIENT_SECRET"] config.cloud = ENV["FALCON_CLOUD"]end
api = Falcon::FirewallManagement.new
body = Falcon::FwmgrApiPolicyContainerUpsertRequestV1.new( default_inbound: 'string', default_outbound: 'string', enforce: boolean, is_default_policy: boolean, local_logging: boolean, platform_id: 'string', policy_id: 'string', rule_group_ids: [], test_mode: boolean, tracking: 'string')
response = api.update_policy_container(body)
puts responseget_rule_groups
Section titled “get_rule_groups”Get rule group entities by ID. These groups do not contain their rule entites, just the rule IDs in precedence order.
get_rule_groupsParameters
Section titled “Parameters”| Name | Type | Data type | Description |
|---|---|---|---|
| ids | query | string or list of strings | The ID(s) of the rule group to retrieve. |
| parameters | query | dictionary | Full query string parameters payload in JSON format. |
Code Examples
Section titled “Code Examples”Examples coming soon.
Get-FalconFileVantageRuleGroup -Id @("ID1", "ID2")package main
import ( "context" "fmt" "os"
"github.com/crowdstrike/gofalcon/falcon" "github.com/crowdstrike/gofalcon/falcon/client/filevantage")
func main() { client, err := falcon.NewClient(&falcon.ApiConfig{ ClientId: os.Getenv("FALCON_CLIENT_ID"), ClientSecret: os.Getenv("FALCON_CLIENT_SECRET"), Context: context.Background(), }) if err != nil { panic(err) }
response, err := client.Filevantage.GetRuleGroups( &filevantage.GetRuleGroupsParams{ Ids: []string{"ID1", "ID2", "ID3"}, Context: context.Background(), }, ) if err != nil { panic(falcon.ErrorExplain(err)) }
fmt.Printf("%+v\n", response.Payload)}import { FalconClient } from "crowdstrike-falcon";
const client = new FalconClient({ cloud: process.env.FALCON_CLOUD!, clientId: process.env.FALCON_CLIENT_ID!, clientSecret: process.env.FALCON_CLIENT_SECRET!,});
const response = await client.filevantage.getRuleGroups(["ID1", "ID2", "ID3"]); // ids
console.log(response);use rusty_falcon::apis::filevantage_api::get_rule_groups;use rusty_falcon::easy::client::FalconHandle;
#[tokio::main]async fn main() { let falcon = FalconHandle::from_env().await.expect("Could not authenticate");
let response = get_rule_groups( &falcon.cfg, // configuration vec!["string".to_string()], // ids ).await.expect("API call failed");
println!("{:?}", response);}require "crimson-falcon"
Falcon.configure do |config| config.client_id = ENV["FALCON_CLIENT_ID"] config.client_secret = ENV["FALCON_CLIENT_SECRET"] config.cloud = ENV["FALCON_CLOUD"]end
api = Falcon::Filevantage.new
response = api.get_rule_groups(['ID1', 'ID2', 'ID3'])
puts responsecreate_rule_group
Section titled “create_rule_group”Create new rule group on a platform for a customer with a name and description, and return the ID
create_rule_groupParameters
Section titled “Parameters”| Name | Type | Data type | Description |
|---|---|---|---|
| action | body (rules) | string | Rule action to perform. String. Overridden if rules keyword is provided. |
| address_family | body (rules) | string | Address type, String. Either IP4, IP6 or NONE. Overridden if rules keyword is provided. |
| body | body | dictionary | Full body payload in JSON format. |
| clone_id | query | string | A rule group ID from which to copy rules. If this is provided then the ‘rules’ property of the body is ignored. |
| comment | query | string | Comment for this rule group. |
| description | body | string | Rule group description. |
| direction | body (rules) | string | Traffic direction for created rule. String. Either IN, OUT or BOTH. Overridden if rules keyword is provided. |
| enabled | body | boolean | Flag indicating if the rule group is enabled. |
| fields | body (rules) | dictionary or list of dictionaries | Fields to impact. Dictionary or list of dictionaries. Overridden if rules keyword is provided. |
| icmp | body (rules) | dictionary | ICMP protocol options. Overridden if rules keyword is provided. |
| library | query | string | If this flag is set to true then the rules will be cloned from the clone_id from the CrowdStrike Firewal Rule Groups Library. |
| local_address | body (rules) | dictionary or list of dictionaries | Local address and netmask detail. Overridden if rules keyword is provided. |
| local_port | body (rules) | dictionary or list of dictionaries | Local port range. Overridden if rules keyword is provided. |
| log | body (rules) | boolean | Log rule matches. Overridden if rules keyword is provided. |
| name | body | string | Rule group name. |
| monitor | body (rules) | dictionary | Monitor count / period. Overridden if rules keyword is provided. |
| parameters | query | dictionary | Full query string parameters payload in JSON format. |
| platform | query | string | Common name for the OS platform this rule applies to. Should be provided instead of platform_ids. |
| platform_ids | body (rules) | string or list of strings | OS platform(s) covered by rule. Supports comma delimited strings. Overridden if rules keyword is provided. |
| protocol | body (rules) | integer | Protocol specified by rule (Integer identifier). Overridden if rules keyword is provided. |
| remote_address | body (rules) | dictionary or list of dictionaries | Remote address and netmask detail. Overridden if rules keyword is provided. |
| remote_port | body (rules) | dictionary or list of dictionaries | Remote port range. Overridden if rules keyword is provided. |
| rule_description | body (rules) | string | Rule description. Overridden if rules keyword is provided. |
| rule_enabled | body (rules) | boolean | Enablement status for the new rule. Overridden if rules keyword is provided. |
| rule_name | body (rules) | string | Rule name. Overridden if rules keyword is provided. |
| rules | body | dictionary or list of dictionaries | Rule(s) in JSON format. |
| temp_id | body (rules) | string | String to use for temporary rule ID. Overridden if rules keyword is provided. |
Code Examples
Section titled “Code Examples”from falconpy import FirewallManagement
falcon = FirewallManagement(client_id=CLIENT_ID, client_secret=CLIENT_SECRET )
response = falcon.create_rule_group(action="string", address_family="string", clone_id="string", comment="string", description="string", direction="string", enabled=boolean, fields=[{"key": "value"}], icmp={}, library="string", local_address=[{"key": "value"}], local_port=[{"key": "value"}], log=boolean, name="string", monitor={}, platform="string", protocol=integer, remote_address=[{"key": "value"}], remote_port=[{"key": "value"}], rule_description="string", rule_enabled=boolean, rule_name="string", temp_id="string")print(response)from falconpy import FirewallManagement
falcon = FirewallManagement(client_id=CLIENT_ID, client_secret=CLIENT_SECRET )
response = falcon.create_rule_group(action="string", address_family="string", clone_id="string", comment="string", description="string", direction="string", enabled=boolean, fields=[{"key": "value"}], icmp={}, library="string", local_address=[{"key": "value"}], local_port=[{"key": "value"}], log=boolean, name="string", monitor={}, platform="string", protocol=integer, remote_address=[{"key": "value"}], remote_port=[{"key": "value"}], rule_description="string", rule_enabled=boolean, rule_name="string", temp_id="string")print(response)from falconpy import APIHarnessV2
falcon = APIHarnessV2(client_id=CLIENT_ID, client_secret=CLIENT_SECRET )
body_payload = { "description": "string", "enabled": boolean, "name": "string", "platform": "string", "rules": [ { "action": "string", "address_family": "string", "description": "string", "direction": "string", "enabled": boolean, "fields": [ { "final_value": "string", "label": "string", "name": "string", "type": "string", "value": "string", "values": ["string"] } ], "fqdn": "string", "fqdn_enabled": boolean, "icmp": { "icmp_code": "string", "icmp_type": "string" }, "local_address": [ { "address": "string", "netmask": integer } ], "local_port": [ { "end": integer, "start": integer } ], "log": boolean, "monitor": { "count": "string", "period_ms": "string" }, "name": "string", "protocol": "string", "remote_address": [ { "address": "string", "netmask": integer } ], "remote_port": [ { "end": integer, "start": integer } ], "temp_id": "string" } ]}
response = falcon.command("create_rule_group", clone_id="string", library="string", comment="string", body=body_payload)print(response)New-FalconFirewallGroup -Name "string" ` -Enabled $boolean ` -Platform "string"package main
import ( "context" "fmt" "os"
"github.com/crowdstrike/gofalcon/falcon" "github.com/crowdstrike/gofalcon/falcon/client/firewall_management" "github.com/crowdstrike/gofalcon/falcon/models")
func main() { client, err := falcon.NewClient(&falcon.ApiConfig{ ClientId: os.Getenv("FALCON_CLIENT_ID"), ClientSecret: os.Getenv("FALCON_CLIENT_SECRET"), Context: context.Background(), }) if err != nil { panic(err) }
description := "string" enabled := boolean name := "string" platform := "string" action := "string" address_family := "string" direction := "string" final_value := "string" label := "string" type := "string" value := "string" fqdn := "string" fqdn_enabled := boolean address := "string" netmask := integer end := integer start := integer log := boolean protocol := "string" temp_id := "string" cloneID := "string" library := "string" comment := "string"
response, err := client.FirewallManagement.CreateRuleGroup( &firewall_management.CreateRuleGroupParams{ Body: &models.FwmgrAPIRuleGroupCreateRequestV1{ Description: &description, Enabled: &enabled, Name: &name, Platform: &platform, Rules: []interface{}{ { Action: &action, AddressFamily: &address_family, Description: &description, Direction: &direction, Enabled: &enabled, Fields: []interface{}{ { FinalValue: &final_value, Label: &label, Name: &name, Type: &type, Value: &value, Values: []string{"string"}, }, }, Fqdn: &fqdn, FqdnEnabled: &fqdn_enabled, Icmp: &struct{}{}, LocalAddress: []interface{}{ { Address: &address, Netmask: &netmask, }, }, LocalPort: []interface{}{ { End: &end, Start: &start, }, }, Log: &log, Monitor: &struct{}{}, Name: &name, Protocol: &protocol, RemoteAddress: []interface{}{ { Address: &address, Netmask: &netmask, }, }, RemotePort: []interface{}{ { End: &end, Start: &start, }, }, TempID: &temp_id, }, }, }, CloneID: &cloneID, Library: &library, Comment: &comment, Context: context.Background(), }, ) if err != nil { panic(falcon.ErrorExplain(err)) }
fmt.Printf("%+v\n", response.Payload)}import { FalconClient } from "crowdstrike-falcon";
const client = new FalconClient({ cloud: process.env.FALCON_CLOUD!, clientId: process.env.FALCON_CLIENT_ID!, clientSecret: process.env.FALCON_CLIENT_SECRET!,});
const response = await client.firewallManagement.createRuleGroup( { // body description: "string", enabled: boolean, name: "string", platform: "string", rules: [{ action: "string", addressFamily: "string", description: "string", direction: "string", enabled: boolean, fields: [{ finalValue: "string", label: "string", name: "string", type: "string", value: "string", values: [] }], fqdn: "string", fqdnEnabled: boolean, icmp: { icmpCode: "string", icmpType: "string" }, localAddress: [{ address: "string", netmask: integer }], localPort: [{ end: integer, start: integer }], log: boolean, monitor: { count: "string", periodMs: "string" }, name: "string", protocol: "string", remoteAddress: [{ address: "string", netmask: integer }], remotePort: [{ end: integer, start: integer }], tempId: "string" }] }, "string", // cloneId "string", // library "string" // comment);
console.log(response);use rusty_falcon::apis::firewall_management_api::create_rule_group;use rusty_falcon::easy::client::FalconHandle;use rusty_falcon::models::FwmgrApiRuleGroupCreateRequestV1;
#[tokio::main]async fn main() { let falcon = FalconHandle::from_env().await.expect("Could not authenticate");
let body = FwmgrApiRuleGroupCreateRequestV1 { description: Some("string".to_string()), enabled: Some(boolean), name: Some("string".to_string()), platform: Some("string".to_string()), rules: vec![RuleCreateRequestV1 { action: Some("string".to_string()), address_family: Some("string".to_string()), description: Some("string".to_string()), direction: Some("string".to_string()), enabled: Some(boolean), fields: vec![workaroundUIFieldValue { name: Some("string".to_string()), ..Default::default() }], fqdn: Some("string".to_string()), fqdn_enabled: Some(boolean), icmp: Default::default(), local_address: vec![AddressRange { address: Some("string".to_string()), ..Default::default() }], local_port: vec![PortRange { end: Some(integer), start: Some(integer), ..Default::default() }], log: Some(boolean), monitor: Default::default(), name: Some("string".to_string()), protocol: Some("string".to_string()), remote_address: vec![AddressRange { address: Some("string".to_string()), ..Default::default() }], remote_port: vec![PortRange { end: Some(integer), start: Some(integer), ..Default::default() }], temp_id: Some("string".to_string()), ..Default::default() }], ..Default::default() };
let response = create_rule_group( &falcon.cfg, // configuration body, // body Some("string"), // clone_id Some("string"), // library Some("string"), // comment ).await.expect("API call failed");
println!("{:?}", response);}require "crimson-falcon"
Falcon.configure do |config| config.client_id = ENV["FALCON_CLIENT_ID"] config.client_secret = ENV["FALCON_CLIENT_SECRET"] config.cloud = ENV["FALCON_CLOUD"]end
api = Falcon::FirewallManagement.new
body = { description: 'string', enabled: boolean, name: 'string', platform: 'string', rules: [{ action: 'string', address_family: 'string', description: 'string', direction: 'string', enabled: boolean, fields: [{ final_value: 'string', label: 'string', name: 'string', type: 'string', value: 'string', values: [] }], fqdn: 'string', fqdn_enabled: boolean, icmp: { icmp_code: 'string', icmp_type: 'string' }, local_address: [{ address: 'string', netmask: integer }], local_port: [{ end: integer, start: integer }], log: boolean, monitor: { count: 'string', period_ms: 'string' }, name: 'string', protocol: 'string', remote_address: [{ address: 'string', netmask: integer }], remote_port: [{ end: integer, start: integer }], temp_id: 'string' }]}
response = api.create_rule_group(body)
puts responsedelete_rule_groups
Section titled “delete_rule_groups”Delete rule group entities by ID
delete_rule_groupsParameters
Section titled “Parameters”| Name | Type | Data type | Description |
|---|---|---|---|
| comment | query | string or list of strings | Audit log comment for this operation. |
| ids | query | string or list of strings | The rules to retrieve, identified by ID. |
| parameters | query | dictionary | Full query string parameters payload in JSON format. |
Code Examples
Section titled “Code Examples”Examples coming soon.
Remove-FalconFileVantageRuleGroup -Id @("ID1", "ID2")package main
import ( "context" "fmt" "os"
"github.com/crowdstrike/gofalcon/falcon" "github.com/crowdstrike/gofalcon/falcon/client/filevantage")
func main() { client, err := falcon.NewClient(&falcon.ApiConfig{ ClientId: os.Getenv("FALCON_CLIENT_ID"), ClientSecret: os.Getenv("FALCON_CLIENT_SECRET"), Context: context.Background(), }) if err != nil { panic(err) }
response, err := client.Filevantage.DeleteRuleGroups( &filevantage.DeleteRuleGroupsParams{ Ids: []string{"ID1", "ID2", "ID3"}, Context: context.Background(), }, ) if err != nil { panic(falcon.ErrorExplain(err)) }
fmt.Printf("%+v\n", response.Payload)}import { FalconClient } from "crowdstrike-falcon";
const client = new FalconClient({ cloud: process.env.FALCON_CLOUD!, clientId: process.env.FALCON_CLIENT_ID!, clientSecret: process.env.FALCON_CLIENT_SECRET!,});
const response = await client.filevantage.deleteRuleGroups(["ID1", "ID2", "ID3"]); // ids
console.log(response);use rusty_falcon::apis::filevantage_api::delete_rule_groups;use rusty_falcon::easy::client::FalconHandle;
#[tokio::main]async fn main() { let falcon = FalconHandle::from_env().await.expect("Could not authenticate");
let response = delete_rule_groups( &falcon.cfg, // configuration vec!["string".to_string()], // ids ).await.expect("API call failed");
println!("{:?}", response);}require "crimson-falcon"
Falcon.configure do |config| config.client_id = ENV["FALCON_CLIENT_ID"] config.client_secret = ENV["FALCON_CLIENT_SECRET"] config.cloud = ENV["FALCON_CLOUD"]end
api = Falcon::Filevantage.new
response = api.delete_rule_groups(['ID1', 'ID2', 'ID3'])
puts responseupdate_rule_group
Section titled “update_rule_group”Update name, description, or enabled status of a rule group, or create, edit, delete, or reorder rules
update_rule_groupParameters
Section titled “Parameters”| Name | Type | Data type | Description |
|---|---|---|---|
| body | body | dictionary | Full body payload in JSON format. |
| comment | query | string | Audit log comment for this action. |
| diff_from | body (diff_operations) | string | From value for the diff. Overridden if diff_operations keyword is provided. |
| diff_op | body (diff_operations) | string | Operation for the diff. Overridden if diff_operations keyword is provided. |
| diff_operations | body | dictionary or list of dictionaries | Differential operations to perform against the rule group. |
| diff_path | body (diff_operations) | string | Path for the diff. Overridden if diff_operations keyword is provided. |
| diff_type | body | string | Type of diff to apply. |
| id | body | string | ID of the rule group to update. |
| parameters | query | dictionary | Full query string parameters payload in JSON format. |
| rule_ids | body | list of strings | Rule ID(s) to add to the rule group. |
| rule_versions | body | list of integers | Rule group versions. |
| tracking | body | string | Tracking. |
Code Examples
Section titled “Code Examples”from falconpy import FirewallManagement
falcon = FirewallManagement(client_id=CLIENT_ID, client_secret=CLIENT_SECRET )
id_list = 'ID1,ID2,ID3' # Can also pass a list here: ['ID1', 'ID2', 'ID3']
response = falcon.update_rule_group(comment="string", diff_from="string", diff_op="string", diff_operations="string", diff_path="string", diff_type="string", id="string", rule_ids=id_list, rule_versions=integer, tracking="string")print(response)from falconpy import FirewallManagement
falcon = FirewallManagement(client_id=CLIENT_ID, client_secret=CLIENT_SECRET )
id_list = 'ID1,ID2,ID3' # Can also pass a list here: ['ID1', 'ID2', 'ID3']
response = falcon.update_rule_group(comment="string", diff_from="string", diff_op="string", diff_operations="string", diff_path="string", diff_type="string", id="string", rule_ids=id_list, rule_versions=integer, tracking="string")print(response)from falconpy import APIHarnessV2
falcon = APIHarnessV2(client_id=CLIENT_ID, client_secret=CLIENT_SECRET )
id_list = 'ID1,ID2,ID3' # Can also pass a list here: ['ID1', 'ID2', 'ID3']
body_payload = { "diff_operations": [ { "from": "string", "op": "string", "path": "string", "value": {} } ], "diff_type": "string", "id": "string", "rule_ids": ["string"], "rule_versions": ["string"], "tracking": "string"}
response = falcon.command("update_rule_group", comment="string", body=body_payload)print(response)Edit-FalconFirewallGroup -Comment "string" -Id "string"package main
import ( "context" "fmt" "os"
"github.com/crowdstrike/gofalcon/falcon" "github.com/crowdstrike/gofalcon/falcon/client/firewall_management" "github.com/crowdstrike/gofalcon/falcon/models")
func main() { client, err := falcon.NewClient(&falcon.ApiConfig{ ClientId: os.Getenv("FALCON_CLIENT_ID"), ClientSecret: os.Getenv("FALCON_CLIENT_SECRET"), Context: context.Background(), }) if err != nil { panic(err) }
from := "string" op := "string" path := "string" diff_type := "string" id := "string" tracking := "string" comment := "string"
response, err := client.FirewallManagement.UpdateRuleGroup( &firewall_management.UpdateRuleGroupParams{ Body: &models.FwmgrAPIRuleGroupModifyRequestV1{ DiffOperations: []interface{}{ { From: &from, Op: &op, Path: &path, Value: &struct{}{}, }, }, DiffType: &diff_type, ID: &id, RuleIds: []string{"string"}, RuleVersions: []interface{}{}, Tracking: &tracking, }, Comment: &comment, Context: context.Background(), }, ) if err != nil { panic(falcon.ErrorExplain(err)) }
fmt.Printf("%+v\n", response.Payload)}import { FalconClient } from "crowdstrike-falcon";
const client = new FalconClient({ cloud: process.env.FALCON_CLOUD!, clientId: process.env.FALCON_CLIENT_ID!, clientSecret: process.env.FALCON_CLIENT_SECRET!,});
const response = await client.firewallManagement.updateRuleGroup( { // body diffOperations: [{ from: "string", op: "string", path: "string", value: {} }], diffType: "string", id: "string", ruleIds: [], ruleVersions: [], tracking: "string" }, "string" // comment);
console.log(response);use rusty_falcon::apis::firewall_management_api::update_rule_group;use rusty_falcon::easy::client::FalconHandle;use rusty_falcon::models::FwmgrApiRuleGroupModifyRequestV1;
#[tokio::main]async fn main() { let falcon = FalconHandle::from_env().await.expect("Could not authenticate");
let body = FwmgrApiRuleGroupModifyRequestV1 { diff_operations: vec![JSONDiff { op: Some("string".to_string()), path: Some("string".to_string()), value: Default::default(), ..Default::default() }], diff_type: Some("string".to_string()), id: Some("string".to_string()), rule_ids: vec!["string".to_string()], rule_versions: vec![], tracking: Some("string".to_string()), ..Default::default() };
let response = update_rule_group( &falcon.cfg, // configuration body, // body Some("string"), // comment ).await.expect("API call failed");
println!("{:?}", response);}require "crimson-falcon"
Falcon.configure do |config| config.client_id = ENV["FALCON_CLIENT_ID"] config.client_secret = ENV["FALCON_CLIENT_SECRET"] config.cloud = ENV["FALCON_CLOUD"]end
api = Falcon::FirewallManagement.new
body = Falcon::FwmgrApiRuleGroupModifyRequestV1.new( diff_operations: [{ from: 'string', op: 'string', path: 'string', value: {} }], diff_type: 'string', id: 'string', rule_ids: [], rule_versions: [], tracking: 'string')
response = api.update_rule_group(body)
puts responsecreate_rule_group_validation
Section titled “create_rule_group_validation”Validates the request of creating a new rule group on a platform for a customer with a name and description
create_rule_group_validationParameters
Section titled “Parameters”| Name | Type | Data type | Description |
|---|---|---|---|
| body | body | dictionary | Full body payload in JSON format, not required if using other keywords. |
| clone_id | query | string | A rule group validation ID from which to copy rules. If this is provided then the ‘rules’ property of the body is ignored. |
| comment | query | string | Audit log comment for this action. |
| description | body | string | Rule group validation description. |
| enabled | body | boolean | Flag indicating if this validation is enabled. |
| library | query | boolean | If this flag is set to true then the rules will be cloned from the clone_id from the CrowdStrike Firewall Rule Groups Library. |
| name | body | string | Name for this rule group validation. |
| parameters | query | dictionary | Full parameters payload in JSON format. Not required if using the clone_id and comment keywords. |
| platform | body | string | Name of the platform this rule group validation is associated with. |
| rules | body | list of dictionaries | JSON formatted list of rules to validate. |
Code Examples
Section titled “Code Examples”from falconpy import FirewallManagement
falcon = FirewallManagement(client_id=CLIENT_ID, client_secret=CLIENT_SECRET )
rules = [ { "action": "string", "address_family": "string", "description": "string", "direction": "string", "enabled": true, "fields": [ { "final_value": "string", "label": "string", "name": "string", "type": "string", "value": "string", "values": [ "string" ] } ], "fqdn": "string", "fqdn_enabled": true, "icmp": { "icmp_code": "string", "icmp_type": "string" }, "local_address": [ { "address": "string", "netmask": 0 } ], "local_port": [ { "end": 0, "start": 0 } ], "log": true, "monitor": { "count": "string", "period_ms": "string" }, "name": "string", "protocol": "string", "remote_address": [ { "address": "string", "netmask": 0 } ], "remote_port": [ { "end": 0, "start": 0 } ], "temp_id": "string" }]
response = falcon.create_rule_group_validation(clone_id="string", comment="string", description="string", enabled=boolean, library="string", name="string", platform="string", rules=rules)print(response)from falconpy import FirewallManagement
falcon = FirewallManagement(client_id=CLIENT_ID, client_secret=CLIENT_SECRET )
rules = [ { "action": "string", "address_family": "string", "description": "string", "direction": "string", "enabled": true, "fields": [ { "final_value": "string", "label": "string", "name": "string", "type": "string", "value": "string", "values": [ "string" ] } ], "fqdn": "string", "fqdn_enabled": true, "icmp": { "icmp_code": "string", "icmp_type": "string" }, "local_address": [ { "address": "string", "netmask": 0 } ], "local_port": [ { "end": 0, "start": 0 } ], "log": true, "monitor": { "count": "string", "period_ms": "string" }, "name": "string", "protocol": "string", "remote_address": [ { "address": "string", "netmask": 0 } ], "remote_port": [ { "end": 0, "start": 0 } ], "temp_id": "string" }]
response = falcon.create_rule_group_validation(clone_id="string", comment="string", description="string", enabled=boolean, library="string", name="string", platform="string", rules=rules)print(response)from falconpy import APIHarnessV2
falcon = APIHarnessV2(client_id=CLIENT_ID, client_secret=CLIENT_SECRET )
body_payload = { "description": "string", "enabled": boolean, "name": "string", "platform": "string", "rules": [ { "action": "string", "address_family": "string", "description": "string", "direction": "string", "enabled": boolean, "fields": [ { "final_value": "string", "label": "string", "name": "string", "type": "string", "value": "string", "values": ["string"] } ], "fqdn": "string", "fqdn_enabled": boolean, "icmp": { "icmp_code": "string", "icmp_type": "string" }, "local_address": [ { "address": "string", "netmask": integer } ], "local_port": [ { "end": integer, "start": integer } ], "log": boolean, "monitor": { "count": "string", "period_ms": "string" }, "name": "string", "protocol": "string", "remote_address": [ { "address": "string", "netmask": integer } ], "remote_port": [ { "end": integer, "start": integer } ], "temp_id": "string" } ]}
response = falcon.command("create_rule_group_validation", clone_id="string", library="string", comment="string", body=body_payload)print(response)New-FalconFirewallGroup -Name "string" ` -Enabled $boolean ` -Platform "string" ` -Validate $booleanpackage main
import ( "context" "fmt" "os"
"github.com/crowdstrike/gofalcon/falcon" "github.com/crowdstrike/gofalcon/falcon/client/firewall_management" "github.com/crowdstrike/gofalcon/falcon/models")
func main() { client, err := falcon.NewClient(&falcon.ApiConfig{ ClientId: os.Getenv("FALCON_CLIENT_ID"), ClientSecret: os.Getenv("FALCON_CLIENT_SECRET"), Context: context.Background(), }) if err != nil { panic(err) }
description := "string" enabled := boolean name := "string" platform := "string" action := "string" address_family := "string" direction := "string" final_value := "string" label := "string" type := "string" value := "string" fqdn := "string" fqdn_enabled := boolean address := "string" netmask := integer end := integer start := integer log := boolean protocol := "string" temp_id := "string" cloneID := "string" library := "string" comment := "string"
response, err := client.FirewallManagement.CreateRuleGroupValidation( &firewall_management.CreateRuleGroupValidationParams{ Body: &models.FwmgrAPIRuleGroupCreateRequestV1{ Description: &description, Enabled: &enabled, Name: &name, Platform: &platform, Rules: []interface{}{ { Action: &action, AddressFamily: &address_family, Description: &description, Direction: &direction, Enabled: &enabled, Fields: []interface{}{ { FinalValue: &final_value, Label: &label, Name: &name, Type: &type, Value: &value, Values: []string{"string"}, }, }, Fqdn: &fqdn, FqdnEnabled: &fqdn_enabled, Icmp: &struct{}{}, LocalAddress: []interface{}{ { Address: &address, Netmask: &netmask, }, }, LocalPort: []interface{}{ { End: &end, Start: &start, }, }, Log: &log, Monitor: &struct{}{}, Name: &name, Protocol: &protocol, RemoteAddress: []interface{}{ { Address: &address, Netmask: &netmask, }, }, RemotePort: []interface{}{ { End: &end, Start: &start, }, }, TempID: &temp_id, }, }, }, CloneID: &cloneID, Library: &library, Comment: &comment, Context: context.Background(), }, ) if err != nil { panic(falcon.ErrorExplain(err)) }
fmt.Printf("%+v\n", response.Payload)}import { FalconClient } from "crowdstrike-falcon";
const client = new FalconClient({ cloud: process.env.FALCON_CLOUD!, clientId: process.env.FALCON_CLIENT_ID!, clientSecret: process.env.FALCON_CLIENT_SECRET!,});
const response = await client.firewallManagement.createRuleGroupValidation( { // body description: "string", enabled: boolean, name: "string", platform: "string", rules: [{ action: "string", addressFamily: "string", description: "string", direction: "string", enabled: boolean, fields: [{ finalValue: "string", label: "string", name: "string", type: "string", value: "string", values: [] }], fqdn: "string", fqdnEnabled: boolean, icmp: { icmpCode: "string", icmpType: "string" }, localAddress: [{ address: "string", netmask: integer }], localPort: [{ end: integer, start: integer }], log: boolean, monitor: { count: "string", periodMs: "string" }, name: "string", protocol: "string", remoteAddress: [{ address: "string", netmask: integer }], remotePort: [{ end: integer, start: integer }], tempId: "string" }] }, "string", // cloneId "string", // library "string" // comment);
console.log(response);use rusty_falcon::apis::firewall_management_api::create_rule_group_validation;use rusty_falcon::easy::client::FalconHandle;use rusty_falcon::models::FwmgrApiRuleGroupCreateRequestV1;
#[tokio::main]async fn main() { let falcon = FalconHandle::from_env().await.expect("Could not authenticate");
let body = FwmgrApiRuleGroupCreateRequestV1 { description: Some("string".to_string()), enabled: Some(boolean), name: Some("string".to_string()), platform: Some("string".to_string()), rules: vec![RuleCreateRequestV1 { action: Some("string".to_string()), address_family: Some("string".to_string()), description: Some("string".to_string()), direction: Some("string".to_string()), enabled: Some(boolean), fields: vec![workaroundUIFieldValue { name: Some("string".to_string()), ..Default::default() }], fqdn: Some("string".to_string()), fqdn_enabled: Some(boolean), icmp: Default::default(), local_address: vec![AddressRange { address: Some("string".to_string()), ..Default::default() }], local_port: vec![PortRange { end: Some(integer), start: Some(integer), ..Default::default() }], log: Some(boolean), monitor: Default::default(), name: Some("string".to_string()), protocol: Some("string".to_string()), remote_address: vec![AddressRange { address: Some("string".to_string()), ..Default::default() }], remote_port: vec![PortRange { end: Some(integer), start: Some(integer), ..Default::default() }], temp_id: Some("string".to_string()), ..Default::default() }], ..Default::default() };
let response = create_rule_group_validation( &falcon.cfg, // configuration body, // body Some("string"), // clone_id Some("string"), // library Some("string"), // comment ).await.expect("API call failed");
println!("{:?}", response);}require "crimson-falcon"
Falcon.configure do |config| config.client_id = ENV["FALCON_CLIENT_ID"] config.client_secret = ENV["FALCON_CLIENT_SECRET"] config.cloud = ENV["FALCON_CLOUD"]end
api = Falcon::FirewallManagement.new
body = { description: 'string', enabled: boolean, name: 'string', platform: 'string', rules: [{ action: 'string', address_family: 'string', description: 'string', direction: 'string', enabled: boolean, fields: [{ final_value: 'string', label: 'string', name: 'string', type: 'string', value: 'string', values: [] }], fqdn: 'string', fqdn_enabled: boolean, icmp: { icmp_code: 'string', icmp_type: 'string' }, local_address: [{ address: 'string', netmask: integer }], local_port: [{ end: integer, start: integer }], log: boolean, monitor: { count: 'string', period_ms: 'string' }, name: 'string', protocol: 'string', remote_address: [{ address: 'string', netmask: integer }], remote_port: [{ end: integer, start: integer }], temp_id: 'string' }]}
response = api.create_rule_group_validation(body)
puts responseupdate_rule_group_validation
Section titled “update_rule_group_validation”Validates the request of updating name, description, or enabled status of a rule group, or create, edit, delete, or reorder rules
update_rule_group_validationParameters
Section titled “Parameters”| Name | Type | Data type | Description |
|---|---|---|---|
| body | body | dictionary | Full body payload in JSON format. |
| comment | query | string | Audit log comment for this action. |
| diff_from | body (diff_operations) | string | From value for the diff. Overridden if diff_operations keyword is provided. |
| diff_op | body (diff_operations) | string | Operation for the diff. Overridden if diff_operations keyword is provided. |
| diff_operations | body | dictionary or list of dictionaries | Differential operations to perform against the rule group. |
| diff_path | body (diff_operations) | string | Path for the diff. Overridden if diff_operations keyword is provided. |
| diff_type | body | string | Type of diff to apply. |
| id | body | string | ID of the rule group to update. |
| parameters | query | dictionary | Full query string parameters payload in JSON format. |
| rule_ids | body | list of strings | Rule ID(s) to add to the rule group. |
| rule_versions | body | list of integers | Rule group versions. |
| tracking | body | string | Tracking. |
Code Examples
Section titled “Code Examples”from falconpy import FirewallManagement
falcon = FirewallManagement(client_id=CLIENT_ID, client_secret=CLIENT_SECRET )
id_list = 'ID1,ID2,ID3' # Can also pass a list here: ['ID1', 'ID2', 'ID3']
response = falcon.update_rule_group_validation(comment="string", diff_from="string", diff_op="string", diff_operations="string", diff_path="string", diff_type="string", id="string", rule_ids=id_list, rule_versions=integer, tracking="string")print(response)from falconpy import FirewallManagement
falcon = FirewallManagement(client_id=CLIENT_ID, client_secret=CLIENT_SECRET )
id_list = 'ID1,ID2,ID3' # Can also pass a list here: ['ID1', 'ID2', 'ID3']
response = falcon.update_rule_group_validation(comment="string", diff_from="string", diff_op="string", diff_operations="string", diff_path="string", diff_type="string", id="string", rule_ids=id_list, rule_versions=integer, tracking="string")print(response)from falconpy import APIHarnessV2
falcon = APIHarnessV2(client_id=CLIENT_ID, client_secret=CLIENT_SECRET )
id_list = 'ID1,ID2,ID3' # Can also pass a list here: ['ID1', 'ID2', 'ID3']
body_payload = { "diff_operations": [ { "from": "string", "op": "string", "path": "string", "value": {} } ], "diff_type": "string", "id": "string", "rule_ids": ["string"], "rule_versions": ["string"], "tracking": "string"}
response = falcon.command("update_rule_group_validation", comment="string", body=body_payload)print(response)Edit-FalconFirewallGroup -Comment "string" ` -Id "string" ` -Validate $booleanpackage main
import ( "context" "fmt" "os"
"github.com/crowdstrike/gofalcon/falcon" "github.com/crowdstrike/gofalcon/falcon/client/firewall_management" "github.com/crowdstrike/gofalcon/falcon/models")
func main() { client, err := falcon.NewClient(&falcon.ApiConfig{ ClientId: os.Getenv("FALCON_CLIENT_ID"), ClientSecret: os.Getenv("FALCON_CLIENT_SECRET"), Context: context.Background(), }) if err != nil { panic(err) }
from := "string" op := "string" path := "string" diff_type := "string" id := "string" tracking := "string" comment := "string"
response, err := client.FirewallManagement.UpdateRuleGroupValidation( &firewall_management.UpdateRuleGroupValidationParams{ Body: &models.FwmgrAPIRuleGroupModifyRequestV1{ DiffOperations: []interface{}{ { From: &from, Op: &op, Path: &path, Value: &struct{}{}, }, }, DiffType: &diff_type, ID: &id, RuleIds: []string{"string"}, RuleVersions: []interface{}{}, Tracking: &tracking, }, Comment: &comment, Context: context.Background(), }, ) if err != nil { panic(falcon.ErrorExplain(err)) }
fmt.Printf("%+v\n", response.Payload)}import { FalconClient } from "crowdstrike-falcon";
const client = new FalconClient({ cloud: process.env.FALCON_CLOUD!, clientId: process.env.FALCON_CLIENT_ID!, clientSecret: process.env.FALCON_CLIENT_SECRET!,});
const response = await client.firewallManagement.updateRuleGroupValidation( { // body diffOperations: [{ from: "string", op: "string", path: "string", value: {} }], diffType: "string", id: "string", ruleIds: [], ruleVersions: [], tracking: "string" }, "string" // comment);
console.log(response);use rusty_falcon::apis::firewall_management_api::update_rule_group_validation;use rusty_falcon::easy::client::FalconHandle;use rusty_falcon::models::FwmgrApiRuleGroupModifyRequestV1;
#[tokio::main]async fn main() { let falcon = FalconHandle::from_env().await.expect("Could not authenticate");
let body = FwmgrApiRuleGroupModifyRequestV1 { diff_operations: vec![JSONDiff { op: Some("string".to_string()), path: Some("string".to_string()), value: Default::default(), ..Default::default() }], diff_type: Some("string".to_string()), id: Some("string".to_string()), rule_ids: vec!["string".to_string()], rule_versions: vec![], tracking: Some("string".to_string()), ..Default::default() };
let response = update_rule_group_validation( &falcon.cfg, // configuration body, // body Some("string"), // comment ).await.expect("API call failed");
println!("{:?}", response);}require "crimson-falcon"
Falcon.configure do |config| config.client_id = ENV["FALCON_CLIENT_ID"] config.client_secret = ENV["FALCON_CLIENT_SECRET"] config.cloud = ENV["FALCON_CLOUD"]end
api = Falcon::FirewallManagement.new
body = Falcon::FwmgrApiRuleGroupModifyRequestV1.new( diff_operations: [{ from: 'string', op: 'string', path: 'string', value: {} }], diff_type: 'string', id: 'string', rule_ids: [], rule_versions: [], tracking: 'string')
response = api.update_rule_group_validation(body)
puts responseget_rules
Section titled “get_rules”Get rule entities by ID (64-bit unsigned int as decimal string) or Family ID (32-character hexadecimal string)
get_rulesParameters
Section titled “Parameters”| Name | Type | Data type | Description |
|---|---|---|---|
| ids | query | string or list of strings | The rules to retrieve, identified by ID. |
| parameters | query | dictionary | Full query string parameters payload in JSON format. |
Code Examples
Section titled “Code Examples”Examples coming soon.
Get-FalconFileVantageRule -RuleGroupId "string" -Id @("ID1", "ID2")package main
import ( "context" "fmt" "os"
"github.com/crowdstrike/gofalcon/falcon" "github.com/crowdstrike/gofalcon/falcon/client/filevantage")
func main() { client, err := falcon.NewClient(&falcon.ApiConfig{ ClientId: os.Getenv("FALCON_CLIENT_ID"), ClientSecret: os.Getenv("FALCON_CLIENT_SECRET"), Context: context.Background(), }) if err != nil { panic(err) }
response, err := client.Filevantage.GetRules( &filevantage.GetRulesParams{ RuleGroupID: "string", Ids: []string{"ID1", "ID2", "ID3"}, Context: context.Background(), }, ) if err != nil { panic(falcon.ErrorExplain(err)) }
fmt.Printf("%+v\n", response.Payload)}import { FalconClient } from "crowdstrike-falcon";
const client = new FalconClient({ cloud: process.env.FALCON_CLOUD!, clientId: process.env.FALCON_CLIENT_ID!, clientSecret: process.env.FALCON_CLIENT_SECRET!,});
const response = await client.filevantage.getRules( "string", // ruleGroupId ["ID1", "ID2", "ID3"] // ids);
console.log(response);use rusty_falcon::apis::filevantage_api::get_rules;use rusty_falcon::easy::client::FalconHandle;
#[tokio::main]async fn main() { let falcon = FalconHandle::from_env().await.expect("Could not authenticate");
let response = get_rules( &falcon.cfg, // configuration "string", // rule_group_id vec!["string".to_string()], // ids ).await.expect("API call failed");
println!("{:?}", response);}require "crimson-falcon"
Falcon.configure do |config| config.client_id = ENV["FALCON_CLIENT_ID"] config.client_secret = ENV["FALCON_CLIENT_SECRET"] config.cloud = ENV["FALCON_CLOUD"]end
api = Falcon::Filevantage.new
response = api.get_rules('string', ['ID1', 'ID2', 'ID3'])
puts responsevalidate_filepath_pattern
Section titled “validate_filepath_pattern”Validates that the test pattern matches the executable filepath glob pattern.
validate_filepath_patternParameters
Section titled “Parameters”| Name | Type | Data type | Description |
|---|---|---|---|
| body | body | dictionary | Full body payload in JSON format. |
| filepath_pattern | body | string | Pattern to test against. |
| filepath_test_string | body | string | File path string to be tested. |
Code Examples
Section titled “Code Examples”from falconpy import FirewallManagement
falcon = FirewallManagement(client_id=CLIENT_ID, client_secret=CLIENT_SECRET )
response = falcon.validate_filepath_pattern(filepath_pattern="string", filepath_test_string="string")print(response)from falconpy import FirewallManagement
falcon = FirewallManagement(client_id=CLIENT_ID, client_secret=CLIENT_SECRET )
response = falcon.validate_filepath_pattern(filepath_pattern="string", filepath_test_string="string")print(response)from falconpy import APIHarnessV2
falcon = APIHarnessV2(client_id=CLIENT_ID, client_secret=CLIENT_SECRET )
body_payload = { "filepath_pattern": "string", "filepath_test_string": "string"}
response = falcon.command("validate_filepath_pattern", body=body_payload)print(response)Test-FalconFirewallPath -Pattern "string" -String "string"package main
import ( "context" "fmt" "os"
"github.com/crowdstrike/gofalcon/falcon" "github.com/crowdstrike/gofalcon/falcon/client/firewall_management" "github.com/crowdstrike/gofalcon/falcon/models")
func main() { client, err := falcon.NewClient(&falcon.ApiConfig{ ClientId: os.Getenv("FALCON_CLIENT_ID"), ClientSecret: os.Getenv("FALCON_CLIENT_SECRET"), Context: context.Background(), }) if err != nil { panic(err) }
filepath_pattern := "string" filepath_test_string := "string"
response, err := client.FirewallManagement.ValidateFilepathPattern( &firewall_management.ValidateFilepathPatternParams{ Body: &models.FwmgrAPIFilepathTestRequest{ FilepathPattern: &filepath_pattern, FilepathTestString: &filepath_test_string, }, Context: context.Background(), }, ) if err != nil { panic(falcon.ErrorExplain(err)) }
fmt.Printf("%+v\n", response.Payload)}import { FalconClient } from "crowdstrike-falcon";
const client = new FalconClient({ cloud: process.env.FALCON_CLOUD!, clientId: process.env.FALCON_CLIENT_ID!, clientSecret: process.env.FALCON_CLIENT_SECRET!,});
const response = await client.firewallManagement.validateFilepathPattern( { filepathPattern: "string", filepathTestString: "string"} // body);
console.log(response);use rusty_falcon::apis::firewall_management_api::validate_filepath_pattern;use rusty_falcon::easy::client::FalconHandle;use rusty_falcon::models::FwmgrApiFilepathTestRequest;
#[tokio::main]async fn main() { let falcon = FalconHandle::from_env().await.expect("Could not authenticate");
let body = FwmgrApiFilepathTestRequest { filepath_pattern: Some("string".to_string()), filepath_test_string: Some("string".to_string()), ..Default::default() };
let response = validate_filepath_pattern( &falcon.cfg, // configuration body, // body ).await.expect("API call failed");
println!("{:?}", response);}require "crimson-falcon"
Falcon.configure do |config| config.client_id = ENV["FALCON_CLIENT_ID"] config.client_secret = ENV["FALCON_CLIENT_SECRET"] config.cloud = ENV["FALCON_CLOUD"]end
api = Falcon::FirewallManagement.new
body = Falcon::FwmgrApiFilepathTestRequest.new( filepath_pattern: 'string', filepath_test_string: 'string')
response = api.validate_filepath_pattern(body)
puts responsequery_events
Section titled “query_events”Find all event IDs matching the query with filter
query_eventsParameters
Section titled “Parameters”| Name | Type | Data type | Description |
|---|---|---|---|
| after | query | string | A pagination token used with the limit parameter to manage pagination of results. On your first request, don’t provide an after token. On subsequent requests, provide the after token from the previous response to continue from that place in the results. To access more than 10k indicators, use the after parameter instead of offset. |
| filter | query | string | FQL Syntax formatted filter that should be used to limit the results. |
| limit | query | integer | Maximum number of results to return. |
| offset | query | integer | The offset to start retrieving records from. Offset and After params are mutually exclusive. If none provided then scrolling will be used by default. To access more than 10k iocs, use the after parameter instead of offset. |
| parameters | query | dictionary | Full query string parameters payload in JSON format. |
| q | query | string | Free text search across all indexed fields. |
| sort | query | string | FQL Syntax formatted sort filter. |
Code Examples
Section titled “Code Examples”from falconpy import FirewallManagement
falcon = FirewallManagement(client_id=CLIENT_ID, client_secret=CLIENT_SECRET )
response = falcon.query_events(after="string", filter="string", limit=integer, offset=integer, q="string", sort="string")print(response)from falconpy import FirewallManagement
falcon = FirewallManagement(client_id=CLIENT_ID, client_secret=CLIENT_SECRET )
response = falcon.query_events(after="string", filter="string", limit=integer, offset=integer, q="string", sort="string")print(response)from falconpy import APIHarnessV2
falcon = APIHarnessV2(client_id=CLIENT_ID, client_secret=CLIENT_SECRET )
response = falcon.command("query_events", sort="string", filter="string", q="string", offset="string", after="string", limit=integer)print(response)Get-FalconFirewallEvent -Filter "string" ` -Query "string" ` -Sort "string" ` -Limit integer ` -Offset integerpackage main
import ( "context" "fmt" "os"
"github.com/crowdstrike/gofalcon/falcon" "github.com/crowdstrike/gofalcon/falcon/client/firewall_management")
func main() { client, err := falcon.NewClient(&falcon.ApiConfig{ ClientId: os.Getenv("FALCON_CLIENT_ID"), ClientSecret: os.Getenv("FALCON_CLIENT_SECRET"), Context: context.Background(), }) if err != nil { panic(err) }
sort := "string" filter := "string" q := "string" offset := "string" after := "string" limit := int64(0)
response, err := client.FirewallManagement.QueryEvents( &firewall_management.QueryEventsParams{ Sort: &sort, Filter: &filter, Q: &q, Offset: &offset, After: &after, Limit: &limit, Context: context.Background(), }, ) if err != nil { panic(falcon.ErrorExplain(err)) }
fmt.Printf("%+v\n", response.Payload)}import { FalconClient } from "crowdstrike-falcon";
const client = new FalconClient({ cloud: process.env.FALCON_CLOUD!, clientId: process.env.FALCON_CLIENT_ID!, clientSecret: process.env.FALCON_CLIENT_SECRET!,});
const response = await client.firewallManagement.queryEvents( "string", // sort "string", // filter "string", // q "string", // offset "string", // after integer // limit);
console.log(response);use rusty_falcon::apis::tailored_intelligence_api::query_events;use rusty_falcon::easy::client::FalconHandle;
#[tokio::main]async fn main() { let falcon = FalconHandle::from_env().await.expect("Could not authenticate");
let response = query_events( &falcon.cfg, // configuration Some("string"), // offset Some(integer), // limit Some("string"), // sort Some("string"), // filter Some("string"), // q ).await.expect("API call failed");
println!("{:?}", response);}require "crimson-falcon"
Falcon.configure do |config| config.client_id = ENV["FALCON_CLIENT_ID"] config.client_secret = ENV["FALCON_CLIENT_SECRET"] config.cloud = ENV["FALCON_CLOUD"]end
api = Falcon::FirewallManagement.new
response = api.query_events(sort: 'string', filter: 'string', q: 'string', offset: 'string', after: 'string', limit: integer)
puts responsequery_firewall_fields
Section titled “query_firewall_fields”Get the firewall field specification IDs for the provided platform
query_firewall_fieldsParameters
Section titled “Parameters”| Name | Type | Data type | Description |
|---|---|---|---|
| limit | query | integer | Maximum number of results to return. |
| offset | query | integer | The offset to start retrieving records from. Offset and After params are mutually exclusive. If none provided then scrolling will be used by default. To access more than 10k iocs, use the after parameter instead of offset. |
| parameters | query | dictionary | Full query string parameters payload in JSON format. |
| platform_id | query | string | Field configurations specific to this platform. |
Code Examples
Section titled “Code Examples”from falconpy import FirewallManagement
falcon = FirewallManagement(client_id=CLIENT_ID, client_secret=CLIENT_SECRET )
response = falcon.query_firewall_fields(platform_id="string", limit=integer, offset=integer)print(response)from falconpy import FirewallManagement
falcon = FirewallManagement(client_id=CLIENT_ID, client_secret=CLIENT_SECRET )
response = falcon.query_firewall_fields(platform_id="string", limit=integer, offset=integer)print(response)from falconpy import APIHarnessV2
falcon = APIHarnessV2(client_id=CLIENT_ID, client_secret=CLIENT_SECRET )
response = falcon.command("query_firewall_fields", platform_id="string", offset="string", limit=integer)print(response)Get-FalconFirewallField -Limit integer -Offset integerpackage main
import ( "context" "fmt" "os"
"github.com/crowdstrike/gofalcon/falcon" "github.com/crowdstrike/gofalcon/falcon/client/firewall_management")
func main() { client, err := falcon.NewClient(&falcon.ApiConfig{ ClientId: os.Getenv("FALCON_CLIENT_ID"), ClientSecret: os.Getenv("FALCON_CLIENT_SECRET"), Context: context.Background(), }) if err != nil { panic(err) }
platformID := "string" offset := "string" limit := int64(0)
response, err := client.FirewallManagement.QueryFirewallFields( &firewall_management.QueryFirewallFieldsParams{ PlatformID: &platformID, Offset: &offset, Limit: &limit, Context: context.Background(), }, ) if err != nil { panic(falcon.ErrorExplain(err)) }
fmt.Printf("%+v\n", response.Payload)}import { FalconClient } from "crowdstrike-falcon";
const client = new FalconClient({ cloud: process.env.FALCON_CLOUD!, clientId: process.env.FALCON_CLIENT_ID!, clientSecret: process.env.FALCON_CLIENT_SECRET!,});
const response = await client.firewallManagement.queryFirewallFields( "string", // platformId "string", // offset integer // limit);
console.log(response);use rusty_falcon::apis::firewall_management_api::query_firewall_fields;use rusty_falcon::easy::client::FalconHandle;
#[tokio::main]async fn main() { let falcon = FalconHandle::from_env().await.expect("Could not authenticate");
let response = query_firewall_fields( &falcon.cfg, // configuration Some("string"), // platform_id Some("string"), // offset Some(integer), // limit ).await.expect("API call failed");
println!("{:?}", response);}require "crimson-falcon"
Falcon.configure do |config| config.client_id = ENV["FALCON_CLIENT_ID"] config.client_secret = ENV["FALCON_CLIENT_SECRET"] config.cloud = ENV["FALCON_CLOUD"]end
api = Falcon::FirewallManagement.new
response = api.query_firewall_fields(platform_id: 'string', offset: 'string', limit: integer)
puts responsequery_network_locations
Section titled “query_network_locations”Get a list of network location IDs
query_network_locationsParameters
Section titled “Parameters”| Name | Type | Data type | Description |
|---|---|---|---|
| after | query | string | A pagination token used with the limit parameter to manage pagination of results. On your first request, don’t provide an after token. On subsequent requests, provide the after token from the previous response to continue from that place in the results. To access more than 10k indicators, use the after parameter instead of offset. |
| filter | query | string | FQL Syntax formatted filter that should be used to limit the results. |
| limit | query | integer | Maximum number of results to return. |
| offset | query | integer | The offset to start retrieving records from. Offset and After params are mutually exclusive. If none provided then scrolling will be used by default. To access more than 10k iocs, use the after parameter instead of offset. |
| parameters | query | dictionary | Full query string parameters payload in JSON format. |
| q | query | string | Free text search across all indexed fields. |
| sort | query | string | FQL Syntax formatted sort filter. |
Code Examples
Section titled “Code Examples”from falconpy import FirewallManagement
falcon = FirewallManagement(client_id=CLIENT_ID, client_secret=CLIENT_SECRET )
response = falcon.query_network_locations(after="string", filter="string", limit=integer, offset=integer, q="string", sort="string")print(response)from falconpy import FirewallManagement
falcon = FirewallManagement(client_id=CLIENT_ID, client_secret=CLIENT_SECRET )
response = falcon.query_network_locations(after="string", filter="string", limit=integer, offset=integer, q="string", sort="string")print(response)from falconpy import APIHarnessV2
falcon = APIHarnessV2(client_id=CLIENT_ID, client_secret=CLIENT_SECRET )
response = falcon.command("query_network_locations", sort="string", filter="string", q="string", offset="string", after="string", limit=integer)print(response)Get-FalconFirewallLocation -Filter "string" ` -Query "string" ` -Sort "string" ` -Limit integer ` -Offset "string"package main
import ( "context" "fmt" "os"
"github.com/crowdstrike/gofalcon/falcon" "github.com/crowdstrike/gofalcon/falcon/client/firewall_management")
func main() { client, err := falcon.NewClient(&falcon.ApiConfig{ ClientId: os.Getenv("FALCON_CLIENT_ID"), ClientSecret: os.Getenv("FALCON_CLIENT_SECRET"), Context: context.Background(), }) if err != nil { panic(err) }
sort := "string" filter := "string" q := "string" offset := "string" after := "string" limit := int64(0)
response, err := client.FirewallManagement.QueryNetworkLocations( &firewall_management.QueryNetworkLocationsParams{ Sort: &sort, Filter: &filter, Q: &q, Offset: &offset, After: &after, Limit: &limit, Context: context.Background(), }, ) if err != nil { panic(falcon.ErrorExplain(err)) }
fmt.Printf("%+v\n", response.Payload)}import { FalconClient } from "crowdstrike-falcon";
const client = new FalconClient({ cloud: process.env.FALCON_CLOUD!, clientId: process.env.FALCON_CLIENT_ID!, clientSecret: process.env.FALCON_CLIENT_SECRET!,});
const response = await client.firewallManagement.queryNetworkLocations( "string", // sort "string", // filter "string", // q "string", // offset "string", // after integer // limit);
console.log(response);use rusty_falcon::apis::firewall_management_api::query_network_locations;use rusty_falcon::easy::client::FalconHandle;
#[tokio::main]async fn main() { let falcon = FalconHandle::from_env().await.expect("Could not authenticate");
let response = query_network_locations( &falcon.cfg, // configuration Some("string"), // sort Some("string"), // filter Some("string"), // q Some("string"), // offset Some("string"), // after Some(integer), // limit ).await.expect("API call failed");
println!("{:?}", response);}require "crimson-falcon"
Falcon.configure do |config| config.client_id = ENV["FALCON_CLIENT_ID"] config.client_secret = ENV["FALCON_CLIENT_SECRET"] config.cloud = ENV["FALCON_CLOUD"]end
api = Falcon::FirewallManagement.new
response = api.query_network_locations(sort: 'string', filter: 'string', q: 'string', offset: 'string', after: 'string', limit: integer)
puts responsequery_platforms
Section titled “query_platforms”Get the list of platform names
query_platformsParameters
Section titled “Parameters”| Name | Type | Data type | Description |
|---|---|---|---|
| limit | query | integer | Maximum number of results to return. |
| offset | query | integer | The offset to start retrieving records from. Offset and After params are mutually exclusive. If none provided then scrolling will be used by default. To access more than 10k iocs, use the after parameter instead of offset. |
| parameters | query | dictionary | Full query string parameters payload in JSON format. |
Code Examples
Section titled “Code Examples”from falconpy import FirewallManagement
falcon = FirewallManagement(client_id=CLIENT_ID, client_secret=CLIENT_SECRET )
response = falcon.query_platforms(limit=integer, offset=integer)print(response)from falconpy import FirewallManagement
falcon = FirewallManagement(client_id=CLIENT_ID, client_secret=CLIENT_SECRET )
response = falcon.query_platforms(limit=integer, offset=integer)print(response)from falconpy import APIHarnessV2
falcon = APIHarnessV2(client_id=CLIENT_ID, client_secret=CLIENT_SECRET )
response = falcon.command("query_platforms", offset="string", limit=integer)print(response)Get-FalconFirewallPlatform -Limit integer -Offset integerpackage main
import ( "context" "fmt" "os"
"github.com/crowdstrike/gofalcon/falcon" "github.com/crowdstrike/gofalcon/falcon/client/firewall_management")
func main() { client, err := falcon.NewClient(&falcon.ApiConfig{ ClientId: os.Getenv("FALCON_CLIENT_ID"), ClientSecret: os.Getenv("FALCON_CLIENT_SECRET"), Context: context.Background(), }) if err != nil { panic(err) }
offset := "string" limit := int64(0)
response, err := client.FirewallManagement.QueryPlatforms( &firewall_management.QueryPlatformsParams{ Offset: &offset, Limit: &limit, Context: context.Background(), }, ) if err != nil { panic(falcon.ErrorExplain(err)) }
fmt.Printf("%+v\n", response.Payload)}import { FalconClient } from "crowdstrike-falcon";
const client = new FalconClient({ cloud: process.env.FALCON_CLOUD!, clientId: process.env.FALCON_CLIENT_ID!, clientSecret: process.env.FALCON_CLIENT_SECRET!,});
const response = await client.firewallManagement.queryPlatforms( "string", // offset integer // limit);
console.log(response);use rusty_falcon::apis::firewall_management_api::query_platforms;use rusty_falcon::easy::client::FalconHandle;
#[tokio::main]async fn main() { let falcon = FalconHandle::from_env().await.expect("Could not authenticate");
let response = query_platforms( &falcon.cfg, // configuration Some("string"), // offset Some(integer), // limit ).await.expect("API call failed");
println!("{:?}", response);}require "crimson-falcon"
Falcon.configure do |config| config.client_id = ENV["FALCON_CLIENT_ID"] config.client_secret = ENV["FALCON_CLIENT_SECRET"] config.cloud = ENV["FALCON_CLOUD"]end
api = Falcon::FirewallManagement.new
response = api.query_platforms(offset: 'string', limit: integer)
puts responsequery_policy_rules
Section titled “query_policy_rules”Find all firewall rule IDs matching the query with filter, and return them in precedence order
query_policy_rulesParameters
Section titled “Parameters”| Name | Type | Data type | Description |
|---|---|---|---|
| after | query | string | A pagination token used with the limit parameter to manage pagination of results. On your first request, don’t provide an after token. On subsequent requests, provide the after token from the previous response to continue from that place in the results. To access more than 10k indicators, use the after parameter instead of offset. |
| filter | query | string | FQL Syntax formatted filter that should be used to limit the results. |
| id | query | string | The ID of the policy container within which to query. |
| limit | query | integer | Maximum number of results to return. |
| offset | query | integer | The offset to start retrieving records from. Offset and After params are mutually exclusive. If none provided then scrolling will be used by default. To access more than 10k iocs, use the after parameter instead of offset. |
| parameters | query | dictionary | Full query string parameters payload in JSON format. |
| q | query | string | Free text search across all indexed fields. |
| sort | query | string | FQL Syntax formatted sort filter. |
Code Examples
Section titled “Code Examples”from falconpy import FirewallManagement
falcon = FirewallManagement(client_id=CLIENT_ID, client_secret=CLIENT_SECRET )
response = falcon.query_policy_rules(after="string", filter="string", limit=integer, offset=integer, q="string", sort="string")print(response)from falconpy import FirewallManagement
falcon = FirewallManagement(client_id=CLIENT_ID, client_secret=CLIENT_SECRET )
response = falcon.query_policy_rules(after="string", filter="string", limit=integer, offset=integer, q="string", sort="string")print(response)from falconpy import APIHarnessV2
falcon = APIHarnessV2(client_id=CLIENT_ID, client_secret=CLIENT_SECRET )
response = falcon.command("query_policy_rules", id="string", sort="string", filter="string", q="string", offset="string", limit=integer)print(response)Get-FalconFirewallRule -PolicyId "string" ` -Filter "string" ` -Query "string" ` -Sort "string" ` -Limit integer ` -Offset integerpackage main
import ( "context" "fmt" "os"
"github.com/crowdstrike/gofalcon/falcon" "github.com/crowdstrike/gofalcon/falcon/client/firewall_management")
func main() { client, err := falcon.NewClient(&falcon.ApiConfig{ ClientId: os.Getenv("FALCON_CLIENT_ID"), ClientSecret: os.Getenv("FALCON_CLIENT_SECRET"), Context: context.Background(), }) if err != nil { panic(err) }
iD := "string" sort := "string" filter := "string" q := "string" offset := "string" limit := int64(0)
response, err := client.FirewallManagement.QueryPolicyRules( &firewall_management.QueryPolicyRulesParams{ ID: &iD, Sort: &sort, Filter: &filter, Q: &q, Offset: &offset, Limit: &limit, Context: context.Background(), }, ) if err != nil { panic(falcon.ErrorExplain(err)) }
fmt.Printf("%+v\n", response.Payload)}import { FalconClient } from "crowdstrike-falcon";
const client = new FalconClient({ cloud: process.env.FALCON_CLOUD!, clientId: process.env.FALCON_CLIENT_ID!, clientSecret: process.env.FALCON_CLIENT_SECRET!,});
const response = await client.firewallManagement.queryPolicyRules( "string", // id "string", // sort "string", // filter "string", // q "string", // offset integer // limit);
console.log(response);use rusty_falcon::apis::firewall_management_api::query_policy_rules;use rusty_falcon::easy::client::FalconHandle;
#[tokio::main]async fn main() { let falcon = FalconHandle::from_env().await.expect("Could not authenticate");
let response = query_policy_rules( &falcon.cfg, // configuration Some("string"), // id Some("string"), // sort Some("string"), // filter Some("string"), // q Some("string"), // offset Some(integer), // limit ).await.expect("API call failed");
println!("{:?}", response);}require "crimson-falcon"
Falcon.configure do |config| config.client_id = ENV["FALCON_CLIENT_ID"] config.client_secret = ENV["FALCON_CLIENT_SECRET"] config.cloud = ENV["FALCON_CLOUD"]end
api = Falcon::FirewallManagement.new
response = api.query_policy_rules(id: 'string', sort: 'string', filter: 'string', q: 'string', offset: 'string', limit: integer)
puts responsequery_rule_groups
Section titled “query_rule_groups”Find all rule group IDs matching the query with filter
query_rule_groupsParameters
Section titled “Parameters”| Name | Type | Data type | Description |
|---|---|---|---|
| after | query | string | A pagination token used with the limit parameter to manage pagination of results. On your first request, don’t provide an after token. On subsequent requests, provide the after token from the previous response to continue from that place in the results. To access more than 10k indicators, use the after parameter instead of offset. |
| filter | query | string | FQL Syntax formatted filter that should be used to limit the results. |
| limit | query | integer | Maximum number of results to return. |
| offset | query | integer | The offset to start retrieving records from. Offset and After params are mutually exclusive. If none provided then scrolling will be used by default. To access more than 10k iocs, use the after parameter instead of offset. |
| parameters | query | dictionary | Full query string parameters payload in JSON format. |
| q | query | string | Free text search across all indexed fields. |
| sort | query | string | FQL Syntax formatted sort filter. |
Code Examples
Section titled “Code Examples”Examples coming soon.
Get-FalconFileVantageRuleGroup -Type "string" ` -Sort "string" ` -Limit integer ` -Offset integerpackage main
import ( "context" "fmt" "os"
"github.com/crowdstrike/gofalcon/falcon" "github.com/crowdstrike/gofalcon/falcon/client/filevantage")
func main() { client, err := falcon.NewClient(&falcon.ApiConfig{ ClientId: os.Getenv("FALCON_CLIENT_ID"), ClientSecret: os.Getenv("FALCON_CLIENT_SECRET"), Context: context.Background(), }) if err != nil { panic(err) }
offset := int64(0) limit := int64(0) sort := "string"
response, err := client.Filevantage.QueryRuleGroups( &filevantage.QueryRuleGroupsParams{ Offset: &offset, Limit: &limit, Sort: &sort, Type: "string", Context: context.Background(), }, ) if err != nil { panic(falcon.ErrorExplain(err)) }
fmt.Printf("%+v\n", response.Payload)}import { FalconClient } from "crowdstrike-falcon";
const client = new FalconClient({ cloud: process.env.FALCON_CLOUD!, clientId: process.env.FALCON_CLIENT_ID!, clientSecret: process.env.FALCON_CLIENT_SECRET!,});
const response = await client.filevantage.queryRuleGroups( "string", // type integer, // offset integer, // limit "string" // sort);
console.log(response);use rusty_falcon::apis::filevantage_api::query_rule_groups;use rusty_falcon::easy::client::FalconHandle;
#[tokio::main]async fn main() { let falcon = FalconHandle::from_env().await.expect("Could not authenticate");
let response = query_rule_groups( &falcon.cfg, // configuration Some(integer), // offset Some(integer), // limit Some("string"), // sort ).await.expect("API call failed");
println!("{:?}", response);}require "crimson-falcon"
Falcon.configure do |config| config.client_id = ENV["FALCON_CLIENT_ID"] config.client_secret = ENV["FALCON_CLIENT_SECRET"] config.cloud = ENV["FALCON_CLOUD"]end
api = Falcon::Filevantage.new
response = api.query_rule_groups('string')
puts responsequery_rules
Section titled “query_rules”Find all rule IDs matching the query with filter
query_rulesParameters
Section titled “Parameters”| Name | Type | Data type | Description |
|---|---|---|---|
| after | query | string | A pagination token used with the limit parameter to manage pagination of results. On your first request, don’t provide an after token. On subsequent requests, provide the after token from the previous response to continue from that place in the results. To access more than 10k indicators, use the after parameter instead of offset. |
| filter | query | string | FQL Syntax formatted filter that should be used to limit the results. |
| limit | query | integer | Maximum number of results to return. |
| offset | query | integer | The offset to start retrieving records from. Offset and After params are mutually exclusive. If none provided then scrolling will be used by default. To access more than 10k iocs, use the after parameter instead of offset. |
| parameters | query | dictionary | Full query string parameters payload in JSON format. |
| q | query | string | Free text search across all indexed fields. |
| sort | query | string | FQL Syntax formatted sort filter. |
Code Examples
Section titled “Code Examples”from falconpy import FirewallManagement
falcon = FirewallManagement(client_id=CLIENT_ID, client_secret=CLIENT_SECRET )
response = falcon.query_rules(after="string", filter="string", limit=integer, offset=integer, q="string", sort="string")print(response)from falconpy import FirewallManagement
falcon = FirewallManagement(client_id=CLIENT_ID, client_secret=CLIENT_SECRET )
response = falcon.query_rules(after="string", filter="string", limit=integer, offset=integer, q="string", sort="string")print(response)from falconpy import APIHarnessV2
falcon = APIHarnessV2(client_id=CLIENT_ID, client_secret=CLIENT_SECRET )
response = falcon.command("query_rules", sort="string", filter="string", q="string", offset="string", after="string", limit=integer)print(response)Get-FalconFirewallRule -Filter "string" ` -Query "string" ` -Sort "string" ` -Limit integer ` -Offset integerpackage main
import ( "context" "fmt" "os"
"github.com/crowdstrike/gofalcon/falcon" "github.com/crowdstrike/gofalcon/falcon/client/firewall_management")
func main() { client, err := falcon.NewClient(&falcon.ApiConfig{ ClientId: os.Getenv("FALCON_CLIENT_ID"), ClientSecret: os.Getenv("FALCON_CLIENT_SECRET"), Context: context.Background(), }) if err != nil { panic(err) }
sort := "string" filter := "string" q := "string" offset := "string" after := "string" limit := int64(0)
response, err := client.FirewallManagement.QueryRules( &firewall_management.QueryRulesParams{ Sort: &sort, Filter: &filter, Q: &q, Offset: &offset, After: &after, Limit: &limit, Context: context.Background(), }, ) if err != nil { panic(falcon.ErrorExplain(err)) }
fmt.Printf("%+v\n", response.Payload)}import { FalconClient } from "crowdstrike-falcon";
const client = new FalconClient({ cloud: process.env.FALCON_CLOUD!, clientId: process.env.FALCON_CLIENT_ID!, clientSecret: process.env.FALCON_CLIENT_SECRET!,});
const response = await client.firewallManagement.queryRules( "string", // sort "string", // filter "string", // q "string", // offset "string", // after integer // limit);
console.log(response);use rusty_falcon::apis::tailored_intelligence_api::query_rules;use rusty_falcon::easy::client::FalconHandle;
#[tokio::main]async fn main() { let falcon = FalconHandle::from_env().await.expect("Could not authenticate");
let response = query_rules( &falcon.cfg, // configuration Some("string"), // offset Some(integer), // limit Some("string"), // sort Some("string"), // filter Some("string"), // q ).await.expect("API call failed");
println!("{:?}", response);}require "crimson-falcon"
Falcon.configure do |config| config.client_id = ENV["FALCON_CLIENT_ID"] config.client_secret = ENV["FALCON_CLIENT_SECRET"] config.cloud = ENV["FALCON_CLOUD"]end
api = Falcon::FirewallManagement.new
response = api.query_rules(sort: 'string', filter: 'string', q: 'string', offset: 'string', after: 'string', limit: integer)
puts response