Connection and authentication options
Authenticates against the Checkmarx identity endpoint using the refresh token provided at construction time, and updates the client's Authorization header with the returned access token for all subsequent requests.
POST <authApiPath>
Path to the auth endpoint, relative to apiUrl.
Overrides the default apiPath since the auth endpoint lives outside the main API path.
Example: 'auth/realms/CxOne/protocol/openid-connect/token'
The auth response containing token_type and access_token
Creates a new report generation request.
POST /api/reports/v2
The report request payload
The report response containing the report ID
Downloads a generated report as a binary ArrayBuffer.
GET /api/reports/{reportId}
The report ID to download
The report content as an ArrayBuffer
Subscribes to a client event.
Returns a ProjectResource for a given project ID, providing access to project-level data and sub-resources.
The returned resource can be awaited directly to fetch project info, or chained to access nested resources.
The project ID
A chainable project resource
Fetches all projects accessible to the authenticated user.
GET /api/projects
Optionalparams: ProjectsParamsOptional filters: limit, offset, name, ids, tags
An object containing projects and pagination counts
Fetches the projects overview.
GET /api/projects-overview
Optionalparams: ProjectsOverviewParamsOptional filters: limit, offset, project-ids, tags, branch-name
An object containing projects overview items and pagination counts
Fetches all scans accessible to the authenticated user.
GET /api/scans
Optionalparams: ScansParamsOptional filters: project-id, project-name, branch, status, tags, limit, offset, from-date, to-date
An object containing scans and pagination counts
Fetches a scan summary for the given scan IDs.
GET /api/scan-summary
Optionalparams: ScanSummaryParamsOptional filters: scan-ids, include-queries, include-status-counters
An array of scan summaries
Main entry point for the Checkmarx On-Premise REST API client.
Example