Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolves #1050 Created new GET /cve_cursor endpoint that implements cursor pagination for getting CVE records #1108

Merged
merged 14 commits into from
Aug 10, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
136 changes: 135 additions & 1 deletion api-docs/openapi.json
Original file line number Diff line number Diff line change
@@ -904,6 +904,113 @@
}
}
},
"/cve_cursor": {
"get": {
"tags": [
"CVE Record"
],
"summary": "Retrieves all CVE Records after applying the query parameters as filters. Uses cursor pagination to paginate results (accessible to Secretariat)",
"description": " <h2>Access Control</h2> <p>User must belong to an organization with the <b>Secretariat</b> role</p> <h2>Expected Behavior</h2> <p><b>Secretariat:</b> Retrieves all CVE records for all organizations</p>",
"operationId": "cveGetFilteredCursor",
"parameters": [
{
"$ref": "#/components/parameters/cveRecordFilteredTimeModifiedLt"
},
{
"$ref": "#/components/parameters/cveRecordFilteredTimeModifiedGt"
},
{
"$ref": "#/components/parameters/cveState"
},
{
"$ref": "#/components/parameters/countOnly"
},
{
"$ref": "#/components/parameters/assignerShortName"
},
{
"$ref": "#/components/parameters/assigner"
},
{
"$ref": "#/components/parameters/cnaModified"
},
{
"$ref": "#/components/parameters/adpShortName"
},
{
"$ref": "#/components/parameters/nextPage"
},
{
"$ref": "#/components/parameters/previousPage"
},
{
"$ref": "#/components/parameters/limit"
}
],
"responses": {
"200": {
"description": "A filtered list of CVE Records, along with pagination fields if results span multiple pages of data",
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"$ref": "../schemas/cve/cursor-cve-records-response.json"
},
{
"$ref": "../schemas/cve/create-cve-record-rejection-response.json"
}
]
}
}
}
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"$ref": "../schemas/errors/bad-request.json"
}
}
}
},
"401": {
"description": "Unauthorized"
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "../schemas/errors/generic.json"
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"application/json": {
"schema": {
"$ref": "../schemas/errors/generic.json"
}
}
}
},
"500": {
"description": "Internal Server Error",
"content": {
"application/json": {
"schema": {
"$ref": "../schemas/errors/generic.json"
}
}
}
}
}
}
},
"/cve/{id}/cna": {
"post": {
"tags": [
@@ -2650,6 +2757,33 @@
"type": "boolean"
}
},
"nextPage": {
"in": "query",
"name": "next_page",
"description": "Key returned by a GET /cve_cursor call that must be used to get the next page of results in a subsequent call",
"required": false,
"schema": {
"type": "string"
}
},
"previousPage": {
"in": "query",
"name": "previous_page",
"description": "Key returned by a GET /cve_cursor call that must be used to get the previous page of results in a subsequent call",
"required": false,
"schema": {
"type": "string"
}
},
"limit": {
"in": "query",
"name": "limit",
"description": "CVE records to return per page. Must be between 1-500. ",
"required": false,
"schema": {
"type": "integer"
}
},
"cnaModified": {
"in": "query",
"name": "cna_modified",
@@ -2662,7 +2796,7 @@
"adpShortName": {
"in": "query",
"name": "adp_short_name",
"description": "Only get CVE records that have an adpContainer owned by this org and that has been modified/created within the set time_modified range. Requires at least one time_modified parameter set",
"description": "Only get CVE records that have an adpContainer owned by this org.",
"required": false,
"schema": {
"type": "string"
Loading