Skip to content

Refactor sast_high_level_report example to use ScansODataAPI - #215

Open
cx-happy-yang wants to merge 1 commit into
masterfrom
refactor/replace-get-request-in-examples
Open

Refactor sast_high_level_report example to use ScansODataAPI#215
cx-happy-yang wants to merge 1 commit into
masterfrom
refactor/replace-get-request-in-examples

Conversation

@cx-happy-yang

Copy link
Copy Markdown
Contributor

Summary

  • Replace deleted CxODataApiSDK.HttpRequests.get_request import with ScansODataAPI from CxODataApiSDK
  • Add module-level _scans_api = ScansODataAPI() instance alongside the existing API instances
  • Replace both get_request(relative_url=url) calls with _scans_api.api_client.call_api(method="GET", url=f"{_scans_api.base_url}{url}").json().get("value"), consistent with all other ScansODataAPI methods

Test plan

  • Verify examples/CxSAST/sast_high_level_report.py imports without error
  • Run the script against a CxSAST instance to confirm scan listing and result expansion still work

🤖 Generated with Claude Code

Replace deleted CxODataApiSDK.HttpRequests.get_request with call_api
via a ScansODataAPI instance, consistent with the rest of the SDK.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

Logo
Checkmarx One – Scan Summary & Detailsd2f78730-0e7f-465a-979c-688be42bb748

Great job! No new security vulnerabilities introduced in this pull request

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.

1 participant