REST APIs for managing reports
- 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.
<?php
declare(strict_types=1);
require 'vendor/autoload.php';
use \Speakeasy\SpeakeasyClientSDK;
use \Speakeasy\SpeakeasyClientSDK\Models\Shared;
use \Speakeasy\SpeakeasyClientSDK\Models\Operations;
$security = new Shared\Security();
$security->apiKey = '<YOUR_API_KEY_HERE>';
$sdk = SpeakeasyClientSDK\SDK::builder()->setSecurity($security)->build();
try {
$request = new Operations\GetChangesReportSignedUrlRequest();
$request->documentChecksum = '<value>';;
$response = $sdk->reports->getChangesReportSignedUrl($request);
if ($response->signedAccess !== null) {
// handle response
}
} catch (Throwable $e) {
// handle exception
}
Parameter | Type | Required | Description |
---|---|---|---|
$request |
\Speakeasy\SpeakeasyClientSDK\Models\Operations\GetChangesReportSignedUrlRequest | ✔️ | The request object to use for the request. |
?\Speakeasy\SpeakeasyClientSDK\Models\Operations\GetChangesReportSignedUrlResponse
Get the signed access url for the linting reports for a particular document.
<?php
declare(strict_types=1);
require 'vendor/autoload.php';
use \Speakeasy\SpeakeasyClientSDK;
use \Speakeasy\SpeakeasyClientSDK\Models\Shared;
use \Speakeasy\SpeakeasyClientSDK\Models\Operations;
$security = new Shared\Security();
$security->apiKey = '<YOUR_API_KEY_HERE>';
$sdk = SpeakeasyClientSDK\SDK::builder()->setSecurity($security)->build();
try {
$request = new Operations\GetLintingReportSignedUrlRequest();
$request->documentChecksum = '<value>';;
$response = $sdk->reports->getLintingReportSignedUrl($request);
if ($response->signedAccess !== null) {
// handle response
}
} catch (Throwable $e) {
// handle exception
}
Parameter | Type | Required | Description |
---|---|---|---|
$request |
\Speakeasy\SpeakeasyClientSDK\Models\Operations\GetLintingReportSignedUrlRequest | ✔️ | The request object to use for the request. |
?\Speakeasy\SpeakeasyClientSDK\Models\Operations\GetLintingReportSignedUrlResponse
Upload a report.
<?php
declare(strict_types=1);
require 'vendor/autoload.php';
use \Speakeasy\SpeakeasyClientSDK;
use \Speakeasy\SpeakeasyClientSDK\Models\Shared;
use \Speakeasy\SpeakeasyClientSDK\Models\Operations;
$security = new Shared\Security();
$security->apiKey = '<YOUR_API_KEY_HERE>';
$sdk = SpeakeasyClientSDK\SDK::builder()->setSecurity($security)->build();
try {
$request = new Operations\UploadReportRequestBody();
$request->data = new Shared\Report();
$request->data->type = Shared\Type::Changes;
$request->file = new Operations\File();
$request->file->content = '0x329C0ad855';
$request->file->fileName = 'causal.shtml';;
$response = $sdk->reports->uploadReport($request);
if ($response->uploadedReport !== null) {
// handle response
}
} catch (Throwable $e) {
// handle exception
}
Parameter | Type | Required | Description |
---|---|---|---|
$request |
\Speakeasy\SpeakeasyClientSDK\Models\Operations\UploadReportRequestBody | ✔️ | The request object to use for the request. |
?\Speakeasy\SpeakeasyClientSDK\Models\Operations\UploadReportResponse