All URIs are relative to https://api.insightly.com/v3.1
Method | HTTP request | Description |
---|---|---|
addFileCategory | POST /FileCategories | Adds a File Category |
deleteFileCategory | DELETE /FileCategories/{id} | Deactivates a File Category |
getFileCategories | GET /FileCategories | Gets a list of File Categories |
getFileCategory | GET /FileCategories/{id} | Gets a File Category |
updateFileCategory | PUT /FileCategories | Updates a File Category |
object addFileCategory($category, $authorization)
Adds a File Category
This endpoint is used to create a new File Category. This endpoint is only accessible to users with administrator permission.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new SternerStuff\InsightlyPHP\Api\FileCategoriesApi(
// 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()
);
$category = new \SternerStuff\InsightlyPHP\Model\APICategory(); // \SternerStuff\InsightlyPHP\Model\APICategory | The File Category to add (just include JSON object as request body)
$authorization = "{{Authorization}}"; // string | Authorization
try {
$result = $apiInstance->addFileCategory($category, $authorization);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling FileCategoriesApi->addFileCategory: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
category | \SternerStuff\InsightlyPHP\Model\APICategory | The File Category to add (just include JSON object as request body) | |
authorization | string | Authorization | [default to {{Authorization}}] |
object
No authorization required
- Content-Type: application/json
- Accept: application/json, text/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
deleteFileCategory($id, $authorization)
Deactivates a File Category
This endpoint is used to deactivate an existing File Category. This endpoint is only accessible to users with administrator permission.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new SternerStuff\InsightlyPHP\Api\FileCategoriesApi(
// 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()
);
$id = 789; // int | A File Category's ID
$authorization = "{{Authorization}}"; // string | Authorization
try {
$apiInstance->deleteFileCategory($id, $authorization);
} catch (Exception $e) {
echo 'Exception when calling FileCategoriesApi->deleteFileCategory: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
id | int | A File Category's ID | |
authorization | string | Authorization | [default to {{Authorization}}] |
void (empty response body)
No authorization required
- Content-Type: application/json
- Accept: application/json, text/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
object[] getFileCategories($authorization, $skip, $top, $count_total)
Gets a list of File Categories
This read only endpoint returns a list of file categories that have been set up for the Insightly instance.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new SternerStuff\InsightlyPHP\Api\FileCategoriesApi(
// 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()
);
$authorization = "{{Authorization}}"; // string | Authorization
$skip = 56; // int | Optional, number of file categories to skip.
$top = 56; // int | Optional, maximum number of file categories to return in the response.
$count_total = false; // bool | Optional, true if total number of records should be returned in the response headers.
try {
$result = $apiInstance->getFileCategories($authorization, $skip, $top, $count_total);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling FileCategoriesApi->getFileCategories: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
authorization | string | Authorization | [default to {{Authorization}}] |
skip | int | Optional, number of file categories to skip. | [optional] |
top | int | Optional, maximum number of file categories to return in the response. | [optional] |
count_total | bool | Optional, true if total number of records should be returned in the response headers. | [optional] [default to false] |
object[]
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
object getFileCategory($id, $authorization)
Gets a File Category
This endpoint returns the graph for a specific file category.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new SternerStuff\InsightlyPHP\Api\FileCategoriesApi(
// 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()
);
$id = 789; // int | A File Category's ID
$authorization = "{{Authorization}}"; // string | Authorization
try {
$result = $apiInstance->getFileCategory($id, $authorization);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling FileCategoriesApi->getFileCategory: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
id | int | A File Category's ID | |
authorization | string | Authorization | [default to {{Authorization}}] |
object
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
object updateFileCategory($category, $authorization)
Updates a File Category
This endpoint is used to update an existing File Category. This endpoint is only accessible to users with administrator permission.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new SternerStuff\InsightlyPHP\Api\FileCategoriesApi(
// 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()
);
$category = new \SternerStuff\InsightlyPHP\Model\APICategory(); // \SternerStuff\InsightlyPHP\Model\APICategory | A File Category (just include JSON object as request body)
$authorization = "{{Authorization}}"; // string | Authorization
try {
$result = $apiInstance->updateFileCategory($category, $authorization);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling FileCategoriesApi->updateFileCategory: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
category | \SternerStuff\InsightlyPHP\Model\APICategory | A File Category (just include JSON object as request body) | |
authorization | string | Authorization | [default to {{Authorization}}] |
object
No authorization required
- Content-Type: application/json
- Accept: application/json, text/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]