To enable integration with other tools, VMC exposes a REST API. Tokens used for authorisation are created in the admin panel — see Creation of API tokens.
This endpoint returns the configuration of an integrated asset-management source (Ralph).
curl -H 'Authorization: Token <token>' \
'http://<vmc admin host>/api/v1/assets-manager/config?name=<config name>'Sample response:
{
"name": "<config name>",
"schema": "http",
"host": "<ip address>",
"port": 80,
"username": "<login>",
"password": "<password>",
"insecure": false,
"enabled": true,
"tenant": "<tenant name>"
}Looks up vulnerabilities for a given IP address inside a tenant scope.
curl -H 'Authorization: Token <token>' \
'http://<vmc admin host>/api/v1/vulnerabilities?tenant=<tenant>&ip_address=<ip>'The response is a list of vulnerability documents (see Vulnerability Collector for the document schema).
Returns the original scanner report (XML) for the scan referenced by its file ID (64-character SHA-256 hex).
curl -H 'Authorization: Token <token>' -o scan.xml \
'http://<vmc admin host>/api/v1/scans/backups/<scan_file_id>'The <scan_file_id> is taken from scan_file_url in the vulnerability
document.
VMC accepts TheHive webhook events on:
http://<vmc admin host>/api/v1/webhook/thehive
See Integration with TheHive — webhooks configuration for setup details.