Skip to content

Latest commit

 

History

History
252 lines (169 loc) · 7.22 KB

File metadata and controls

252 lines (169 loc) · 7.22 KB

PDFGeneratorAPI\WorkspacesApi

All URIs are relative to https://us1.pdfgeneratorapi.com/api/v4, except if the operation defines another base path.

Method HTTP request Description
createWorkspace() POST /workspaces Create workspace
deleteWorkspace() DELETE /workspaces/{workspaceIdentifier} Delete workspace
getWorkspace() GET /workspaces/{workspaceIdentifier} Get workspace
getWorkspaces() GET /workspaces Get workspaces

createWorkspace()

createWorkspace($create_workspace_request): \PDFGeneratorAPI\Model\CreateWorkspace201Response

Create workspace

Creates a regular workspace with identifier specified in the request.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure Bearer (JWT) authorization: JSONWebTokenAuth
$config = PDFGeneratorAPI\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new PDFGeneratorAPI\Api\WorkspacesApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$create_workspace_request = new \PDFGeneratorAPI\Model\CreateWorkspaceRequest(); // \PDFGeneratorAPI\Model\CreateWorkspaceRequest

try {
    $result = $apiInstance->createWorkspace($create_workspace_request);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling WorkspacesApi->createWorkspace: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
create_workspace_request \PDFGeneratorAPI\Model\CreateWorkspaceRequest [optional]

Return type

\PDFGeneratorAPI\Model\CreateWorkspace201Response

Authorization

JSONWebTokenAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

deleteWorkspace()

deleteWorkspace($workspace_identifier)

Delete workspace

Delete workspace. Only regular workspaces can be deleted.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure Bearer (JWT) authorization: JSONWebTokenAuth
$config = PDFGeneratorAPI\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new PDFGeneratorAPI\Api\WorkspacesApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$workspace_identifier = demo.example@actualreports.com; // string | Workspace identifier

try {
    $apiInstance->deleteWorkspace($workspace_identifier);
} catch (Exception $e) {
    echo 'Exception when calling WorkspacesApi->deleteWorkspace: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
workspace_identifier string Workspace identifier

Return type

void (empty response body)

Authorization

JSONWebTokenAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getWorkspace()

getWorkspace($workspace_identifier): \PDFGeneratorAPI\Model\CreateWorkspace201Response

Get workspace

Returns workspace information for the workspace identifier specified in the request.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure Bearer (JWT) authorization: JSONWebTokenAuth
$config = PDFGeneratorAPI\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new PDFGeneratorAPI\Api\WorkspacesApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$workspace_identifier = demo.example@actualreports.com; // string | Workspace identifier

try {
    $result = $apiInstance->getWorkspace($workspace_identifier);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling WorkspacesApi->getWorkspace: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
workspace_identifier string Workspace identifier

Return type

\PDFGeneratorAPI\Model\CreateWorkspace201Response

Authorization

JSONWebTokenAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getWorkspaces()

getWorkspaces($page, $per_page): \PDFGeneratorAPI\Model\GetWorkspaces200Response

Get workspaces

Returns all workspaces in the organization

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure Bearer (JWT) authorization: JSONWebTokenAuth
$config = PDFGeneratorAPI\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new PDFGeneratorAPI\Api\WorkspacesApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$page = 1; // int | Pagination: page to return
$per_page = 20; // int | Pagination: How many records to return per page

try {
    $result = $apiInstance->getWorkspaces($page, $per_page);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling WorkspacesApi->getWorkspaces: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
page int Pagination: page to return [optional] [default to 1]
per_page int Pagination: How many records to return per page [optional] [default to 15]

Return type

\PDFGeneratorAPI\Model\GetWorkspaces200Response

Authorization

JSONWebTokenAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]