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

Description

The request was handled correctly.

Description

The skip parameter in your query could not be parsed as an integer.

Description

The limit parameter in your query could not be parsed as an integer.

Description

The specified authentication method (in the Authorization header) is not allowed.
Allowed authorization methods are:
  • basic (user:password)
  • token (user:token)
  • session (user:session_key)

Description

The authentication string provided in the Authorization header could not be parsed correctly.
Check the "Authentication" section of the documentation.

Description

This request required authentication.

Description

Authentication failed because the credentials provided were incorrect.

Description

The url requested does not exist. You might need to check upper/lowercase, or revert back to the documentation.

Description

A content type was requested (in the Accept header) which is not one of the following:
  • json
  • plain
  • application/*
  • text/*
  • */*

Description

These errors get thrown when the server experienced an error it did not expect.
In case this happens, the server should print the error to the console.

Description

The browsing repository is currently not available.
This could be because Redis is not running, the link between CVE-Search and Redis cannot be established, or other reasons.

API Queries

Back to Top