All URIs are relative to https://sandbox.caplinked.com/api/v1
| Method | HTTP request | Description |
|---|---|---|
| deleteFilesId | DELETE /files/{id} | Delete file |
| getFilesId | GET /files/{id} | Get file information |
| postFilesIdCopy | POST /files/{id}/copy | Copy file |
| postFilesIdMove | POST /files/{id}/move | Move file |
| putFilesId | PUT /files/{id} | Update file information |
| putFilesUpload | PUT /files/upload | Upload file |
\Caplinked\Model\FileDelete deleteFilesId($id, $workspace_id)
Delete file
Delete file
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$api_instance = new Caplinked\Api\FilesApi();
$id = 56; // int | ID of file to delete
$workspace_id = 56; // int | ID of workspace
try {
$result = $api_instance->deleteFilesId($id, $workspace_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling FilesApi->deleteFilesId: ', $e->getMessage(), PHP_EOL;
}
?>| Name | Type | Description | Notes |
|---|---|---|---|
| id | int | ID of file to delete | |
| workspace_id | int | ID of workspace |
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Caplinked\Model\FileInfoMapped getFilesId($id, $workspace_id, $page_number)
Get file information
Get file information
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$api_instance = new Caplinked\Api\FilesApi();
$id = 56; // int | ID of file
$workspace_id = 56; // int | ID of workspace
$page_number = 1; // int | Page number of file (for viewer tokens)
try {
$result = $api_instance->getFilesId($id, $workspace_id, $page_number);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling FilesApi->getFilesId: ', $e->getMessage(), PHP_EOL;
}
?>| Name | Type | Description | Notes |
|---|---|---|---|
| id | int | ID of file | |
| workspace_id | int | ID of workspace | |
| page_number | int | Page number of file (for viewer tokens) | [optional] [default to 1] |
\Caplinked\Model\FileInfoMapped
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Caplinked\Model\FileCopyMove postFilesIdCopy($id, $workspace_id, $destination_folder_id)
Copy file
Copy file into another folder (existing file will not be modified)
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$api_instance = new Caplinked\Api\FilesApi();
$id = 56; // int | ID of file to copy
$workspace_id = 56; // int | ID of workspace
$destination_folder_id = 56; // int | ID of destination parent folder
try {
$result = $api_instance->postFilesIdCopy($id, $workspace_id, $destination_folder_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling FilesApi->postFilesIdCopy: ', $e->getMessage(), PHP_EOL;
}
?>| Name | Type | Description | Notes |
|---|---|---|---|
| id | int | ID of file to copy | |
| workspace_id | int | ID of workspace | |
| destination_folder_id | int | ID of destination parent folder |
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Caplinked\Model\FileCopyMove postFilesIdMove($id, $workspace_id, $destination_folder_id)
Move file
Move file into another folder
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$api_instance = new Caplinked\Api\FilesApi();
$id = 56; // int | ID of file to move
$workspace_id = 56; // int | ID of workspace
$destination_folder_id = 56; // int | ID of destination parent folder
try {
$result = $api_instance->postFilesIdMove($id, $workspace_id, $destination_folder_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling FilesApi->postFilesIdMove: ', $e->getMessage(), PHP_EOL;
}
?>| Name | Type | Description | Notes |
|---|---|---|---|
| id | int | ID of file to move | |
| workspace_id | int | ID of workspace | |
| destination_folder_id | int | ID of destination parent folder |
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Caplinked\Model\FileInfoMapped putFilesId($id, $workspace_id, $file_title, $file_index)
Update file information
Update file information
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$api_instance = new Caplinked\Api\FilesApi();
$id = 56; // int | ID of file
$workspace_id = 56; // int | ID of workspace
$file_title = "file_title_example"; // string | Title of file
$file_index = 56; // int | Index number of file within current folder scope (integer)
try {
$result = $api_instance->putFilesId($id, $workspace_id, $file_title, $file_index);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling FilesApi->putFilesId: ', $e->getMessage(), PHP_EOL;
}
?>| Name | Type | Description | Notes |
|---|---|---|---|
| id | int | ID of file | |
| workspace_id | int | ID of workspace | |
| file_title | string | Title of file | [optional] |
| file_index | int | Index number of file within current folder scope (integer) | [optional] |
\Caplinked\Model\FileInfoMapped
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Caplinked\Model\FileInfoCompact putFilesUpload($workspace_id, $folder_id, $file_name)
Upload file
Create or update a file with the same file name. Request body should be the file body itself as binary data.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$api_instance = new Caplinked\Api\FilesApi();
$workspace_id = 56; // int | Workspace ID
$folder_id = 56; // int | Folder ID
$file_name = "file_name_example"; // string | File name
try {
$result = $api_instance->putFilesUpload($workspace_id, $folder_id, $file_name);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling FilesApi->putFilesUpload: ', $e->getMessage(), PHP_EOL;
}
?>| Name | Type | Description | Notes |
|---|---|---|---|
| workspace_id | int | Workspace ID | |
| folder_id | int | Folder ID | |
| file_name | string | File name |
\Caplinked\Model\FileInfoCompact
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]