{% set api_set = ['cpe22', 'cpe23', 'cvefor', 'cve', 'cwe', 'capec', 'last', 'query', 'browse', 'search', 'link', 'dbInfo'] %} {% set api_admin_set = ['whitelist', 'blacklist', 'whitelist_export', 'blacklist_export', 'whitelist_import', 'blacklist_import', 'whitelist_drop', 'blacklist_drop', 'whitelist_add', 'blacklist_add', 'whitelist_remove', 'blacklist_remove', 'dbupdate'] %} {% set status_codes = ['success', 'skip_must_be_int', 'limit_must_be_int', 'authorization_method_not_allowed', 'malformed_authentication_string', 'authentication_needed', 'authentication_failed', 'not_found', 'unknown_content-type', 'internal_server_error', 'resource_unavailable'] %} API Documentation - CVE-Search

Authentication

Some API calls require authentication. These are colored yellow in the API Query list. Authentication is done in one of two ways:

  • basic <username>:<password> (Not recommended)
  • token <username>:<token>
  • session <username>:<session id> (Recommended)
Authentication is done by adding the following header to the HTTP request:
Authorization: basic user:password123
or
Authorization: token user:679c2955085b46e48155b84f4c878844
or
Authorization: session user:ea234b864515411d9d834e2bd561af98

PLEASE NOTE: Neither the password nor the token are obfuscated, so it is strongly advised to use HTTPS

Optional Headers

The following headers can be appended to any request:
  • Accept
  • Version
Accept
The Accept argument may contain one of two categories:
  • */json (*/* will default to text/json)
  • */plain
All the examples you see in this documentation are the output of the */plain choice.
The */json choice will incapsulate all output with a status code, of the format:
{'status': 'success', 'data': <output of */plain>}
Version
The version of the API call. For backwards compatibility, when the version is not specified, version 1.0 (legacy) will be used and only plain text output will be used. As of version 1.1, the Accept header will be taken into account.

Status Codes

{% for doc in status_codes %} {% include 'documentation/status_codes/'+doc%} {% endfor %}

API Queries

Back to Top