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 |
\Spinen\ConnectWise\Clients\System\Model\Count systemDocumentsCountGet($record_type, $record_id)
Get Documents Info Count
<?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;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
record_type | string | [optional] | |
record_id | int | [optional] |
\Spinen\ConnectWise\Clients\System\Model\Count
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Spinen\ConnectWise\Clients\System\Model\DocumentInfo[] systemDocumentsGet($record_type, $record_id, $page, $page_size)
Get Documents Info
<?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;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
record_type | string | [optional] | |
record_id | int | [optional] | |
page | int | [optional] | |
page_size | int | [optional] |
\Spinen\ConnectWise\Clients\System\Model\DocumentInfo[]
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
systemDocumentsIdDelete($id)
Delete Document Info By Id
<?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;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
id | int |
void (empty response body)
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
systemDocumentsIdDownloadGet($id, $last_modified)
Download Document
<?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;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
id | int | ||
last_modified | string | [optional] |
void (empty response body)
- Content-Type: Not defined
- Accept: application/octet-stream
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Spinen\ConnectWise\Clients\System\Model\DocumentInfo systemDocumentsIdGet($id)
Get Document Info By Id
<?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;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
id | int |
\Spinen\ConnectWise\Clients\System\Model\DocumentInfo
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Spinen\ConnectWise\Clients\System\Model\DocumentInfo systemDocumentsIdPost($id, $record_id, $record_type, $title, $url, $file, $private_flag, $read_only_flag)
Update Document By Id
<?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;
}
?>
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] |
\Spinen\ConnectWise\Clients\System\Model\DocumentInfo
- Content-Type: multipart/form-data
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Spinen\ConnectWise\Clients\System\Model\DocumentInfo systemDocumentsPost($record_type, $title, $url, $file, $record_id, $private_flag, $read_only_flag)
Insert Document
<?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;
}
?>
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] |
\Spinen\ConnectWise\Clients\System\Model\DocumentInfo
- Content-Type: multipart/form-data
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
systemDocumentsUploadsampleGet()
Get Upload Sample Page
<?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;
}
?>
This endpoint does not need any parameter.
void (empty response body)
- Content-Type: Not defined
- Accept: text/html
[Back to top] [Back to API list] [Back to Model list] [Back to README]