Skip to content

Latest commit

 

History

History
438 lines (299 loc) · 13.8 KB

DocumentsApi.md

File metadata and controls

438 lines (299 loc) · 13.8 KB

Spinen\ConnectWise\Clients\System\DocumentsApi

Spinen's PHP ConnectWise Client for System API generated by Swagger Code Generator.

All URIs are relative to https://api-na.myconnectwise.net/v4_6_release/apis/3.0

Method HTTP request Description
systemDocumentsCountGet GET /system/documents/count
systemDocumentsGet GET /system/documents
systemDocumentsIdDelete DELETE /system/documents/{id}
systemDocumentsIdDownloadGet GET /system/documents/{id}/download
systemDocumentsIdGet GET /system/documents/{id}
systemDocumentsIdPost POST /system/documents/{id}
systemDocumentsPost POST /system/documents
systemDocumentsUploadsampleGet GET /system/documents/uploadsample

systemDocumentsCountGet

\Spinen\ConnectWise\Clients\System\Model\Count systemDocumentsCountGet($record_type, $record_id)

Get Documents Info Count

Example

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

// Configure HTTP basic authorization: BasicAuth
Spinen\ConnectWise\Clients\System\Configuration::getDefaultConfiguration()->setUsername('YOUR_USERNAME');
Spinen\ConnectWise\Clients\System\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD');

$api_instance = new Spinen\ConnectWise\Clients\System\Api\DocumentsApi();
$record_type = "record_type_example"; // string | 
$record_id = 56; // int | 

try {
    $result = $api_instance->systemDocumentsCountGet($record_type, $record_id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DocumentsApi->systemDocumentsCountGet: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
record_type string [optional]
record_id int [optional]

Return type

\Spinen\ConnectWise\Clients\System\Model\Count

Authorization

BasicAuth

HTTP request headers

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

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

systemDocumentsGet

\Spinen\ConnectWise\Clients\System\Model\DocumentInfo[] systemDocumentsGet($record_type, $record_id, $page, $page_size)

Get Documents Info

Example

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

// Configure HTTP basic authorization: BasicAuth
Spinen\ConnectWise\Clients\System\Configuration::getDefaultConfiguration()->setUsername('YOUR_USERNAME');
Spinen\ConnectWise\Clients\System\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD');

$api_instance = new Spinen\ConnectWise\Clients\System\Api\DocumentsApi();
$record_type = "record_type_example"; // string | 
$record_id = 56; // int | 
$page = 56; // int | 
$page_size = 56; // int | 

try {
    $result = $api_instance->systemDocumentsGet($record_type, $record_id, $page, $page_size);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DocumentsApi->systemDocumentsGet: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
record_type string [optional]
record_id int [optional]
page int [optional]
page_size int [optional]

Return type

\Spinen\ConnectWise\Clients\System\Model\DocumentInfo[]

Authorization

BasicAuth

HTTP request headers

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

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

systemDocumentsIdDelete

systemDocumentsIdDelete($id)

Delete Document Info By Id

Example

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

// Configure HTTP basic authorization: BasicAuth
Spinen\ConnectWise\Clients\System\Configuration::getDefaultConfiguration()->setUsername('YOUR_USERNAME');
Spinen\ConnectWise\Clients\System\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD');

$api_instance = new Spinen\ConnectWise\Clients\System\Api\DocumentsApi();
$id = 56; // int | 

try {
    $api_instance->systemDocumentsIdDelete($id);
} catch (Exception $e) {
    echo 'Exception when calling DocumentsApi->systemDocumentsIdDelete: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
id int

Return type

void (empty response body)

Authorization

BasicAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

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

systemDocumentsIdDownloadGet

systemDocumentsIdDownloadGet($id, $last_modified)

Download Document

Example

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

// Configure HTTP basic authorization: BasicAuth
Spinen\ConnectWise\Clients\System\Configuration::getDefaultConfiguration()->setUsername('YOUR_USERNAME');
Spinen\ConnectWise\Clients\System\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD');

$api_instance = new Spinen\ConnectWise\Clients\System\Api\DocumentsApi();
$id = 56; // int | 
$last_modified = "last_modified_example"; // string | 

try {
    $api_instance->systemDocumentsIdDownloadGet($id, $last_modified);
} catch (Exception $e) {
    echo 'Exception when calling DocumentsApi->systemDocumentsIdDownloadGet: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
id int
last_modified string [optional]

Return type

void (empty response body)

Authorization

BasicAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/octet-stream

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

systemDocumentsIdGet

\Spinen\ConnectWise\Clients\System\Model\DocumentInfo systemDocumentsIdGet($id)

Get Document Info By Id

Example

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

// Configure HTTP basic authorization: BasicAuth
Spinen\ConnectWise\Clients\System\Configuration::getDefaultConfiguration()->setUsername('YOUR_USERNAME');
Spinen\ConnectWise\Clients\System\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD');

$api_instance = new Spinen\ConnectWise\Clients\System\Api\DocumentsApi();
$id = 56; // int | 

try {
    $result = $api_instance->systemDocumentsIdGet($id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DocumentsApi->systemDocumentsIdGet: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
id int

Return type

\Spinen\ConnectWise\Clients\System\Model\DocumentInfo

Authorization

BasicAuth

HTTP request headers

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

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

systemDocumentsIdPost

\Spinen\ConnectWise\Clients\System\Model\DocumentInfo systemDocumentsIdPost($id, $record_id, $record_type, $title, $url, $file, $private_flag, $read_only_flag)

Update Document By Id

Example

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

// Configure HTTP basic authorization: BasicAuth
Spinen\ConnectWise\Clients\System\Configuration::getDefaultConfiguration()->setUsername('YOUR_USERNAME');
Spinen\ConnectWise\Clients\System\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD');

$api_instance = new Spinen\ConnectWise\Clients\System\Api\DocumentsApi();
$id = 56; // int | 
$record_id = 56; // int | Entity id
$record_type = "record_type_example"; // string | Entity type
$title = "title_example"; // string | Document title
$url = "url_example"; // string | Document url
$file = "/path/to/file.txt"; // \SplFileObject | File to upload
$private_flag = true; // bool | Indicates if document is private
$read_only_flag = true; // bool | Indicates if document is readonly

try {
    $result = $api_instance->systemDocumentsIdPost($id, $record_id, $record_type, $title, $url, $file, $private_flag, $read_only_flag);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DocumentsApi->systemDocumentsIdPost: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
id int
record_id int Entity id
record_type string Entity type
title string Document title
url string Document url
file \SplFileObject File to upload [optional]
private_flag bool Indicates if document is private [optional]
read_only_flag bool Indicates if document is readonly [optional]

Return type

\Spinen\ConnectWise\Clients\System\Model\DocumentInfo

Authorization

BasicAuth

HTTP request headers

  • Content-Type: multipart/form-data
  • Accept: application/json

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

systemDocumentsPost

\Spinen\ConnectWise\Clients\System\Model\DocumentInfo systemDocumentsPost($record_type, $title, $url, $file, $record_id, $private_flag, $read_only_flag)

Insert Document

Example

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

// Configure HTTP basic authorization: BasicAuth
Spinen\ConnectWise\Clients\System\Configuration::getDefaultConfiguration()->setUsername('YOUR_USERNAME');
Spinen\ConnectWise\Clients\System\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD');

$api_instance = new Spinen\ConnectWise\Clients\System\Api\DocumentsApi();
$record_type = "record_type_example"; // string | Entity type
$title = "title_example"; // string | Document title
$url = "url_example"; // string | Document url
$file = "/path/to/file.txt"; // \SplFileObject | File to upload
$record_id = 56; // int | Entity id
$private_flag = true; // bool | Indicates if document is private
$read_only_flag = true; // bool | Indicates if document is readonly

try {
    $result = $api_instance->systemDocumentsPost($record_type, $title, $url, $file, $record_id, $private_flag, $read_only_flag);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DocumentsApi->systemDocumentsPost: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
record_type string Entity type
title string Document title
url string Document url
file \SplFileObject File to upload [optional]
record_id int Entity id [optional]
private_flag bool Indicates if document is private [optional]
read_only_flag bool Indicates if document is readonly [optional]

Return type

\Spinen\ConnectWise\Clients\System\Model\DocumentInfo

Authorization

BasicAuth

HTTP request headers

  • Content-Type: multipart/form-data
  • Accept: application/json

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

systemDocumentsUploadsampleGet

systemDocumentsUploadsampleGet()

Get Upload Sample Page

Example

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

// Configure HTTP basic authorization: BasicAuth
Spinen\ConnectWise\Clients\System\Configuration::getDefaultConfiguration()->setUsername('YOUR_USERNAME');
Spinen\ConnectWise\Clients\System\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD');

$api_instance = new Spinen\ConnectWise\Clients\System\Api\DocumentsApi();

try {
    $api_instance->systemDocumentsUploadsampleGet();
} catch (Exception $e) {
    echo 'Exception when calling DocumentsApi->systemDocumentsUploadsampleGet: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

This endpoint does not need any parameter.

Return type

void (empty response body)

Authorization

BasicAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: text/html

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