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.
140
+
141
+
142
+
API endpoints reference
143
+
--------------------------
41
144
42
145
There are two primary endpoints:
43
146
@@ -48,3 +151,83 @@ There are two primary endpoints:
48
151
And two secondary endpoints, used to query vulnerability aliases (such as CVEs)
49
152
and vulnerability by CPEs: cpes/ and aliases/
50
153
154
+
155
+
.. list-table:: Table for the main API endpoints
156
+
:widths: 30 40 30
157
+
:header-rows: 1
158
+
159
+
* - Endpoint
160
+
- Query Parameters
161
+
- Expected Output
162
+
* - ``/api/packages``
163
+
-
164
+
- ``purl`` (string) = package-url of the package
165
+
- ``type`` (string) = type of the package
166
+
- ``namespace`` (string) = namespace of the package
167
+
- ``name`` (string) = name of the package
168
+
- ``version`` (string) = version of the package
169
+
- ``qualifiers`` (string) = qualifiers of the package
170
+
- ``subpath`` (string) = subpath of the package
171
+
- ``page`` (integer) = page number of the response
172
+
- ``page_size`` (integer) = number of packages in each page
173
+
- Return a list of packages using a package-url (purl) or a combination of
174
+
type, namespace, name, version, qualifiers, subpath purl fields. See the
175
+
`purl specification <https://github.com/package-url/purl-spec>`_ for more details. See example at :ref:`Package Vulnerabilities Query` section for more details.
176
+
* - ``/api/packages/bulk_search``
177
+
- Refer to package bulk search section :ref:`Package Bulk Search`
178
+
- Return a list of packages
179
+
* - ``/api/vulnerabilities/``
180
+
-
181
+
- ``vulnerability_id`` (string) = VCID (VulnerableCode Identifier) of the vulnerability
182
+
- ``page`` (integer) = page number of the response
183
+
- ``page_size`` (integer) = number of vulnerabilities in each page
184
+
- Return a list of vulnerabilities
185
+
* - ``/api/cpes``
186
+
-
187
+
- ``cpe`` (string) = value of the cpe
188
+
- ``page`` (integer) = page number of the response
189
+
- ``page_size`` (integer) = number of cpes in each page
190
+
- Return a list of vulnerabilities
191
+
* - ``/api/cpes/bulk_search``
192
+
- Refer to CPE bulk search section :ref:`CPE Bulk Search`
193
+
- Return a list of cpes
194
+
* - ``/api/aliases``
195
+
-
196
+
- ``alias`` (string) = value of the alias
197
+
- ``page`` (integer) = page number of the response
198
+
- ``page_size`` (integer) = number of aliases in each page
199
+
- Return a list of vulnerabilities
200
+
201
+
.. list-table:: Table for other API endpoints
202
+
:widths: 30 40 30
203
+
:header-rows: 1
204
+
205
+
* - Endpoint
206
+
- Query Parameters
207
+
- Expected Output
208
+
* - ``/api/packages/{id}``
209
+
-
210
+
- ``id`` (integer) = internal primary id of the package
211
+
- Return a package with the given id
212
+
* - ``/api/packages/all``
213
+
- No parameter required
214
+
- Return a list of all vulnerable packages
215
+
* - ``/api/vulnerabilities/{id}``
216
+
-
217
+
- ``id`` (integer) = internal primary id of the vulnerability
218
+
- Return a vulnerability with the given id
219
+
* - ``/api/aliases/{id}``
220
+
-
221
+
- ``id`` (integer) = internal primary id of the alias
222
+
- Return an alias with the given id
223
+
* - ``/api/cpes/{id}``
224
+
-
225
+
- ``id`` = internal primary id of the cpe
226
+
- Return a cpe with the given id
227
+
228
+
Miscellaneous
229
+
----------------
230
+
231
+
The API is paginated and the default page size is 100. You can change the page size
232
+
by passing the ``page_size`` parameter. You can also change the page number by passing
0 commit comments