Skip to content

Feature/add workflow definitions delete#1456

Closed
gkazimiarovich wants to merge 2 commits into
CrowdStrike:mainfrom
gkazimiarovich:feature/add-workflow-definitions-delete
Closed

Feature/add workflow definitions delete#1456
gkazimiarovich wants to merge 2 commits into
CrowdStrike:mainfrom
gkazimiarovich:feature/add-workflow-definitions-delete

Conversation

@gkazimiarovich
Copy link
Copy Markdown

feat: Add WorkflowDefinitionsDelete endpoint

Add support for DELETE /workflows/entities/definitions/v1 which accepts a list of workflow definition IDs and deletes those definitions along with all their associated versions.

  • Added endpoint definition to _endpoint/_workflows.py

  • Added delete_definitions() method to Workflows service class

  • Added WorkflowDefinitionsDelete operation ID alias for backwards compatibility

  • Added unit test to tests/test_workflows.py

  • Enhancement

  • Documentation

Unit test coverage

Unit test added to tests/test_workflows.py following existing patterns.
Local execution requires CI credentials (test_authorization config).
Test validates WorkflowDefinitionsDelete returns an allowed status code (200/400/403/404).

Endpoint manually tested against live CrowdStrike API:
- DELETE /workflows/entities/definitions/v1?ids=5ce4fba2... → 200 (resources_affected: 1)
- Verified deletion via search_definitions → [] (confirmed removed)

Bandit analysis

[main]  INFO    running on Python 3.13.11
Run started:2026-04-29 19:03:25.722347+00:00

Test results:
        No issues identified.

Code scanned:
        Total lines of code: 1609
        Total lines skipped (#nosec): 0

Run metrics:
        Total issues (by severity):
                Undefined: 0
                Low: 0
                Medium: 0
                High: 0
        Total issues (by confidence):
                Undefined: 0
                Low: 0
                Medium: 0
                High: 0
Files skipped (0):

Added features and functionality

  • Added Workflows.delete_definitions() method — enables programmatic deletion of workflow definitions via DELETE /workflows/entities/definitions/v1
  • Added WorkflowDefinitionsDelete operation ID alias for Service Class and Uber Class usage

Issues resolved

  • No existing issue — this endpoint is present in the CrowdStrike Swagger specification but was missing from the FalconPy SDK (gap identified via automated spec-to-SDK comparison)

Other

  • Endpoint spec: DELETE /workflows/entities/definitions/v1, accepts ids query parameter (array, max 5000)
  • Follows existing SDK conventions: handle_single_argument, force_default, PascalCase alias
  • Validated against live CrowdStrike API — successfully deleted workflow definitions and confirmed removal

Add support for DELETE /workflows/entities/definitions/v1 which accepts
a list of workflow definition IDs and deletes those definitions along
with all their associated versions.

- Added endpoint definition to _endpoint/_workflows.py
- Added delete_definitions() method to Workflows service class
- Added WorkflowDefinitionsDelete operation ID alias for backwards
  compatibility
@jshcodes
Copy link
Copy Markdown
Member

Hi @gkazimiarovich!

Could you point this PR at the dev branch for us?

Thank you for your contribution! 🙇

@gkazimiarovich
Copy link
Copy Markdown
Author

Retargeting to dev branch

@gkazimiarovich
Copy link
Copy Markdown
Author

@jshcodes New PR 1467 targeting dev is open

Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants