-
Notifications
You must be signed in to change notification settings - Fork 1
API
Pajexali edited this page Jul 17, 2022
·
2 revisions
Once a handle is established, CVE services may be requested on behalf of the active user by calling the apppropriate API methods.
Each method returns a Promise resolving to the API return value upon success.
client.getCveIds()
.then(ids => console.log(ids));await client.updateCveId('CVE-ABCD-EFGH', {...schema});client.reserveCveIds({
amount: 100,
cve_year: 2021,
short_name: "my_org_name",
batch_type: "sequential"
})
.then(res => console.log(res));Reserves a CVE ID for the current year (as determined by the browser local time).
await client.reserveCveId();Alternatively, the caller may specify the year in which to reserve.
await client.reserveCveId(2012);Reserve a number of sequential IDs for a given year.
await client.reserveSeqCveIds(12, 2006);Reserve a number of sequential IDs for the current year.
await client.reserveSeqCveIds(99);Reserve a number of sequential IDs for a given year.
await client.reserveNonSeqCveIds(12, 2009);Reserve a number of nonsequential IDs for the current year.
await client.reserveNonSeqCveIds(27182818284);client.getCveId("2021-2222-1111")
.then(cve => console.log(cve));await client.getCves();await client.getCve();await client.updateCve('CVE-ABCD-EFGH', schema);await client.createCve('CVE-ABCD-EFGH', {...schema});await client.createRejectCve('CVE-ABCD-EFGH', {...schema});await client.updateRejectCve('CVE-ABCD-EFGH', {...schema});await client.getOrgInfo()
.then(org => console.log(org));await client.updateOrgInfo({...orgInfo});await client.createOrgUser({...userInfo});await client.updateOrgUser('username', {...newUserInfo});await client.getOrgUsers()
.then(users => console.log(users));await client.getOrgIdQuota()
.then(quota => console.log(quota));await client.getOrgUser("user1")
.then(user => console.log(user));