All URIs are relative to https://api.insightly.com/v3.0
Method | HTTP request | Description |
---|---|---|
getUser | GET /Users/{id} | Gets a User |
getUserMe | GET /Users/Me | Gets the User object for the calling user. |
getUsers | GET /Users | Gets a list of Users |
getUsersBySearch | GET /Users/Search | Gets a filtered list of Users |
\Swagger\Client\Model\User getUser($id, $authorization)
Gets a User
This read only endpoint returns the details for a specific user on an Insightly instance, same fields as returned by the /Users endpoint, but only for a single identified user.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new Swagger\Client\Api\UsersApi(
// 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 User's ID
$authorization = "{{Authorization}}"; // string | Authorization
try {
$result = $apiInstance->getUser($id, $authorization);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling UsersApi->getUser: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
id | int | A User's ID | |
authorization | string | Authorization | [default to {{Authorization}}] |
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Swagger\Client\Model\APIUser getUserMe()
Gets the User object for the calling user.
This read only endpoint returns the details for the currently authenticated user on an Insightly instance, same fields as returned by the /Users endpoint, but only for a single identified user.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new Swagger\Client\Api\UsersApi(
// 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()
);
try {
$result = $apiInstance->getUserMe();
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling UsersApi->getUserMe: ', $e->getMessage(), PHP_EOL;
}
?>
This endpoint does not need any parameter.
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
object[] getUsers($authorization, $skip, $top, $count_total)
Gets a list of Users
This is a read only endpoint that returns a list of users associated with an Insightly instance. Use this endpoint when you need to obtain a list of valid USER_IDs, for example, when you want to assign a task to a specific user (do not confuse the USER_ID with their CONTACT_ID).
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new Swagger\Client\Api\UsersApi(
// 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 users to skip.
$top = 56; // int | Optional, maximum number of users 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->getUsers($authorization, $skip, $top, $count_total);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling UsersApi->getUsers: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
authorization | string | Authorization | [default to {{Authorization}}] |
skip | int | Optional, number of users to skip. | [optional] |
top | int | Optional, maximum number of users 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[] getUsersBySearch($authorization, $field_name, $field_value, $updated_after_utc, $skip, $top, $count_total)
Gets a filtered list of Users
This is a read only endpoint that returns a list of users associated with an Insightly instance. Use this endpoint when you need to obtain a list of valid USER_IDs, for example, when you want to assign a task to a specific user (do not confuse the USER_ID with their CONTACT_ID).
To filter with a field name and value, both field_name and field_value parameters must be provided.
For other filters, only one optional parameter (excluding brief, top, skip and count_total) can be specified.
Simple object graphs (excluding NOTELINKS) are returned if "brief=true" is used in the query string.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new Swagger\Client\Api\UsersApi(
// 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
$field_name = "field_name_example"; // string | Optional, standard field name of Users
$field_value = "field_value_example"; // string | Optional, field value of the user
$updated_after_utc = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | Optional, earliest date when note was last updated.
$skip = 56; // int | Optional, number of users to skip.
$top = 56; // int | Optional, maximum number of users 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->getUsersBySearch($authorization, $field_name, $field_value, $updated_after_utc, $skip, $top, $count_total);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling UsersApi->getUsersBySearch: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
authorization | string | Authorization | [default to {{Authorization}}] |
field_name | string | Optional, standard field name of Users | [optional] |
field_value | string | Optional, field value of the user | [optional] |
updated_after_utc | \DateTime | Optional, earliest date when note was last updated. | [optional] |
skip | int | Optional, number of users to skip. | [optional] |
top | int | Optional, maximum number of users 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]