Authentication
This section of the user guide describes how you can programmatically interact with the MetaDefender Software Supply Chain REST API. Below are some common tasks that can be done using the available REST APIs:
- Authenticate to obtain a JSON Web Token(JWT)
- Start or stop a process(scan)
- Add / remove service units
About this REST API
The exposed endpoint is located by default at http(s)://mdssc-server/api/ (for example, the authentication endpoint is available at http(s)://mdssc-server/api/user/authenticate). All requests are handled by the NGINX web server before being proxied to the backend API Gateway service.
All endpoints perform authentication and authorization checks. For these checks to succeed, a valid token should be presented in the Authorization header in the form of Bearer
Please note that all issued tokens have a timestamp and signature associated in order to prevent long-term usage without re - authentication. The lifespan of the token is currently set to 60 minutes, meaning you will have to request a new token before it expires in order to avoid error responses.
Useful links
Manage Audit
List audit events
OK
Bad Request
Export a CycloneDX report for repository
OK
Bad Request
Not Found
Export an SPDX v3 report for repository
OK
Bad Request
Not Found
Export a PDF report for all scans
OK
Bad Request
Not Found
Export a PDF overview report for repository
OK
Bad Request
Not Found
Export a PDF SBOM report for repository
OK
Bad Request
Not Found
Get all external loggers
OK
Add an external logger
OK
Update an external logger
OK
Delete an external logger
OK
Returns all global label keys
OK
Adds a new global label key
OK
Updates an global label key
OK
Deletes an global label key
OK
Manage Licenses
Activate an online license
OK
Bad Request
Get licenses
OK
Bad Request
Not Found
Remove licenses
OK
Bad Request
Not Found
Manage Opswat Central Management Ocm
Get an OCM instance
OK
Update an OCM instance
OK
Delete an OCM instance
OK
Retrieves a list of packages based on search criteria
OK
Retrieves all versions of a specific package by its name and ecosystem
OK
Retrieves a package by ID
OK
Retrieves CVEs associated with a specific package
OK
Retrieves all labels for a specific package
OK
Adds a label to a package
OK
Updates a label in a package
OK
Deletes a label from a package
OK
Searches for packages by label key and optionally value
OK
Manage Projects
List projects
OK
Create a project
OK
Bad Request
Get a project by ID
OK
Not Found
Update a project
OK
Not Found
Delete a project
OK
Not Found
Attach workflows to a project
OK
Not Found
Detach workflows from a project
OK
Not Found
Attach connections (services) to a project
OK
Not Found
Detach connections (services) from a project
OK
Not Found
Manage Real-time Protection
Enable real-time protection for multiple repositories
Multi-Status
Bad Request
Conflict
Disable real-time protection for connection
OK
Disable real-time protection for repository
OK
List connections with real-time protection enabled
OK
List ongoing real-time protection scans for connection
OK
Delete real-time scan protection for connection
OK
Delete real-time scan protection for repository
OK
Get all scan configurations
OK
Bad Request
Not Found
Add a scan configuration
OK
Bad Request
Bad Gateway
Get a scan configuration by ID
OK
Bad Request
Not Found
Update a scan configuration
OK
Bad Request
Not Found
Delete a scan configuration
OK
Bad Request
Not Found
Get all scan configurations by scan pool ID
OK
Bad Request
Add a new scan instance
OK
Bad Request
Not Found
Get a scan instance by ID
OK
Bad Request
Not Found
Update a scan instance
OK
Bad Request
Not Found
Delete a scan instance
OK
Bad Request
Not Found
Get scan pools
OK
Bad Request
Not Found
Add a new scan pool
OK
Bad Request
Not Found
Get a scan pool by ID
OK
Bad Request
Not Found
Update an existing scan pool
OK
Bad Request
Not Found
Delete a scan pool
OK
Bad Request
Not Found
Get all rules from a scan pool
OK
Bad Request
Manage Scans
Enumerate scan results
OK
Add or start a scan
OK
Delete multiple scans by their scan IDs
OK
Bad Request
Internal Server Error
Get scan results by scan ID
OK
Not Found
Stop a scan
OK
Enumerate all latest scan results
OK
Not Found
Enumerate all latest scan results by service ID
OK
Get scan overview by scan ID
OK
Enumerate all scan results by repository ID
OK
Enumerate all scan schedules
OK
Clean up historical scan results older than the specified time frame
OK
Multi-Status
Bad Request
Internal Server Error
Enumerate files by scan ID
OK
Not Found
Get the core result of a file by its scan result ID
OK
Get the core results of files in an archive by their scan result ID
OK
Manage Services Connections
Get all services
OK
Partial Content
Bad Request
Add a service
OK
Bad Request
Get a service by ID
OK
Bad Request
Not Found
Update a service by ID
OK
Bad Request
Delete a service by ID
OK
Not Found
Get service references by service ID
OK
Not Found
Get service resources by service ID
OK
Not Found
Get service references by service ID and repository ID
OK
Not Found
Add service references
OK
No Content
Not Found
Get a SMTP configuration
OK
Bad Request
Update a SMTP configuration
OK
Bad Request
Get all Jira configurations
OK
Bad Request
Add a Jira configuration
OK
Bad Request
Get a Jira configuration by ID
OK
Not Found
Update a Jira configuration by ID
OK
Not Found
Delete a Jira configuration by ID
OK
Not Found
Get Jira projects
OK
Not Found
Get all Teams configurations
OK
Bad Request
Add a Teams configuration
Created
Bad Request
Get a Teams configuration by ID
OK
Not Found
Update a Teams configuration by ID
OK
Not Found
Delete a Teams configuration by ID
OK
Not Found
Get users
OK
Bad Request
Update a user
OK
Bad Request
Add a new user
OK
Bad Request
Get current user
OK
Bad Request
Delete a user
OK
Bad Request
Login user
OK
Bad Request
Remove all tokens for an user
OK
Bad Request
Get a new Access Token
OK
Bad Request
Request a password reset
OK
Reset a user password
OK
Manage Versions
Get application version
OK
Get application version
OK
Handles a scan event triggered by a webhook. Requires a custom header and a body.
OK
Bad Request
Internal Server Error
Handles a scan event triggered by a webhook. Requires a custom body.
OK
Bad Request
Internal Server Error
List all workflows
OK
Create a workflow
OK
Bad Request
Get a workflow by ID
OK
Update a workflow
OK
Bad Request
Delete a workflow by ID
OK
Bad Request
Update a workflow scan source
OK
Bad Request
List all workflows by repository ID
OK
