Examples of Registering, Updating, and Deleting Data with the API#
For preparation before running the samples (preparing a token, using jq, and so on) and the token type and API permission required for each sample, see "API Usage Examples".
Create Paste Server#
For details on paste servers, see "Paste Scan". For supported OSes, see "Supported Environments".
Specify the following parameters in the request body. For the command to obtain each parameter on each OS, see "Commands Required for the Create Paste Server API" below the table.
| Parameter | Description | Required |
|---|---|---|
| serverName | Name of the server to be registered | yes |
| osFamily | OS type | yes |
| osVersion | OS version | yes |
| kernelRelease | Kernel release. On Windows, specify the OS name (select it from Edition in the table below) |
yes |
| kernelVersion | Kernel version. Specify it for Windows and Debian | Debian: yes Windows: ー |
| pkgPasteText | Package list. On Windows, specify the list of applied KB numbers | ー |
| windowsPkgPasteText | Windows package list. Specify it only for Windows. Separate each package with a blank line (\n\n) |
ー |
Commands Required for the Create Paste Server API
| Info | Command |
|---|---|
| serverName | Name of the server to be registered |
| osFamily | windows |
| osVersion | "" (Specify an empty string) |
| kernelRelease | (Enter by selecting from Edition) |
| kernelVersion | $CurrentVersion = (Get-ItemProperty -Path "Registry::HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion"); @($CurrentVersion.CurrentMajorVersionNumber, $CurrentVersion.CurrentMinorVersionNumber, $CurrentVersion.CurrentBuildNumber, $CurrentVersion.UBR) -join '.' |
| pkgPasteText | (Get-Hotfix | Select-Object -Property HotFixID | % { If ($_ -match '(KB\d{6,7})') { $Matches[0] }}) -Join ',' |
| windowsPkgPasteText | Get-Package | Select-Object Name, Version, ProviderName, @{Name='Publisher';Expression={$_.Metadata['Publisher']}} | Format-List | Out-String -Width 1024 |
For windowsPkgPasteText, you can also add a blank line after the Get-Package result and then append the result of the following command. If you do, the vendor of software whose publisher (Publisher) Get-Package cannot retrieve is supplemented with the publisher from the registry.
Get-ItemProperty 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\*','HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*','HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\*' -ErrorAction SilentlyContinue | Select-Object DisplayName, Publisher | Format-List | Out-String -Width 1024
Edition (Click to expand/collapse)
| name |
|---|
| Windows 10 for 32-bit Systems |
| Windows 10 for x64-based Systems |
| Windows 10 Version 1511 for 32-bit Systems |
| Windows 10 Version 1511 for x64-based Systems |
| Windows 10 Version 1607 for 32-bit Systems |
| Windows 10 Version 1607 for HoloLens |
| Windows 10 Version 1607 for x64-based Systems |
| Windows 10 Version 1703 for 32-bit Systems |
| Windows 10 Version 1703 for x64-based Systems |
| Windows 10 Version 1709 for 32-bit Systems |
| Windows 10 Version 1709 for ARM64-based Systems |
| Windows 10 Version 1709 for x64-based Systems |
| Windows 10 Version 1803 for 32-bit Systems |
| Windows 10 Version 1803 for ARM64-based Systems |
| Windows 10 Version 1803 for x64-based Systems |
| Windows 10 Version 1809 for 32-bit Systems |
| Windows 10 Version 1809 for ARM64-based Systems |
| Windows 10 Version 1809 for HoloLens |
| Windows 10 Version 1809 for x64-based Systems |
| Windows 10 Version 1903 for 32-bit Systems |
| Windows 10 Version 1903 for ARM64-based Systems |
| Windows 10 Version 1903 for HoloLens |
| Windows 10 Version 1903 for x64-based Systems |
| Windows 10 Version 1909 for 32-bit Systems |
| Windows 10 Version 1909 for ARM64-based Systems |
| Windows 10 Version 1909 for x64-based Systems |
| Windows 10 Version 2004 for 32-bit Systems |
| Windows 10 Version 2004 for ARM64-based Systems |
| Windows 10 Version 2004 for HoloLens |
| Windows 10 Version 2004 for x64-based Systems |
| Windows 10 Version 20H2 for 32-bit Systems |
| Windows 10 Version 20H2 for ARM64-based Systems |
| Windows 10 Version 20H2 for x64-based Systems |
| Windows 10 Version 21H1 for 32-bit Systems |
| Windows 10 Version 21H1 for ARM64-based Systems |
| Windows 10 Version 21H1 for x64-based Systems |
| Windows 10 Version 21H2 for 32-bit Systems |
| Windows 10 Version 21H2 for ARM64-based Systems |
| Windows 10 Version 21H2 for x64-based Systems |
| Windows 10 Version 22H2 for 32-bit Systems |
| Windows 10 Version 22H2 for ARM64-based Systems |
| Windows 10 Version 22H2 for x64-based Systems |
| Windows 11 Version 21H2 for ARM64-based Systems |
| Windows 11 Version 21H2 for x64-based Systems |
| Windows 11 Version 22H2 for ARM64-based Systems |
| Windows 11 Version 22H2 for x64-based Systems |
| Windows 11 Version 23H2 for ARM64-based Systems |
| Windows 11 Version 23H2 for x64-based Systems |
| Windows 11 Version 24H2 for ARM64-based Systems |
| Windows 11 Version 24H2 for x64-based Systems |
| Windows 11 Version 25H2 for ARM64-based Systems |
| Windows 11 Version 25H2 for x64-based Systems |
| Windows 11 Version 26H1 for ARM64-based Systems |
| Windows 11 version 26H1 for x64-based Systems |
| Windows 11 version 26H1 for x64-based Systems - extra |
| Windows Server 2016 |
| Windows Server 2016 for x64-based Systems |
| Windows Server 2016 for x64-based Systems (Server Core installation) |
| Windows Server 2016 (Server Core installation) |
| Windows Server 2019 |
| Windows Server 2019 (Server Core installation) |
| Windows Server 2022 |
| Windows Server 2022, 23H2 Edition (Server Core installation) |
| Windows Server 2022 (Server Core installation) |
| Windows Server 2025 |
| Windows Server 2025 (Server Core installation) |
| Info | Command |
|---|---|
| serverName | Name of the server to be registered |
| osFamily | redhat |
| osVersion | sed -n 's/.*release \([0-9][0-9.]*\).*/\1/p' /etc/redhat-release |
| kernelRelease | uname -r |
| pkgPasteText if version is 7 |
rpm -qa --queryformat "%{NAME} %{EPOCHNUM} %{VERSION} %{RELEASE} %{ARCH} %{SOURCERPM}\n" |
| pkgPasteText if version >= 8 |
rpm -qa --queryformat "%{NAME} %{EPOCHNUM} %{VERSION} %{RELEASE} %{ARCH} %{SOURCERPM} %{MODULARITYLABEL}\n" |
| Info | Command |
|---|---|
| serverName | Name of the server to be registered |
| osFamily | amazon |
| osVersion | awk '{if ($0 ~ /Amazon Linux release (2022\|2023)/) print $4; else if ($0 ~ /Amazon Linux release 2/) printf("%s %s\n", $4, $5); else if ($0 ~ /Amazon Linux 2/) for (i=3; i<=NF; i++) printf("%s ", $i); else if (NF==5) print $5}' /etc/system-release |
| kernelRelease | uname -r |
| pkgPasteText if version is 2023 |
rpm -qa --queryformat "%{NAME} %{EPOCHNUM} %{VERSION} %{RELEASE} %{ARCH} %{SOURCERPM} %{MODULARITYLABEL}\n" |
| Info | Command |
|---|---|
| serverName | Name of the server to be registered |
| osFamily | debian |
| osVersion | cat /etc/debian_version |
| kernelRelease | uname -r |
| kernelVersion | dpkg-query -W -f="\${Version}\n" linux-image-$(uname -r) |
| pkgPasteText | dpkg-query -W -f="\${binary:Package},\${db:Status-Abbrev},\${Version},\${source:Package},\${source:Version}\n" |
| Info | Command |
|---|---|
| serverName | Name of the server to be registered |
| osFamily | ubuntu |
| osVersion | lsb_release -sr \| awk '{print $1}' |
| kernelRelease | uname -r |
| pkgPasteText | dpkg-query -W -f="\${binary:Package},\${db:Status-Abbrev},\${Version},\${source:Package},\${source:Version}\n" |
| Info | Command |
|---|---|
| serverName | Name of the server to be registered |
| osFamily | fedora |
| osVersion | awk '{print $3}' /etc/fedora-release |
| kernelRelease | uname -r |
| pkgPasteText if version >= 30 |
rpm -qa --queryformat "%{NAME} %{EPOCHNUM} %{VERSION} %{RELEASE} %{ARCH} %{SOURCERPM} %{MODULARITYLABEL}\n" |
| Info | Command |
|---|---|
| serverName | Name of the server to be registered |
| osFamily | alma |
| osVersion | awk '{print $3}' /etc/redhat-release |
| kernelRelease | uname -r |
| pkgPasteText if version >= 8 |
rpm -qa --queryformat "%{NAME} %{EPOCHNUM} %{VERSION} %{RELEASE} %{ARCH} %{SOURCERPM} %{MODULARITYLABEL}\n" |
| Info | Command |
|---|---|
| serverName | Name of the server to be registered |
| osFamily | rocky |
| osVersion | awk '{print $4}' /etc/redhat-release |
| kernelRelease | uname -r |
| pkgPasteText if version >= 8 |
rpm -qa --queryformat "%{NAME} %{EPOCHNUM} %{VERSION} %{RELEASE} %{ARCH} %{SOURCERPM} %{MODULARITYLABEL}\n" |
| Info | Command |
|---|---|
| serverName | Name of the server to be registered |
| osFamily | oracle |
| osVersion | awk '{print $5}' /etc/oracle-release |
| kernelRelease | uname -r |
| pkgPasteText if version is 7 |
rpm -qa --queryformat "%{NAME} %{EPOCHNUM} %{VERSION} %{RELEASE} %{ARCH} %{SOURCERPM}\n" |
| pkgPasteText if version >= 8 |
rpm -qa --queryformat "%{NAME} %{EPOCHNUM} %{VERSION} %{RELEASE} %{ARCH} %{SOURCERPM} %{MODULARITYLABEL}\n" |
| Info | Command |
|---|---|
| serverName | Name of the server to be registered |
| osFamily | ・opensuse ・opensuse.leap ・suse.linux.enterprise.server ・suse.linux.enterprise.desktop |
| osVersion | grep -oP '(?<=VERSION_ID=").+(?=")' /etc/os-release |
| kernelRelease | uname -r |
| pkgPasteText | rpm -qa --queryformat "%{NAME} %{EPOCHNUM} %{VERSION} %{RELEASE} %{ARCH} %{SOURCERPM}\n" |
| pkgPasteText if opensuse (other than Tumbleweed) |
rpm -qa --queryformat "%{NAME} %{EPOCH} %{VERSION} %{RELEASE} %{ARCH} %{SOURCERPM}\n" |
Registering an Ubuntu server#
$ curl -s -X POST 'https://rest.vuls.biz/v1/server/paste' \
-H 'Content-Type: application/json' \
-H 'accept: application/json' \
-H 'Authorization:xxxxxxxxxxxxx' \
-d '{
"serverName":"vuls-paste-server-ubuntu",
"osFamily":"ubuntu",
"kernelRelease":"5.15.133.1",
"osVersion":"22.04",
"pkgPasteText":"hostname,ii ,3.23ubuntu2,,3.23ubuntu2\n dpkg,ii ,1.21.1ubuntu2.3,,1.21.1ubuntu2.3\n grep,ii ,3.7-1build1,,3.7-1build1"
}'
Registering a Windows server#
$ curl -s -X POST 'https://rest.vuls.biz/v1/server/paste' \
-H 'Content-Type: application/json' \
-H 'accept: application/json' \
-H 'Authorization:xxxxxxxxxxxxx' \
-d '{
"serverName":"vuls-paste-server-windows",
"osFamily":"windows",
"osVersion": "",
"kernelRelease": "Windows Server 2022",
"kernelVersion":"10.0.20348.2461",
"pkgPasteText":"KB5036608,KB5012170,KB5015684,KB5037768,KB5014032,KB5020372",
"windowsPkgPasteText":"Name : Git\nVersion : 2.52.0\nProviderName : Programs\nPublisher : The Git Development Community\n\nName : 7-Zip 26.02 (x64)\nVersion : 26.02\nProviderName : Programs\nPublisher : Igor Pavlov\n\nName : draw.io 29.3.6\nVersion : 29.3.6\nProviderName : Programs\nPublisher : JGraph"
}'
Add Lockfile#
| Parameter | Description | Notes |
|---|---|---|
| serverID | ID of the server to add the lockfile to | How to get serverID |
| path | Path and filename of the lockfile | Supported lockfiles |
| fileContent | Content of the lockfile | Base64-encoded string also accepted |
curl -s -X POST -H 'Content-Type: application/json' -H 'accept: application/json' -H 'Authorization:xxxxxxxxxxxxx' 'https://rest.vuls.biz/v1/lockfile' -d '{ "serverID": 192730, "path": "/REST_API/go.mod", "fileContent": "module example.com/rest_api\n\ngo 1.21\n\nrequire (\n\tgithub.com/go-gitea/gitea v1.2.3\n\tgithub.com/gorilla/websocket v1.4.0\n\tgolang.org/x/crypto v0.0.0-20191119213627-4f8c1d86b1ba\n\tgopkg.in/yaml.v2 v2.2.4\n)\n"}'
If the registration succeeds, HTTP 200 and the information of the registered lockfile are returned. You can check the registered lockfile in "Applications" of the server details.
Vulnerabilities are detected at the next scan of the target server. To detect them immediately, run a manual scan (with the API, the server scan POST /v1/server/scan/{serverID}) (see Lockfile Paste Scan).
Register Private EOL#
This API registers EOL information for in-house products or commercial software not listed on the official endoflife.date, at the organization level. For an overview of the feature, see "Registering Private EOL Information".
Use an organization token (CSIRT plan or PSIRT plan). For the endpoints and required permissions, see "Organization API List".
Request Parameters (Create / Update)#
| Parameter | Type | Create (POST) | Update (PUT) | Description |
|---|---|---|---|---|
productName |
string | Required | Optional | Product name. Must be unique within the organization in combination with releaseCycle |
releaseCycle |
string | Required | Optional | Release cycle (version series). Example: 1.0 |
eolAt |
string | Required | Optional | EOL (end of standard support) date and time (RFC3339). If the software is already EOL but the date is unknown, specify 1970-01-01T00:00:00Z |
purlList |
array[string] | Optional | Optional | List of PURLs for matching (max 100). Specify without a version (example: pkg:generic/product-name) |
cpeList |
array[string] | Optional | Optional | List of CPE URIs for matching (max 100). Specify without a version (example: cpe:/a:vendor:product-name for applications, cpe:/o:vendor:product-name for OS) |
extendedSupportAt |
string | Optional | Optional | Extended support end date and time (RFC3339) |
extendedSupportAtNull |
boolean | ー | Optional | true resets extendedSupportAt to unset (NULL). true cannot be specified together with extendedSupportAt |
eolReason |
string | Optional | Optional | Reason / memo |
eolReasonNull |
boolean | ー | Optional | true resets eolReason to unset (NULL). true cannot be specified together with eolReason |
Get List (GET)#
$ curl -s -H 'accept: application/json' -H 'Authorization:xxxxxxxxxxxxx' 'https://rest.vuls.biz/v1/org/privateEndoflifeDates' | jq
# Filter by productName
$ curl -s -H 'accept: application/json' -H 'Authorization:xxxxxxxxxxxxx' 'https://rest.vuls.biz/v1/org/privateEndoflifeDates?filterProductName=my-internal-product' | jq
# Filter by releaseCycle
$ curl -s -H 'accept: application/json' -H 'Authorization:xxxxxxxxxxxxx' 'https://rest.vuls.biz/v1/org/privateEndoflifeDates?filterReleaseCycle=1.0' | jq
# Filter by both productName and releaseCycle
$ curl -s -H 'accept: application/json' -H 'Authorization:xxxxxxxxxxxxx' 'https://rest.vuls.biz/v1/org/privateEndoflifeDates?filterProductName=my-internal-product&filterReleaseCycle=1.0' | jq
Create (POST)#
$ curl -s -X POST 'https://rest.vuls.biz/v1/org/privateEndoflifeDate' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-H 'Authorization:xxxxxxxxxxxxx' \
-d '{
"productName": "my-internal-product",
"releaseCycle": "1.0",
"purlList": ["pkg:generic/my-internal-product"],
"cpeList": ["cpe:/a:my-company:my-internal-product"],
"eolAt": "2030-06-30T00:00:00Z",
"eolReason": "EOL policy for in-house products"
}' | jq
{
"id": 1,
"productName": "my-internal-product",
"releaseCycle": "1.0",
"purlList": ["pkg:generic/my-internal-product"],
"cpeList": ["cpe:/a:my-company:my-internal-product"],
"eolAt": "2030-06-30T00:00:00Z",
"eolReason": "EOL policy for in-house products",
"createdAt": "2026-06-03T00:00:00Z",
"updatedAt": "2026-06-03T00:00:00Z"
}
Update (PUT)#
Specify the ID of the record to update (the id from the Get List response) in the path.
Include only the fields to be updated in the request body (fields that are not included remain unchanged). Specify at least one updatable field.
$ curl -s -X PUT 'https://rest.vuls.biz/v1/org/privateEndoflifeDate/1' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-H 'Authorization:xxxxxxxxxxxxx' \
-d '{
"eolAt": "2031-06-30T00:00:00Z",
"eolReason": "Extended support"
}' | jq
Delete (DELETE)#
Specify the ID of the record to delete (the id from the Get List response) in the path.
$ curl -s -X DELETE 'https://rest.vuls.biz/v1/org/privateEndoflifeDate/1' \
-H 'Authorization:xxxxxxxxxxxxx'