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
Copy file name to clipboardExpand all lines: api-docs/openapi.json
+58-1Lines changed: 58 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
{
2
2
"openapi": "3.0.2",
3
3
"info": {
4
-
"version": "2.5.3",
4
+
"version": "2.5.4",
5
5
"title": "CVE Services API",
6
6
"description": "The CVE Services API supports automation tooling for the CVE Program. Credentials are required for most service endpoints. Representatives of <a href='https://www.cve.org/ProgramOrganization/CNAs'>CVE Numbering Authorities (CNAs)</a> should use one of the methods below to obtain credentials: <ul><li>If your organization already has an Organizational Administrator (OA) account for the CVE Services, ask your admin for credentials</li> <li>Contact your Root (<a href='https://www.cve.org/PartnerInformation/ListofPartners/partner/Google'>Google</a>, <a href='https://www.cve.org/PartnerInformation/ListofPartners/partner/INCIBE'>INCIBE</a>, <a href='https://www.cve.org/PartnerInformation/ListofPartners/partner/jpcert'>JPCERT/CC</a>, or <a href='https://www.cve.org/PartnerInformation/ListofPartners/partner/redhat'>Red Hat</a>) or Top-Level Root (<a href='https://www.cve.org/PartnerInformation/ListofPartners/partner/icscert'>CISA ICS</a> or <a href='https://www.cve.org/PartnerInformation/ListofPartners/partner/mitre'>MITRE</a>) to request credentials </ul> <p>CVE data is to be in the JSON 5.1 CVE Record format. Details of the JSON 5.1 schema are located <a href='https://github.com/CVEProject/cve-schema/tree/v5.1.1-rc2/schema' target='_blank'>here</a>.</p> <a href='https://cveform.mitre.org/' class='link' target='_blank'>Contact the CVE Services team</a>",
7
7
"contact": {
@@ -1190,6 +1190,63 @@
1190
1190
}
1191
1191
}
1192
1192
},
1193
+
"/cve_count": {
1194
+
"get": {
1195
+
"tags": [
1196
+
"CVE Record"
1197
+
],
1198
+
"summary": "Retrieves the count of all the CVE Records after applying the query parameters as filters (accessible to all users)",
1199
+
"description": " <h2>Access Control</h2> <p>Endpoint is accessible to all</p> <h2>Expected Behavior</h2> <p>Retrieves the count of all CVE records for all organizations</p>",
1200
+
"operationId": "cveGetFilteredCount",
1201
+
"parameters": [
1202
+
{
1203
+
"$ref": "#/components/parameters/cveState"
1204
+
}
1205
+
],
1206
+
"responses": {
1207
+
"200": {
1208
+
"description": "A count of the total number of filtered CVE records",
let result = await userRepo.updateByUserNameAndOrgUUID(username, orgUUID, newUser)
714
-
if (result.n === 0) {
722
+
if (result.matchedCount === 0) {
715
723
logger.info({ uuid: req.ctx.uuid, message: 'The user could not be updated because ' + username + ' does not exist for ' + shortName + ' organization.' })
oldUser.secret = await argon2.hash(randomKey) // store in db
788
796
const user = await userRepo.updateByUserNameAndOrgUUID(oldUser.username, orgUUID, oldUser)
789
-
if (user.n === 0) {
797
+
if (user.matchedCount === 0) {
790
798
logger.info({ uuid: req.ctx.uuid, message: 'The user could not be updated because ' + username + ' does not exist for ' + orgShortName + ' organization.' })
0 commit comments