You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The response will be a list of vulnerabilities that have the following CPEs.
159
+
160
+
161
+
API endpoints reference
162
+
--------------------------
41
163
42
164
There are two primary endpoints:
43
165
@@ -48,3 +170,83 @@ There are two primary endpoints:
48
170
And two secondary endpoints, used to query vulnerability aliases (such as CVEs)
49
171
and vulnerability by CPEs: cpes/ and aliases/
50
172
173
+
174
+
.. list-table:: Table for the main API endpoints
175
+
:widths: 30 40 30
176
+
:header-rows: 1
177
+
178
+
* - Endpoint
179
+
- Query Parameters
180
+
- Expected Output
181
+
* - ``/api/packages``
182
+
-
183
+
- ``purl`` (string) = package-url of the package
184
+
- ``type`` (string) = type of the package
185
+
- ``namespace`` (string) = namespace of the package
186
+
- ``name`` (string) = name of the package
187
+
- ``version`` (string) = version of the package
188
+
- ``qualifiers`` (string) = qualifiers of the package
189
+
- ``subpath`` (string) = subpath of the package
190
+
- ``page`` (integer) = page number of the response
191
+
- ``page_size`` (integer) = number of packages in each page
192
+
- Return a list of packages using a package-url (purl) or a combination of
193
+
type, namespace, name, version, qualifiers, subpath purl fields. See the
194
+
`purl specification <https://github.com/package-url/purl-spec>`_ for more details. See example at :ref:`Package Vulnerabilities Query` section for more details.
195
+
* - ``/api/packages/bulk_search``
196
+
- Refer to package bulk search section :ref:`Package Bulk Search`
197
+
- Return a list of packages
198
+
* - ``/api/vulnerabilities/``
199
+
-
200
+
- ``vulnerability_id`` (string) = VCID (VulnerableCode Identifier) of the vulnerability
201
+
- ``page`` (integer) = page number of the response
202
+
- ``page_size`` (integer) = number of vulnerabilities in each page
203
+
- Return a list of vulnerabilities
204
+
* - ``/api/cpes``
205
+
-
206
+
- ``cpe`` (string) = value of the cpe
207
+
- ``page`` (integer) = page number of the response
208
+
- ``page_size`` (integer) = number of cpes in each page
209
+
- Return a list of vulnerabilities
210
+
* - ``/api/cpes/bulk_search``
211
+
- Refer to CPE bulk search section :ref:`CPE Bulk Search`
212
+
- Return a list of cpes
213
+
* - ``/api/aliases``
214
+
-
215
+
- ``alias`` (string) = value of the alias
216
+
- ``page`` (integer) = page number of the response
217
+
- ``page_size`` (integer) = number of aliases in each page
218
+
- Return a list of vulnerabilities
219
+
220
+
.. list-table:: Table for other API endpoints
221
+
:widths: 30 40 30
222
+
:header-rows: 1
223
+
224
+
* - Endpoint
225
+
- Query Parameters
226
+
- Expected Output
227
+
* - ``/api/packages/{id}``
228
+
-
229
+
- ``id`` (integer) = internal primary id of the package
230
+
- Return a package with the given id
231
+
* - ``/api/packages/all``
232
+
- No parameter required
233
+
- Return a list of all vulnerable packages
234
+
* - ``/api/vulnerabilities/{id}``
235
+
-
236
+
- ``id`` (integer) = internal primary id of the vulnerability
237
+
- Return a vulnerability with the given id
238
+
* - ``/api/aliases/{id}``
239
+
-
240
+
- ``id`` (integer) = internal primary id of the alias
241
+
- Return an alias with the given id
242
+
* - ``/api/cpes/{id}``
243
+
-
244
+
- ``id`` = internal primary id of the cpe
245
+
- Return a cpe with the given id
246
+
247
+
Miscellaneous
248
+
----------------
249
+
250
+
The API is paginated and the default page size is 100. You can change the page size
251
+
by passing the ``page_size`` parameter. You can also change the page number by passing
0 commit comments