Skip to content

Latest commit

 

History

History
188 lines (133 loc) · 8.43 KB

File metadata and controls

188 lines (133 loc) · 8.43 KB

Reports

(reports())

Overview

REST APIs for managing reports (lint reports, change reports, etc)

Available Operations

getChangesReportSignedUrl

Get the signed access url for the change reports for a particular document.

Example Usage

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
        }
    }
}

Parameters

Parameter Type Required Description
request GetChangesReportSignedUrlRequest ✔️ The request object to use for the request.

Response

GetChangesReportSignedUrlResponse

Errors

Error Type Status Code Content Type
models/errors/SDKError 4XX, 5XX */*

getLintingReportSignedUrl

Get the signed access url for the linting reports for a particular document.

Example Usage

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
        }
    }
}

Parameters

Parameter Type Required Description
request GetLintingReportSignedUrlRequest ✔️ The request object to use for the request.

Response

GetLintingReportSignedUrlResponse

Errors

Error Type Status Code Content Type
models/errors/SDKError 4XX, 5XX */*

uploadReport

Upload a report.

Example Usage

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
        }
    }
}

Parameters

Parameter Type Required Description
request UploadReportRequestBody ✔️ The request object to use for the request.

Response

UploadReportResponse

Errors

Error Type Status Code Content Type
models/errors/SDKError 4XX, 5XX */*