Skip to content

Latest commit

 

History

History
172 lines (120 loc) · 7.34 KB

File metadata and controls

172 lines (120 loc) · 7.34 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

declare(strict_types=1);

require 'vendor/autoload.php';

use Speakeasy\SpeakeasyClientSDK;
use Speakeasy\SpeakeasyClientSDK\Models\Operations;
use Speakeasy\SpeakeasyClientSDK\Models\Shared;

$sdk = SpeakeasyClientSDK\SDK::builder()
    ->setSecurity(
        new Shared\Security(
            apiKey: '<YOUR_API_KEY_HERE>',
        )
    )
    ->build();

$request = new Operations\GetChangesReportSignedUrlRequest(
    documentChecksum: '<value>',
);

$response = $sdk->reports->getChangesReportSignedUrl(
    request: $request
);

if ($response->signedAccess !== null) {
    // handle response
}

Parameters

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

Response

?Operations\GetChangesReportSignedUrlResponse

Errors

Error Type Status Code Content Type
Errorors\SDKException 4XX, 5XX */*

getLintingReportSignedUrl

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

Example Usage

declare(strict_types=1);

require 'vendor/autoload.php';

use Speakeasy\SpeakeasyClientSDK;
use Speakeasy\SpeakeasyClientSDK\Models\Operations;
use Speakeasy\SpeakeasyClientSDK\Models\Shared;

$sdk = SpeakeasyClientSDK\SDK::builder()
    ->setSecurity(
        new Shared\Security(
            apiKey: '<YOUR_API_KEY_HERE>',
        )
    )
    ->build();

$request = new Operations\GetLintingReportSignedUrlRequest(
    documentChecksum: '<value>',
);

$response = $sdk->reports->getLintingReportSignedUrl(
    request: $request
);

if ($response->signedAccess !== null) {
    // handle response
}

Parameters

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

Response

?Operations\GetLintingReportSignedUrlResponse

Errors

Error Type Status Code Content Type
Errorors\SDKException 4XX, 5XX */*

uploadReport

Upload a report.

Example Usage

declare(strict_types=1);

require 'vendor/autoload.php';

use Speakeasy\SpeakeasyClientSDK;
use Speakeasy\SpeakeasyClientSDK\Models\Operations;
use Speakeasy\SpeakeasyClientSDK\Models\Shared;

$sdk = SpeakeasyClientSDK\SDK::builder()
    ->setSecurity(
        new Shared\Security(
            apiKey: '<YOUR_API_KEY_HERE>',
        )
    )
    ->build();

$request = new Operations\UploadReportRequestBody(
    data: new Shared\Report(),
    file: new Operations\File(
        content: '0xA2Ca85EFA5',
        fileName: 'example.file',
    ),
);

$response = $sdk->reports->uploadReport(
    request: $request
);

if ($response->uploadedReport !== null) {
    // handle response
}

Parameters

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

Response

?Operations\UploadReportResponse

Errors

Error Type Status Code Content Type
Errorors\SDKException 4XX, 5XX */*