Skip to content

Latest commit

 

History

History
433 lines (290 loc) · 11.9 KB

WorkspaceApi.md

File metadata and controls

433 lines (290 loc) · 11.9 KB

Yousign\Client\WorkspaceApi

All URIs are relative to https://api-sandbox.yousign.app/v3, except if the operation defines another base path.

Method HTTP request Description
deleteWorkspace() DELETE /workspaces/{workspaceId} Delete a Workspace
getWorkspaces() GET /workspaces List Workspaces
getWorkspacesDefault() GET /workspaces/default Get the default Workspace
getWorkspacesWorkspaceId() GET /workspaces/{workspaceId} Get a Workspace
markWorkspaceAsDefault() POST /workspaces/default Mark the given Workspace as default
patchWorkspacesWorkspaceId() PATCH /workspaces/{workspaceId} Update a Workspace
postWorkspace() POST /workspaces Create a Workspace

deleteWorkspace()

deleteWorkspace($workspace_id)

Delete a Workspace

Deletes a given Workspace and transfers everything that is attached to this Workspace to a another specified Workspace.

Example

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


// Configure Bearer authorization: bearerAuth
$config = Yousign\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Yousign\Client\Api\WorkspaceApi(
    // 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_id = 'workspace_id_example'; // string | Workspace Id

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

Parameters

Name Type Description Notes
workspace_id string Workspace Id

Return type

void (empty response body)

Authorization

bearerAuth

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($after, $limit): \Yousign\Client\Model\GetWorkspaces200Response

List Workspaces

Returns the list of all Workspaces within your Organization.

Example

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


// Configure Bearer authorization: bearerAuth
$config = Yousign\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Yousign\Client\Api\WorkspaceApi(
    // 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
);
$after = 'after_example'; // string | After cursor (pagination)
$limit = 10; // int | The limit of items count to retrieve.

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

Parameters

Name Type Description Notes
after string After cursor (pagination) [optional]
limit int The limit of items count to retrieve. [optional] [default to 10]

Return type

\Yousign\Client\Model\GetWorkspaces200Response

Authorization

bearerAuth

HTTP request headers

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

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

getWorkspacesDefault()

getWorkspacesDefault(): \Yousign\Client\Model\Workspace

Get the default Workspace

Retrieves the default Workspace.

Example

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


// Configure Bearer authorization: bearerAuth
$config = Yousign\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Yousign\Client\Api\WorkspaceApi(
    // 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
);

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

Parameters

This endpoint does not need any parameter.

Return type

\Yousign\Client\Model\Workspace

Authorization

bearerAuth

HTTP request headers

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

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

getWorkspacesWorkspaceId()

getWorkspacesWorkspaceId($workspace_id): \Yousign\Client\Model\Workspace

Get a Workspace

Retrieves a given Workspace.

Example

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


// Configure Bearer authorization: bearerAuth
$config = Yousign\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Yousign\Client\Api\WorkspaceApi(
    // 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_id = 'workspace_id_example'; // string | Workspace Id

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

Parameters

Name Type Description Notes
workspace_id string Workspace Id

Return type

\Yousign\Client\Model\Workspace

Authorization

bearerAuth

HTTP request headers

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

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

markWorkspaceAsDefault()

markWorkspaceAsDefault($mark_workspace_as_default)

Mark the given Workspace as default

Marks the given Workspace as default.

Example

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


// Configure Bearer authorization: bearerAuth
$config = Yousign\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Yousign\Client\Api\WorkspaceApi(
    // 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
);
$mark_workspace_as_default = new \Yousign\Client\Model\MarkWorkspaceAsDefault(); // \Yousign\Client\Model\MarkWorkspaceAsDefault

try {
    $apiInstance->markWorkspaceAsDefault($mark_workspace_as_default);
} catch (Exception $e) {
    echo 'Exception when calling WorkspaceApi->markWorkspaceAsDefault: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
mark_workspace_as_default \Yousign\Client\Model\MarkWorkspaceAsDefault [optional]

Return type

void (empty response body)

Authorization

bearerAuth

HTTP request headers

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

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

patchWorkspacesWorkspaceId()

patchWorkspacesWorkspaceId($workspace_id, $update_workspace): \Yousign\Client\Model\Workspace

Update a Workspace

Updates a given Workspace. Any parameters not provided are left unchanged.

Example

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


// Configure Bearer authorization: bearerAuth
$config = Yousign\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Yousign\Client\Api\WorkspaceApi(
    // 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_id = 'workspace_id_example'; // string | Workspace Id
$update_workspace = new \Yousign\Client\Model\UpdateWorkspace(); // \Yousign\Client\Model\UpdateWorkspace

try {
    $result = $apiInstance->patchWorkspacesWorkspaceId($workspace_id, $update_workspace);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling WorkspaceApi->patchWorkspacesWorkspaceId: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
workspace_id string Workspace Id
update_workspace \Yousign\Client\Model\UpdateWorkspace [optional]

Return type

\Yousign\Client\Model\Workspace

Authorization

bearerAuth

HTTP request headers

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

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

postWorkspace()

postWorkspace($create_workspace): \Yousign\Client\Model\Workspace

Create a Workspace

Creates a new Workspace in the organization.

Example

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


// Configure Bearer authorization: bearerAuth
$config = Yousign\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Yousign\Client\Api\WorkspaceApi(
    // 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 = new \Yousign\Client\Model\CreateWorkspace(); // \Yousign\Client\Model\CreateWorkspace

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

Parameters

Name Type Description Notes
create_workspace \Yousign\Client\Model\CreateWorkspace [optional]

Return type

\Yousign\Client\Model\Workspace

Authorization

bearerAuth

HTTP request headers

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

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