(reports())
REST APIs for managing reports (lint reports, change reports, etc)
- getChangesReportSignedUrl - Get the signed access url for the change reports for a particular document.
- getLintingReportSignedUrl - Get the signed access url for the linting reports for a particular document.
- uploadReport - Upload a report.
Get the signed access url for the change reports for a particular document.
package hello.world;
import dev.speakeasyapi.javaclientsdk.RyanTest;
import dev.speakeasyapi.javaclientsdk.models.operations.GetChangesReportSignedUrlRequest;
import dev.speakeasyapi.javaclientsdk.models.operations.GetChangesReportSignedUrlResponse;
import dev.speakeasyapi.javaclientsdk.models.shared.Security;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws Exception {
RyanTest sdk = RyanTest.builder()
.security(Security.builder()
.apiKey("<YOUR_API_KEY_HERE>")
.build())
.build();
GetChangesReportSignedUrlRequest req = GetChangesReportSignedUrlRequest.builder()
.documentChecksum("<value>")
.build();
GetChangesReportSignedUrlResponse res = sdk.reports().getChangesReportSignedUrl()
.request(req)
.call();
if (res.signedAccess().isPresent()) {
// handle response
}
}
}
Parameter | Type | Required | Description |
---|---|---|---|
request |
GetChangesReportSignedUrlRequest | ✔️ | The request object to use for the request. |
GetChangesReportSignedUrlResponse
Error Type | Status Code | Content Type |
---|---|---|
models/errors/SDKError | 4XX, 5XX | */* |
Get the signed access url for the linting reports for a particular document.
package hello.world;
import dev.speakeasyapi.javaclientsdk.RyanTest;
import dev.speakeasyapi.javaclientsdk.models.operations.GetLintingReportSignedUrlRequest;
import dev.speakeasyapi.javaclientsdk.models.operations.GetLintingReportSignedUrlResponse;
import dev.speakeasyapi.javaclientsdk.models.shared.Security;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws Exception {
RyanTest sdk = RyanTest.builder()
.security(Security.builder()
.apiKey("<YOUR_API_KEY_HERE>")
.build())
.build();
GetLintingReportSignedUrlRequest req = GetLintingReportSignedUrlRequest.builder()
.documentChecksum("<value>")
.build();
GetLintingReportSignedUrlResponse res = sdk.reports().getLintingReportSignedUrl()
.request(req)
.call();
if (res.signedAccess().isPresent()) {
// handle response
}
}
}
Parameter | Type | Required | Description |
---|---|---|---|
request |
GetLintingReportSignedUrlRequest | ✔️ | The request object to use for the request. |
GetLintingReportSignedUrlResponse
Error Type | Status Code | Content Type |
---|---|---|
models/errors/SDKError | 4XX, 5XX | */* |
Upload a report.
package hello.world;
import dev.speakeasyapi.javaclientsdk.RyanTest;
import dev.speakeasyapi.javaclientsdk.models.operations.File;
import dev.speakeasyapi.javaclientsdk.models.operations.UploadReportRequestBody;
import dev.speakeasyapi.javaclientsdk.models.operations.UploadReportResponse;
import dev.speakeasyapi.javaclientsdk.models.shared.Report;
import dev.speakeasyapi.javaclientsdk.models.shared.Security;
import java.lang.Exception;
import java.nio.charset.StandardCharsets;
public class Application {
public static void main(String[] args) throws Exception {
RyanTest sdk = RyanTest.builder()
.security(Security.builder()
.apiKey("<YOUR_API_KEY_HERE>")
.build())
.build();
UploadReportRequestBody req = UploadReportRequestBody.builder()
.data(Report.builder()
.build())
.file(File.builder()
.content("0xA2Ca85EFA5".getBytes(StandardCharsets.UTF_8))
.fileName("example.file")
.build())
.build();
UploadReportResponse res = sdk.reports().uploadReport()
.request(req)
.call();
if (res.uploadedReport().isPresent()) {
// handle response
}
}
}
Parameter | Type | Required | Description |
---|---|---|---|
request |
UploadReportRequestBody | ✔️ | The request object to use for the request. |
Error Type | Status Code | Content Type |
---|---|---|
models/errors/SDKError | 4XX, 5XX | */* |