Comments (5)
Hi @RoemIko -
Thank you for reporting this issue!
We have confirmed this issue as a bug, and have a fix ready for the 1.4.3
version. In the interim, here is a work around leveraging the Uber Class that should also accomplish what you are trying to do.
from os import listdir
from falconpy import APIHarnessV2
def import_workflows():
path_to_workflows_folder = "/home/REDACTED/workflows/
falcon_w = APIHarnessV2(client_id=CLIENT_ID,
client_secret=CLIENT_SECRET
)
for filename in listdir(path_to_workflows_folder):
if filename.endswith(".yaml") or filename.endswith(".yml"):
print(f'Importing {filename}')
with open(f'{path_to_workflows_folder + filename}', 'r') as yaml_file:
file_data = {"data_file": yaml_file.read(), "type": "application/x-yaml"}
workflow_response = falcon_w.command("WorkflowDefinitionsImport", files=file_data)
print(f'Workflow Response: {workflow_response}')
if workflow_response['status_code'] == 200:
print(f'Workflow {filename} imported successfully')
else:
print(f'Workflow {filename} failed to import')
from falconpy.
Hi @jshcodes,
Thank you for looking into it 🙏 , and many thanks for the workaround
from falconpy.
I have updated falconpy to 1.4.3 but now i receive an error 500 with "Keyword arguments are required to use this method." This happens when i use the initial code from the beginning of this thread
from falconpy.
Can we see your call to import_definition
? It still just includes the data_file argument?
from falconpy.
Yes it still includes the data_file argument
from os import listdir
def import_workflows():
path_to_workflows_folder = "/home/REDACTED/workflows/
falcon_w = Workflows(client_id=CLIENT_ID,
client_secret=CLIENT_SECRET
)
for filename in listdir(path_to_workflows_folder):
if filename.endswith(".yaml") or filename.endswith(".yml"):
print(f'Importing {filename}')
with open(f'{path_to_workflows_folder + filename}', 'r') as yaml_file:
workflow_response = falcon_w.import_definition(data_file=yaml_file)
print(f'Workflow Response: {workflow_response}')
if workflow_response['status_code'] == 200:
print(f'Workflow {filename} imported successfully')
else:
print(f'Workflow {filename} failed to import')
from falconpy.
Related Issues (20)
- [ BUG ] firewall management - update_rule_group - "version" should be renamed to "tracking" HOT 1
- [ BUG ] Removing the only firewall rule left within a rule group keeps asking for rule id array HOT 1
- [ BUG ] Host management - perform_action method missing two actions support
- [ REQUEST ] Information cannot be retrieved
- [ BUG ] ArchiveUploadV2 is not properly passing the password value to the formData payload
- [ BUG ] No FalconPy API for "sca" and "system-tray" policies. HOT 1
- [ BUG ] Boolean query string parameters are not being converted to lower case strings
- FalconPy - Error 403 for PerformActionV2 API Endpoint HOT 1
- Unable to retrieve incident comments
- cspm_registration.get_configuration_detection_ids_v2 limit is incorrect HOT 2
- getcspmscanschedule needs lowercase cloud names HOT 1
- Text/plain response can't be parsed, masking the response actual value HOT 3
- GetQueriesAlertsV2 Error in documentation HOT 1
- [ DOC ] GetCSPMAzureAccount parameter status filter is string has no list of allowed values. HOT 2
- Is there a way to create cloud-scopes/cloud-groups (UI) using the API HOT 1
- [ DOC ] FileVantage Documentation appears incorrect
- [ BUG ] Large file uploads using UploadSampleV3 fail depending on syntax used HOT 2
- [ BUG ] Uber Class command method keyword "action" collides with action parameter utilized by updatePolicyHostGroups operation.
- download_sensor.py / no error message when authentification failed
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from falconpy.