Skip to content

Latest commit

 

History

History
68 lines (50 loc) · 1.73 KB

File metadata and controls

68 lines (50 loc) · 1.73 KB

API

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.

Downloading the asset-manager connection configuration

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>"
}

Searching vulnerabilities

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).

Downloading a raw scan file

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.

TheHive webhook

VMC accepts TheHive webhook events on:

http://<vmc admin host>/api/v1/webhook/thehive

See Integration with TheHive — webhooks configuration for setup details.