# Rust API client for the European Vulnerability Database (EUVD)
This crate provides an async client for the [ENISA EUVD](https://euvd.enisa.europa.eu/homepage),
a database of known and exploited software vulnerabilities maintained by the European Union Agency
for Cybersecurity.
It supports filtering, lookups by ID, and more.
## Overview
This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project.
By using the [openapi-spec](https://openapis.org) from a remote server, you can easily generate
an API client.
- API version: 0.2.0
- Package version: 0.2.0
- Generator version: 7.13.0
- Build package: `org.openapitools.codegen.languages.RustClientCodegen`
The API is specified as [OpenAPI-file](api/api.yaml).
## Installation
Run the following Cargo command in your project directory:
```
cargo add euvd
```
Or add the following line to your Cargo.toml:
```
euvd = "0.2.0"
```
Alternatively, place the package in a directory named `euvd` within your project folder and add the following to [dependencies] in your Cargo.toml:
```
euvd = { path = "./euvd" }
```
## Example
Examples can be found in tests/integration.rs:
```
use euvd::apis::configuration::Configuration;
use euvd::apis::default_api;
async fn get_last_vulnerabilities() {
// Preparation
let config = Configuration::default();
let result = default_api::get_last_vulnerabilities(&config).await;
// Print result if successful
if let Ok(response) = &result {
println!("Response received:");
for vuln in response {
println!("• ID: {:?}, Description: {:?}", vuln.id, vuln.description);
}
}
// Asserts
assert!(result.is_ok(), "API call failed: {:?}", result.err());
}
```
## Documentation for API Endpoints
All URIs are relative to *https://euvdservices.enisa.europa.eu*
*DefaultApi* | [**get_advisory_by_id**](docs/DefaultApi.md#get_advisory_by_id) | **GET** /api/advisory | Show advisory by ID
*DefaultApi* | [**get_by_enisa_id**](docs/DefaultApi.md#get_by_enisa_id) | **GET** /api/enisaid | Show EUVD by ID
*DefaultApi* | [**get_critical_vulnerabilities**](docs/DefaultApi.md#get_critical_vulnerabilities) | **GET** /api/criticalvulnerabilities | Show latest critical vulnerabilities
*DefaultApi* | [**get_exploited_vulnerabilities**](docs/DefaultApi.md#get_exploited_vulnerabilities) | **GET** /api/exploitedvulnerabilities | Show latest exploited vulnerabilities
*DefaultApi* | [**get_last_vulnerabilities**](docs/DefaultApi.md#get_last_vulnerabilities) | **GET** /api/lastvulnerabilities | Show latest vulnerabilities
*DefaultApi* | [**get_vulnerability_by_id**](docs/DefaultApi.md#get_vulnerability_by_id) | **GET** /api/vulnerability | Show vulnerability by ID
*DefaultApi* | [**query_vulnerabilities**](docs/DefaultApi.md#query_vulnerabilities) | **GET** /api/vulnerabilities | Query vulnerabilities with flexible filters
## Documentation For Models
- [Advisory](docs/Advisory.md)
- [AdvisoryAdvisoryProductInner](docs/AdvisoryAdvisoryProductInner.md)
- [AdvisoryEnisaIdAdvisoriesInner](docs/AdvisoryEnisaIdAdvisoriesInner.md)
- [AdvisorySource](docs/AdvisorySource.md)
- [AdvisoryVulnerabilityAdvisoryInner](docs/AdvisoryVulnerabilityAdvisoryInner.md)
- [EnisaIdVulnerabilityEntry](docs/EnisaIdVulnerabilityEntry.md)
- [NestedProduct](docs/NestedProduct.md)
- [NestedVendor](docs/NestedVendor.md)
- [NestedVulnerability](docs/NestedVulnerability.md)
- [NestedVulnerabilityAllOfVulnerabilityProduct](docs/NestedVulnerabilityAllOfVulnerabilityProduct.md)
- [NestedVulnerabilityAllOfVulnerabilityVendor](docs/NestedVulnerabilityAllOfVulnerabilityVendor.md)
- [Vulnerabilities](docs/Vulnerabilities.md)
- [Vulnerability](docs/Vulnerability.md)
- [VulnerabilityAllOfEnisaIdProduct](docs/VulnerabilityAllOfEnisaIdProduct.md)
- [VulnerabilityAllOfEnisaIdVendor](docs/VulnerabilityAllOfEnisaIdVendor.md)
- [VulnerabilityAllOfProduct](docs/VulnerabilityAllOfProduct.md)
- [VulnerabilityBase](docs/VulnerabilityBase.md)
- [VulnerabilityWithComponents](docs/VulnerabilityWithComponents.md)
- [VulnerabilityWithRelations](docs/VulnerabilityWithRelations.md)
To get access to the crate's generated documentation, use:
```
cargo doc --open
```
## Contributing
Issues and pull requests are welcome. Please open an issue if you find a bug or have a feature request.
## License
Licensed under either of
- MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)
- Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)
## Author
* [seeseekey](https://seeseekey.net) ([GitHub](https://github.com/seeseekey))
## Resources
* https://github.com/seeseekey/euvd
* https://github.com/seeseekey/euvd/blob/main/CHANGELOG.md
* https://euvd.enisa.europa.eu/homepage
* https://euvd.enisa.europa.eu/apidoc