Skip to content

Commit b9a6dfb

Browse files
committed
first commit
0 parents  commit b9a6dfb

File tree

1 file changed

+276
-0
lines changed

1 file changed

+276
-0
lines changed

README.md

Lines changed: 276 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,276 @@
1+
# openapi
2+
3+
Developer-friendly & type-safe Java SDK specifically catered to leverage *openapi* API.
4+
5+
<div align="left">
6+
<a href="https://www.speakeasy.com/?utm_source=openapi&utm_campaign=java"><img src="https://custom-icon-badges.demolab.com/badge/-Built%20By%20Speakeasy-212015?style=for-the-badge&logoColor=FBE331&logo=speakeasy&labelColor=545454" /></a>
7+
<a href="https://mit-license.org/">
8+
<img src="https://img.shields.io/badge/License-MIT-blue.svg" style="width: 100px; height: 28px;" />
9+
</a>
10+
</div>
11+
12+
13+
<br /><br />
14+
> [!IMPORTANT]
15+
> This SDK is not yet ready for production use. To complete setup please follow the steps outlined in your [workspace](https://app.speakeasy.com/org/vanta/vanta). Delete this section before > publishing to a package manager.
16+
17+
<!-- Start Summary [summary] -->
18+
## Summary
19+
20+
Conduct an audit: The Auditor API lets audit firms conduct audits from a tool outside of Vanta. Unlock data syncing with Vanta through this API.
21+
<!-- End Summary [summary] -->
22+
23+
<!-- Start Table of Contents [toc] -->
24+
## Table of Contents
25+
<!-- $toc-max-depth=2 -->
26+
* [openapi](#openapi)
27+
* [SDK Installation](#sdk-installation)
28+
* [SDK Example Usage](#sdk-example-usage)
29+
* [Authentication](#authentication)
30+
* [Available Resources and Operations](#available-resources-and-operations)
31+
* [Error Handling](#error-handling)
32+
* [Server Selection](#server-selection)
33+
* [Development](#development)
34+
* [Maturity](#maturity)
35+
* [Contributions](#contributions)
36+
37+
<!-- End Table of Contents [toc] -->
38+
39+
<!-- Start SDK Installation [installation] -->
40+
## SDK Installation
41+
42+
### Getting started
43+
44+
JDK 11 or later is required.
45+
46+
The samples below show how a published SDK artifact is used:
47+
48+
Gradle:
49+
```groovy
50+
implementation 'com.vanta:vanta-auditor-api:0.1.1'
51+
```
52+
53+
Maven:
54+
```xml
55+
<dependency>
56+
<groupId>com.vanta</groupId>
57+
<artifactId>vanta-auditor-api</artifactId>
58+
<version>0.1.1</version>
59+
</dependency>
60+
```
61+
62+
### How to build
63+
After cloning the git repository to your file system you can build the SDK artifact from source to the `build` directory by running `./gradlew build` on *nix systems or `gradlew.bat` on Windows systems.
64+
65+
If you wish to build from source and publish the SDK artifact to your local Maven repository (on your filesystem) then use the following command (after cloning the git repo locally):
66+
67+
On *nix:
68+
```bash
69+
./gradlew publishToMavenLocal -Pskip.signing
70+
```
71+
On Windows:
72+
```bash
73+
gradlew.bat publishToMavenLocal -Pskip.signing
74+
```
75+
<!-- End SDK Installation [installation] -->
76+
77+
<!-- Start SDK Example Usage [usage] -->
78+
## SDK Example Usage
79+
80+
### Example
81+
82+
```java
83+
package hello.world;
84+
85+
import com.vanta.vanta_auditor_api.Vanta;
86+
import com.vanta.vanta_auditor_api.models.operations.ListAuditsResponse;
87+
import java.lang.Exception;
88+
import java.time.OffsetDateTime;
89+
90+
public class Application {
91+
92+
public static void main(String[] args) throws Exception {
93+
94+
Vanta sdk = Vanta.builder()
95+
.bearerAuth("<YOUR_BEARER_TOKEN_HERE>")
96+
.build();
97+
98+
ListAuditsResponse res = sdk.audits().list()
99+
.pageSize(10)
100+
.pageCursor("<value>")
101+
.changedSinceDate(OffsetDateTime.parse("2025-04-22T08:39:55.981Z"))
102+
.call();
103+
104+
if (res.paginatedResponseAudit().isPresent()) {
105+
// handle response
106+
}
107+
}
108+
}
109+
```
110+
<!-- End SDK Example Usage [usage] -->
111+
112+
<!-- Start Authentication [security] -->
113+
## Authentication
114+
115+
### Per-Client Security Schemes
116+
117+
This SDK supports the following security scheme globally:
118+
119+
| Name | Type | Scheme |
120+
| ------------ | ---- | ----------- |
121+
| `bearerAuth` | http | HTTP Bearer |
122+
123+
To authenticate with the API the `bearerAuth` parameter must be set when initializing the SDK client instance. For example:
124+
```java
125+
package hello.world;
126+
127+
import com.vanta.vanta_auditor_api.Vanta;
128+
import com.vanta.vanta_auditor_api.models.operations.ListAuditsResponse;
129+
import java.lang.Exception;
130+
import java.time.OffsetDateTime;
131+
132+
public class Application {
133+
134+
public static void main(String[] args) throws Exception {
135+
136+
Vanta sdk = Vanta.builder()
137+
.bearerAuth("<YOUR_BEARER_TOKEN_HERE>")
138+
.build();
139+
140+
ListAuditsResponse res = sdk.audits().list()
141+
.pageSize(10)
142+
.pageCursor("<value>")
143+
.changedSinceDate(OffsetDateTime.parse("2025-04-22T08:39:55.981Z"))
144+
.call();
145+
146+
if (res.paginatedResponseAudit().isPresent()) {
147+
// handle response
148+
}
149+
}
150+
}
151+
```
152+
<!-- End Authentication [security] -->
153+
154+
<!-- Start Available Resources and Operations [operations] -->
155+
## Available Resources and Operations
156+
157+
<details open>
158+
<summary>Available methods</summary>
159+
160+
### [auditors()](docs/sdks/auditors/README.md)
161+
162+
* [create](docs/sdks/auditors/README.md#create) - Create an auditor
163+
164+
### [audits()](docs/sdks/audits/README.md)
165+
166+
* [list](docs/sdks/audits/README.md#list) - List audits
167+
* [listEvidenceUrls](docs/sdks/audits/README.md#listevidenceurls) - List audit evidence url
168+
* [listEvidence](docs/sdks/audits/README.md#listevidence) - List audit evidence
169+
* [listComments](docs/sdks/audits/README.md#listcomments) - List audit comments
170+
* [listControls](docs/sdks/audits/README.md#listcontrols) - List audit controls
171+
* [createCommentForEvidence](docs/sdks/audits/README.md#createcommentforevidence) - Create a comment for audit evidence
172+
* [updateEvidence](docs/sdks/audits/README.md#updateevidence) - Update audit evidence
173+
* [createCustomEvidenceRequest](docs/sdks/audits/README.md#createcustomevidencerequest) - Create a custom evidence request for an audit
174+
* [createCustomControl](docs/sdks/audits/README.md#createcustomcontrol) - Create a custom control for an audit
175+
176+
177+
</details>
178+
<!-- End Available Resources and Operations [operations] -->
179+
180+
<!-- Start Error Handling [errors] -->
181+
## Error Handling
182+
183+
Handling errors in this SDK should largely match your expectations. All operations return a response object or raise an exception.
184+
185+
By default, an API error will throw a `models/errors/APIException` exception. When custom error responses are specified for an operation, the SDK may also throw their associated exception. You can refer to respective *Errors* tables in SDK docs for more details on possible exception types for each operation. For example, the `list` method throws the following exceptions:
186+
187+
| Error Type | Status Code | Content Type |
188+
| -------------------------- | ----------- | ------------ |
189+
| models/errors/APIException | 4XX, 5XX | \*/\* |
190+
191+
### Example
192+
193+
```java
194+
package hello.world;
195+
196+
import com.vanta.vanta_auditor_api.Vanta;
197+
import com.vanta.vanta_auditor_api.models.operations.ListAuditsResponse;
198+
import java.lang.Exception;
199+
import java.time.OffsetDateTime;
200+
201+
public class Application {
202+
203+
public static void main(String[] args) throws Exception {
204+
205+
Vanta sdk = Vanta.builder()
206+
.bearerAuth("<YOUR_BEARER_TOKEN_HERE>")
207+
.build();
208+
209+
ListAuditsResponse res = sdk.audits().list()
210+
.pageSize(10)
211+
.pageCursor("<value>")
212+
.changedSinceDate(OffsetDateTime.parse("2025-04-22T08:39:55.981Z"))
213+
.call();
214+
215+
if (res.paginatedResponseAudit().isPresent()) {
216+
// handle response
217+
}
218+
}
219+
}
220+
```
221+
<!-- End Error Handling [errors] -->
222+
223+
<!-- Start Server Selection [server] -->
224+
## Server Selection
225+
226+
### Override Server URL Per-Client
227+
228+
The default server can also be overridden globally using the `.serverURL(String serverUrl)` builder method when initializing the SDK client instance. For example:
229+
```java
230+
package hello.world;
231+
232+
import com.vanta.vanta_auditor_api.Vanta;
233+
import com.vanta.vanta_auditor_api.models.operations.ListAuditsResponse;
234+
import java.lang.Exception;
235+
import java.time.OffsetDateTime;
236+
237+
public class Application {
238+
239+
public static void main(String[] args) throws Exception {
240+
241+
Vanta sdk = Vanta.builder()
242+
.serverURL("https://api.vanta.com/v1")
243+
.bearerAuth("<YOUR_BEARER_TOKEN_HERE>")
244+
.build();
245+
246+
ListAuditsResponse res = sdk.audits().list()
247+
.pageSize(10)
248+
.pageCursor("<value>")
249+
.changedSinceDate(OffsetDateTime.parse("2025-04-22T08:39:55.981Z"))
250+
.call();
251+
252+
if (res.paginatedResponseAudit().isPresent()) {
253+
// handle response
254+
}
255+
}
256+
}
257+
```
258+
<!-- End Server Selection [server] -->
259+
260+
<!-- Placeholder for Future Speakeasy SDK Sections -->
261+
262+
# Development
263+
264+
## Maturity
265+
266+
This SDK is in beta, and there may be breaking changes between versions without a major version update. Therefore, we recommend pinning usage
267+
to a specific package version. This way, you can install the same version each time without breaking changes unless you are intentionally
268+
looking for the latest version.
269+
270+
## Contributions
271+
272+
While we value open-source contributions to this SDK, this library is generated programmatically. Any manual changes added to internal files will be overwritten on the next generation.
273+
We look forward to hearing your feedback. Feel free to open a PR or an issue with a proof of concept and we'll do our best to include it in a future release.
274+
275+
### SDK Created by [Speakeasy](https://www.speakeasy.com/?utm_source=openapi&utm_campaign=java)
276+
# vanta-auditor-api-sdk-java

0 commit comments

Comments
 (0)