Skip to content

Latest commit

 

History

History
executable file
·
118 lines (82 loc) · 6.22 KB

PreferencesApi.md

File metadata and controls

executable file
·
118 lines (82 loc) · 6.22 KB

Alfresco\PreferencesApi

All URIs are relative to https://localhost/alfresco/api/-default-/public/alfresco/versions/1

Method HTTP request Description
getPreference GET /people/{personId}/preferences/{preferenceName} Get a preference
listPreferences GET /people/{personId}/preferences List preferences

getPreference

\Alfresco\Model\PreferenceEntry getPreference($person_id, $preference_name, $fields)

Get a preference

Gets a specific preference for person personId. You can use the -me- string in place of <personId> to specify the currently authenticated user.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure HTTP basic authorization: basicAuth
Alfresco\Configuration::getDefaultConfiguration()->setUsername('YOUR_USERNAME');
Alfresco\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD');

$api_instance = new Alfresco\Api\PreferencesApi();
$person_id = "person_id_example"; // string | The identifier of a person.
$preference_name = "preference_name_example"; // string | The name of the preference.
$fields = array("fields_example"); // string[] | A list of field names.  You can use this parameter to restrict the fields returned within a response if, for example, you want to save on overall bandwidth.  The list applies to a returned individual entity or entries within a collection.  If the API method also supports the **include** parameter, then the fields specified in the **include** parameter are returned in addition to those specified in the **fields** parameter.

try {
    $result = $api_instance->getPreference($person_id, $preference_name, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PreferencesApi->getPreference: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
person_id string The identifier of a person.
preference_name string The name of the preference.
fields string[] A list of field names. You can use this parameter to restrict the fields returned within a response if, for example, you want to save on overall bandwidth. The list applies to a returned individual entity or entries within a collection. If the API method also supports the include parameter, then the fields specified in the include parameter are returned in addition to those specified in the fields parameter. [optional]

Return type

\Alfresco\Model\PreferenceEntry

Authorization

basicAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

listPreferences

\Alfresco\Model\PreferencePaging listPreferences($person_id, $skip_count, $max_items, $fields)

List preferences

Gets a list of preferences for person personId. You can use the -me- string in place of <personId> to specify the currently authenticated user. Note that each preference consists of an id and a value. The value can be of any JSON type.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure HTTP basic authorization: basicAuth
Alfresco\Configuration::getDefaultConfiguration()->setUsername('YOUR_USERNAME');
Alfresco\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD');

$api_instance = new Alfresco\Api\PreferencesApi();
$person_id = "person_id_example"; // string | The identifier of a person.
$skip_count = 0; // int | The number of entities that exist in the collection before those included in this list.  If not supplied then the default value is 0.
$max_items = 100; // int | The maximum number of items to return in the list.  If not supplied then the default value is 100.
$fields = array("fields_example"); // string[] | A list of field names.  You can use this parameter to restrict the fields returned within a response if, for example, you want to save on overall bandwidth.  The list applies to a returned individual entity or entries within a collection.  If the API method also supports the **include** parameter, then the fields specified in the **include** parameter are returned in addition to those specified in the **fields** parameter.

try {
    $result = $api_instance->listPreferences($person_id, $skip_count, $max_items, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PreferencesApi->listPreferences: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
person_id string The identifier of a person.
skip_count int The number of entities that exist in the collection before those included in this list. If not supplied then the default value is 0. [optional] [default to 0]
max_items int The maximum number of items to return in the list. If not supplied then the default value is 100. [optional] [default to 100]
fields string[] A list of field names. You can use this parameter to restrict the fields returned within a response if, for example, you want to save on overall bandwidth. The list applies to a returned individual entity or entries within a collection. If the API method also supports the include parameter, then the fields specified in the include parameter are returned in addition to those specified in the fields parameter. [optional]

Return type

\Alfresco\Model\PreferencePaging

Authorization

basicAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]