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
monitored-files
OK
monitored-files
OK
history
OK
scan-now
OK
enabled
OK
interval
OK
{id}
No Content
Manage Audit
List audit events
OK
Bad Request
Manage Configuration
Get application configuration
OK
Manage Cross Domain Transfers
Receive a full file as a single framed binary stream with manifest in headers
OK
Bad Request
Internal Server Error
Get global lowside configuration
OK
Not Found
Set global lowside configuration
OK
Bad Request
Disable global lowside configuration
OK
Not Found
Get global highside configuration
OK
Not Found
Set global highside configuration
OK
Bad Request
Disable global highside configuration
OK
Not Found
Get cross-domain operation logs
OK
Receive a lowside configuration change notification
OK
Bad Request
Get all cross-domain notifications
OK
Get a lowside configuration by storage ID
OK
Add a lowside configuration
OK
Bad Request
Update a lowside configuration by ID
OK
Not Found
Delete a lowside configuration by ID
OK
Not Found
Get a highside storage configuration by storage ID
OK
Add a highside configuration
OK
Bad Request
Update a highside configuration by ID
OK
Not Found
Delete a highside configuration by ID
OK
Not Found
Manage Dashboard
Get the dashboard summary and trends time-series
OK
Bad Request
Internal Server Error
Get top-risky repositories across all connections
OK
Bad Request
Internal Server Error
Manage Export
Export a CycloneDX report for repository
OK
Bad Request
Not Found
Export a CycloneDX report for a specific file scan
OK
Bad Request
Not Found
Export an SPDX report for a specific scan
OK
Bad Request
Not Found
Export an SPDX report for a specific file scan
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
Export a PDF SBOM report for a specific batch of files
OK
Bad Request
Not Found
Export a CSV report for repository
OK
Bad Request
Not Found
Export a CSV report for a specific batch of files
OK
Bad Request
Not Found
Export a CSV report of all CVEs from latest scans
OK
Bad Request
Export a CSV report of all packages from latest scans
OK
Bad Request
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
Start a Scan Now job over one or more targets (each target carries its own StorageId, so a single job may mix protocols)
OK
Multi-Status
Bad Request
List jobs (paginated, queryable by trigger type)
OK
Bulk delete jobs (trigger-agnostic)
OK
Bad Request
Start a Real-Time Protection job over one or more targets (each target carries its own StorageId)
OK
Multi-Status
Bad Request
Create a scheduled job with a recurrence pattern
OK
Multi-Status
Bad Request
Cancel a job (for RealTime jobs this disables RTP)
OK
Not Found
Get a single job by id
OK
Not Found
Activate a license online
OK
Bad Request
Activate a license offline
OK
Bad Request
Remove licenses
OK
Bad Request
Not Found
Get licenses
OK
Bad Request
Not Found
Get current deployment Id for offline license activation
OK
Bad Request
Manage Opswat Central Management Ocm
Update an OCM instance
OK
Delete an OCM instance
OK
Get an OCM instance
OK
Get onboarding
OK
Complete onboarding
OK
Agree to onboarding EULA
OK
Manage Packages
Retrieves a paginated, sortable list of packages
OK
Multi-Status
Unauthorized
Retrieves all versions of a specific package by its name and ecosystem
OK
Retrieves a package by its internal database ID
OK
Retrieves a package by its universal package UID
OK
Retrieves CVEs associated with a specific package
OK
Retrieves the ecosystem-specific upgrade command for a package
OK
Unauthorized
Not Found
Internal Server Error
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
Create a project
OK
Bad Request
List projects
OK
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
Add a scan configuration
OK
Bad Request
Bad Gateway
Get all scan configurations
OK
Bad Request
Not Found
Update a scan configuration
OK
Bad Request
Not Found
Delete a scan configuration
OK
Bad Request
Not Found
Get a scan configuration by ID
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
Delete a 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
Add a new scan pool
OK
Bad Request
Not Found
Get scan pools
OK
Bad Request
Not Found
Delete a 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
Get all rules from a scan pool
OK
Bad Request
Manage Scans
Add or start a scan
OK
Enumerate scan results
OK
Delete multiple scans by their scan IDs
OK
Bad Request
Internal Server Error
Upload and scan a file immediately
Uploads and scans files immediately. Optional 'jobName' labels the scan; if omitted, a name is generated automatically.
OK
Stop a scan
OK
Get scan results by scan ID
OK
Not Found
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
Get per-CVE new/fixed details for each trend period
OK
Internal Server Error
Manage Services Connections
Add a service
OK
Bad Request
Get all services
OK
Partial Content
Bad Request
Update a service by ID
OK
Bad Request
Get a service by ID
OK
Bad Request
Not Found
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 top-risky repositories for a service
OK
Internal Server Error
Get service references by service ID and repository ID
OK
Not Found
Add service references
OK
No Content
Not Found
Manage Settings
Add a SMTP configuration
OK
Bad Request
Partially update SMTP configuration
OK
Bad Request
Get a SMTP configuration
OK
Bad Request