All URIs are relative to https://api.insightly.com/v3.1
Method | HTTP request | Description |
---|---|---|
addTaskCategory | POST /TaskCategories | Adds a Task Category |
deleteTaskCategory | DELETE /TaskCategories/{id} | Deactivates a Task Category |
getTaskCategories | GET /TaskCategories | Gets a list of Task Categories |
getTaskCategory | GET /TaskCategories/{id} | Gets a Task Category |
updateTaskCategory | PUT /TaskCategories | Updates a Task Category |
object addTaskCategory($category, $authorization)
Adds a Task Category
This endpoint is used to create a new task category. This endpoint is only accessible to users with administrator permission.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new SternerStuff\InsightlyPHP\Api\TaskCategoriesApi(
// 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 Task Category to add (just include JSON object as request body)
$authorization = "{{Authorization}}"; // string | Authorization
try {
$result = $apiInstance->addTaskCategory($category, $authorization);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling TaskCategoriesApi->addTaskCategory: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
category | \SternerStuff\InsightlyPHP\Model\APICategory | The Task 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]
deleteTaskCategory($id, $authorization)
Deactivates a Task Category
This endpoint is used to deactivate a task category. This endpoint is only accessible to users with administrator permission.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new SternerStuff\InsightlyPHP\Api\TaskCategoriesApi(
// 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 Task Category's ID
$authorization = "{{Authorization}}"; // string | Authorization
try {
$apiInstance->deleteTaskCategory($id, $authorization);
} catch (Exception $e) {
echo 'Exception when calling TaskCategoriesApi->deleteTaskCategory: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
id | int | A Task 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[] getTaskCategories($authorization, $skip, $top, $count_total)
Gets a list of Task Categories
This read only endpoint returns a list of the task categories set up for the Insightly instance.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new SternerStuff\InsightlyPHP\Api\TaskCategoriesApi(
// 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 records to skip.
$top = 56; // int | Optional, maximum number of records 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->getTaskCategories($authorization, $skip, $top, $count_total);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling TaskCategoriesApi->getTaskCategories: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
authorization | string | Authorization | [default to {{Authorization}}] |
skip | int | Optional, number of records to skip. | [optional] |
top | int | Optional, maximum number of records 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 getTaskCategory($id, $authorization)
Gets a Task Category
This endpoint returns the graph for a specific task category.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new SternerStuff\InsightlyPHP\Api\TaskCategoriesApi(
// 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 Task Category's ID
$authorization = "{{Authorization}}"; // string | Authorization
try {
$result = $apiInstance->getTaskCategory($id, $authorization);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling TaskCategoriesApi->getTaskCategory: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
id | int | A Task 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 updateTaskCategory($category, $authorization)
Updates a Task Category
This endpoint is used to update an existing task category, for example to change the background color for the task category's label in the web UI. This endpoint is only accessible to users with administrator permission.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new SternerStuff\InsightlyPHP\Api\TaskCategoriesApi(
// 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 Task Category (just include JSON object as request body)
$authorization = "{{Authorization}}"; // string | Authorization
try {
$result = $apiInstance->updateTaskCategory($category, $authorization);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling TaskCategoriesApi->updateTaskCategory: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
category | \SternerStuff\InsightlyPHP\Model\APICategory | A Task 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]