class AlfrescoAPI::PeopleApi
Attributes
Public Class Methods
# File lib/alfresco_api/api/people_api.rb, line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end
Public Instance Methods
Create person Note: this endpoint is available in Alfresco 5.2 and newer versions. Create a person. If applicable, the given person's login access can also be optionally disabled. You must have admin rights to create a person. You can set custom properties when you create a person: “`JSON { "id": "abeecher", "firstName": "Alice", "lastName": "Beecher", "email": "abeecher@example.com", "password": "secret", "properties": { "my:property": "The value" } } “` Note: setting properties of type d:content and d:category are not supported. @param person_body_create The person details. @param [Hash] opts the optional parameters @option opts [Array<String>] :fields 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. @return [PersonEntry]
# File lib/alfresco_api/api/people_api.rb, line 29 def create_person(person_body_create, opts = {}) data, _status_code, _headers = create_person_with_http_info(person_body_create, opts) return data end
Create person Note: this endpoint is available in Alfresco 5.2 and newer versions. Create a person. If applicable, the given person's login access can also be optionally disabled. You must have admin rights to create a person. You can set custom properties when you create a person: ```JSON { "id": "abeecher", "firstName": "Alice", "lastName": "Beecher", "email": "abeecher@example.com", "password": "secret", "properties": { "my:property": "The value" } } ``` Note: setting properties of type d:content and d:category are not supported. @param person_body_create The person details. @param [Hash] opts the optional parameters @option opts [Array<String>] :fields 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. @return [Array<(PersonEntry
, Fixnum, Hash)>] PersonEntry
data, response status code and response headers
# File lib/alfresco_api/api/people_api.rb, line 40 def create_person_with_http_info(person_body_create, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: PeopleApi.create_person ..." end # verify the required parameter 'person_body_create' is set if @api_client.config.client_side_validation && person_body_create.nil? fail ArgumentError, "Missing the required parameter 'person_body_create' when calling PeopleApi.create_person" end # resource path local_var_path = "/people" # query parameters query_params = {} query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(person_body_create) auth_names = ['basicAuth'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'PersonEntry') if @api_client.config.debugging @api_client.config.logger.debug "API called: PeopleApi#create_person\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Delete avatar image Note: this endpoint is available in Alfresco 5.2.2 and newer versions. Deletes the avatar image related to person personId. You must be the person or have admin rights to update a person's avatar. You can use the `-me-` string in place of `<personId>` to specify the currently authenticated user. @param person_id The identifier of a person. @param [Hash] opts the optional parameters @return [nil]
# File lib/alfresco_api/api/people_api.rb, line 86 def delete_avatar_image(person_id, opts = {}) delete_avatar_image_with_http_info(person_id, opts) return nil end
Delete avatar image Note: this endpoint is available in Alfresco 5.2.2 and newer versions. Deletes the avatar image related to person personId. You must be the person or have admin rights to update a person's avatar. You can use the `-me-` string in place of `<personId>` to specify the currently authenticated user. @param person_id The identifier of a person. @param [Hash] opts the optional parameters @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
# File lib/alfresco_api/api/people_api.rb, line 96 def delete_avatar_image_with_http_info(person_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: PeopleApi.delete_avatar_image ..." end # verify the required parameter 'person_id' is set if @api_client.config.client_side_validation && person_id.nil? fail ArgumentError, "Missing the required parameter 'person_id' when calling PeopleApi.delete_avatar_image" end # resource path local_var_path = "/people/{personId}/avatar".sub('{' + 'personId' + '}', person_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['basicAuth'] data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: PeopleApi#delete_avatar_image\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Get avatar image Note: this endpoint is available in Alfresco 5.2.2 and newer versions. Gets the avatar image related to the person personId. If the person has no related avatar then the placeholder query parameter can be optionally used to request a placeholder image to be returned. You can use the `-me-` string in place of `<personId>` to specify the currently authenticated user. @param person_id The identifier of a person. @param [Hash] opts the optional parameters @option opts [BOOLEAN] :attachment true enables a web browser to download the file as an attachment. false means a web browser may preview the file in a new tab or window, but not download the file. You can only set this parameter to false if the content type of the file is in the supported list; for example, certain image files and PDF files. If the content type is not supported for preview, then a value of false is ignored, and the attachment will be returned in the response. (default to true) @option opts [DateTime] :if_modified_since Only returns the content if it has been modified since the date provided. Use the date format defined by HTTP. For example, `Wed, 09 Mar 2016 16:56:34 GMT`. @option opts [BOOLEAN] :placeholder If true and there is no avatar for this personId then the placeholder image is returned, rather than a 404 response. (default to true) @return [nil]
# File lib/alfresco_api/api/people_api.rb, line 143 def get_avatar_image(person_id, opts = {}) get_avatar_image_with_http_info(person_id, opts) return nil end
Get avatar image Note: this endpoint is available in Alfresco 5.2.2 and newer versions. Gets the avatar image related to the person personId. If the person has no related avatar then the placeholder query parameter can be optionally used to request a placeholder image to be returned. You can use the `-me-` string in place of `<personId>` to specify the currently authenticated user. @param person_id The identifier of a person. @param [Hash] opts the optional parameters @option opts [BOOLEAN] :attachment true enables a web browser to download the file as an attachment. false means a web browser may preview the file in a new tab or window, but not download the file. You can only set this parameter to false if the content type of the file is in the supported list; for example, certain image files and PDF files. If the content type is not supported for preview, then a value of false is ignored, and the attachment will be returned in the response. @option opts [DateTime] :if_modified_since Only returns the content if it has been modified since the date provided. Use the date format defined by HTTP. For example, `Wed, 09 Mar 2016 16:56:34 GMT`. @option opts [BOOLEAN] :placeholder If true and there is no avatar for this personId then the placeholder image is returned, rather than a 404 response. @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
# File lib/alfresco_api/api/people_api.rb, line 156 def get_avatar_image_with_http_info(person_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: PeopleApi.get_avatar_image ..." end # verify the required parameter 'person_id' is set if @api_client.config.client_side_validation && person_id.nil? fail ArgumentError, "Missing the required parameter 'person_id' when calling PeopleApi.get_avatar_image" end # resource path local_var_path = "/people/{personId}/avatar".sub('{' + 'personId' + '}', person_id.to_s) # query parameters query_params = {} query_params[:'attachment'] = opts[:'attachment'] if !opts[:'attachment'].nil? query_params[:'placeholder'] = opts[:'placeholder'] if !opts[:'placeholder'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) header_params[:'If-Modified-Since'] = opts[:'if_modified_since'] if !opts[:'if_modified_since'].nil? # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['basicAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: PeopleApi#get_avatar_image\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Get a person Gets information for the person personId. You can use the `-me-` string in place of `<personId>` to specify the currently authenticated user. @param person_id The identifier of a person. @param [Hash] opts the optional parameters @option opts [Array<String>] :fields 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. @return [PersonEntry]
# File lib/alfresco_api/api/people_api.rb, line 204 def get_person(person_id, opts = {}) data, _status_code, _headers = get_person_with_http_info(person_id, opts) return data end
Get a person Gets information for the person personId. You can use the `-me-` string in place of `<personId>` to specify the currently authenticated user. @param person_id The identifier of a person. @param [Hash] opts the optional parameters @option opts [Array<String>] :fields 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. @return [Array<(PersonEntry
, Fixnum, Hash)>] PersonEntry
data, response status code and response headers
# File lib/alfresco_api/api/people_api.rb, line 215 def get_person_with_http_info(person_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: PeopleApi.get_person ..." end # verify the required parameter 'person_id' is set if @api_client.config.client_side_validation && person_id.nil? fail ArgumentError, "Missing the required parameter 'person_id' when calling PeopleApi.get_person" end # resource path local_var_path = "/people/{personId}".sub('{' + 'personId' + '}', person_id.to_s) # query parameters query_params = {} query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['basicAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'PersonEntry') if @api_client.config.debugging @api_client.config.logger.debug "API called: PeopleApi#get_person\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
List people Note: this endpoint is available in Alfresco 5.2 and newer versions. List people. You can use the include parameter to return any additional information. The default sort order for the returned list is for people to be sorted by ascending id. You can override the default by using the orderBy parameter. You can use any of the following fields to order the results: * id * firstName * lastName @param [Hash] opts the optional parameters @option opts [Integer] :skip_count The number of entities that exist in the collection before those included in this list. If not supplied then the default value is 0. (default to 0) @option opts [Integer] :max_items The maximum number of items to return in the list. If not supplied then the default value is 100. (default to 100) @option opts [Array<String>] :order_by A string to control the order of the entities returned in a list. You can use the orderBy parameter to sort the list by one or more fields. Each field has a default sort order, which is normally ascending order. Read the API method implementation notes above to check if any fields used in this method have a descending default search order. To sort the entities in a specific order, you can use the ASC and DESC keywords for any field. @option opts [Array<String>] :include Returns additional information about the person. The following optional fields can be requested: * properties * aspectNames @option opts [Array<String>] :fields 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. @return [PersonPaging]
# File lib/alfresco_api/api/people_api.rb, line 265 def list_people(opts = {}) data, _status_code, _headers = list_people_with_http_info(opts) return data end
List people Note: this endpoint is available in Alfresco 5.2 and newer versions. List people. You can use the include parameter to return any additional information. The default sort order for the returned list is for people to be sorted by ascending id. You can override the default by using the orderBy parameter. You can use any of the following fields to order the results: * id * firstName * lastName @param [Hash] opts the optional parameters @option opts [Integer] :skip_count The number of entities that exist in the collection before those included in this list. If not supplied then the default value is 0. @option opts [Integer] :max_items The maximum number of items to return in the list. If not supplied then the default value is 100. @option opts [Array<String>] :order_by A string to control the order of the entities returned in a list. You can use the orderBy parameter to sort the list by one or more fields. Each field has a default sort order, which is normally ascending order. Read the API method implementation notes above to check if any fields used in this method have a descending default search order. To sort the entities in a specific order, you can use the ASC and DESC keywords for any field. @option opts [Array<String>] :include Returns additional information about the person. The following optional fields can be requested: * properties * aspectNames @option opts [Array<String>] :fields 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. @return [Array<(PersonPaging
, Fixnum, Hash)>] PersonPaging
data, response status code and response headers
# File lib/alfresco_api/api/people_api.rb, line 279 def list_people_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: PeopleApi.list_people ..." end if @api_client.config.client_side_validation && !opts[:'skip_count'].nil? && opts[:'skip_count'] < 0 fail ArgumentError, 'invalid value for "opts[:"skip_count"]" when calling PeopleApi.list_people, must be greater than or equal to 0.' end if @api_client.config.client_side_validation && !opts[:'max_items'].nil? && opts[:'max_items'] < 1 fail ArgumentError, 'invalid value for "opts[:"max_items"]" when calling PeopleApi.list_people, must be greater than or equal to 1.' end # resource path local_var_path = "/people" # query parameters query_params = {} query_params[:'skipCount'] = opts[:'skip_count'] if !opts[:'skip_count'].nil? query_params[:'maxItems'] = opts[:'max_items'] if !opts[:'max_items'].nil? query_params[:'orderBy'] = @api_client.build_collection_param(opts[:'order_by'], :csv) if !opts[:'order_by'].nil? query_params[:'include'] = @api_client.build_collection_param(opts[:'include'], :csv) if !opts[:'include'].nil? query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['basicAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'PersonPaging') if @api_client.config.debugging @api_client.config.logger.debug "API called: PeopleApi#list_people\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Request password reset Note: this endpoint is available in Alfresco 5.2.1 and newer versions. Initiates the reset password workflow to send an email with reset password instruction to the user's registered email. The client is mandatory in the request body. For example: “`JSON { "client": "myClient" } “` Note: The client must be registered before this API can send an email. See [server documentation]. However, out-of-the-box share is registered as a default client, so you could pass share as the client name: “`JSON { "client": "share" } “` Note: No authentication is required to call this endpoint. @param person_id The identifier of a person. @param client_body The client name to send email with app-specific url. @param [Hash] opts the optional parameters @return [nil]
# File lib/alfresco_api/api/people_api.rb, line 334 def request_password_reset(person_id, client_body, opts = {}) request_password_reset_with_http_info(person_id, client_body, opts) return nil end
Request password reset Note: this endpoint is available in Alfresco 5.2.1 and newer versions. Initiates the reset password workflow to send an email with reset password instruction to the user's registered email. The client is mandatory in the request body. For example: ```JSON { "client": "myClient" } ``` Note: The client must be registered before this API can send an email. See [server documentation]. However, out-of-the-box share is registered as a default client, so you could pass share as the client name: ```JSON { "client": "share" } ``` Note: No authentication is required to call this endpoint. @param person_id The identifier of a person. @param client_body The client name to send email with app-specific url. @param [Hash] opts the optional parameters @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
# File lib/alfresco_api/api/people_api.rb, line 345 def request_password_reset_with_http_info(person_id, client_body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: PeopleApi.request_password_reset ..." end # verify the required parameter 'person_id' is set if @api_client.config.client_side_validation && person_id.nil? fail ArgumentError, "Missing the required parameter 'person_id' when calling PeopleApi.request_password_reset" end # verify the required parameter 'client_body' is set if @api_client.config.client_side_validation && client_body.nil? fail ArgumentError, "Missing the required parameter 'client_body' when calling PeopleApi.request_password_reset" end # resource path local_var_path = "/people/{personId}/request-password-reset".sub('{' + 'personId' + '}', person_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(client_body) auth_names = ['basicAuth'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: PeopleApi#request_password_reset\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Reset password Note: this endpoint is available in Alfresco 5.2.1 and newer versions. Resets user's password The password, id and key properties are mandatory in the request body. For example: “`JSON { "password":"newPassword", "id":"activiti$10", "key":"4dad6d00-0daf-413a-b200-f64af4e12345" } “` Note: No authentication is required to call this endpoint. @param person_id The identifier of a person. @param password_reset_body The reset password details @param [Hash] opts the optional parameters @return [nil]
# File lib/alfresco_api/api/people_api.rb, line 394 def reset_password(person_id, password_reset_body, opts = {}) reset_password_with_http_info(person_id, password_reset_body, opts) return nil end
Reset password Note: this endpoint is available in Alfresco 5.2.1 and newer versions. Resets user's password The password, id and key properties are mandatory in the request body. For example: ```JSON { "password":"newPassword", "id":"activiti$10", "key":"4dad6d00-0daf-413a-b200-f64af4e12345" } ``` Note: No authentication is required to call this endpoint. @param person_id The identifier of a person. @param password_reset_body The reset password details @param [Hash] opts the optional parameters @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
# File lib/alfresco_api/api/people_api.rb, line 405 def reset_password_with_http_info(person_id, password_reset_body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: PeopleApi.reset_password ..." end # verify the required parameter 'person_id' is set if @api_client.config.client_side_validation && person_id.nil? fail ArgumentError, "Missing the required parameter 'person_id' when calling PeopleApi.reset_password" end # verify the required parameter 'password_reset_body' is set if @api_client.config.client_side_validation && password_reset_body.nil? fail ArgumentError, "Missing the required parameter 'password_reset_body' when calling PeopleApi.reset_password" end # resource path local_var_path = "/people/{personId}/reset-password".sub('{' + 'personId' + '}', person_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(password_reset_body) auth_names = ['basicAuth'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: PeopleApi#reset_password\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Update avatar image Note: this endpoint is available in Alfresco 5.2.2 and newer versions. Updates the avatar image related to the person personId. The request body should be the binary stream for the avatar image. The content type of the file should be an image file. This will be used to generate an "avatar" thumbnail rendition. You must be the person or have admin rights to update a person's avatar. You can use the `-me-` string in place of `<personId>` to specify the currently authenticated user. @param person_id The identifier of a person. @param content_body_update The binary content @param [Hash] opts the optional parameters @return [nil]
# File lib/alfresco_api/api/people_api.rb, line 454 def update_avatar_image(person_id, content_body_update, opts = {}) update_avatar_image_with_http_info(person_id, content_body_update, opts) return nil end
Update avatar image Note: this endpoint is available in Alfresco 5.2.2 and newer versions. Updates the avatar image related to the person personId. The request body should be the binary stream for the avatar image. The content type of the file should be an image file. This will be used to generate an "avatar" thumbnail rendition. You must be the person or have admin rights to update a person's avatar. You can use the `-me-` string in place of `<personId>` to specify the currently authenticated user. @param person_id The identifier of a person. @param content_body_update The binary content @param [Hash] opts the optional parameters @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
# File lib/alfresco_api/api/people_api.rb, line 465 def update_avatar_image_with_http_info(person_id, content_body_update, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: PeopleApi.update_avatar_image ..." end # verify the required parameter 'person_id' is set if @api_client.config.client_side_validation && person_id.nil? fail ArgumentError, "Missing the required parameter 'person_id' when calling PeopleApi.update_avatar_image" end # verify the required parameter 'content_body_update' is set if @api_client.config.client_side_validation && content_body_update.nil? fail ArgumentError, "Missing the required parameter 'content_body_update' when calling PeopleApi.update_avatar_image" end # resource path local_var_path = "/people/{personId}/avatar".sub('{' + 'personId' + '}', person_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/octet-stream']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(content_body_update) auth_names = ['basicAuth'] data, status_code, headers = @api_client.call_api(:PUT, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: PeopleApi#update_avatar_image\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Update person Note: this endpoint is available in Alfresco 5.2 and newer versions. Update the given person's details. You can use the `-me-` string in place of `<personId>` to specify the currently authenticated user. If applicable, the given person's login access can also be optionally disabled or re-enabled. You must have admin rights to update a person — unless updating your own details. If you are changing your password, as a non-admin user, then the existing password must also be supplied (using the oldPassword field in addition to the new password value). Admin users cannot be disabled by setting enabled to false. Non-admin users may not disable themselves. You can set custom properties when you update a person: “`JSON { "firstName": "Alice", "properties": { "my:property": "The value" } } “` Note: setting properties of type d:content and d:category are not supported. @param person_id The identifier of a person. @param person_body_update The person details. @param [Hash] opts the optional parameters @option opts [Array<String>] :fields 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. @return [PersonEntry]
# File lib/alfresco_api/api/people_api.rb, line 515 def update_person(person_id, person_body_update, opts = {}) data, _status_code, _headers = update_person_with_http_info(person_id, person_body_update, opts) return data end
Update person Note: this endpoint is available in Alfresco 5.2 and newer versions. Update the given person's details. You can use the `-me-` string in place of `<personId>` to specify the currently authenticated user. If applicable, the given person's login access can also be optionally disabled or re-enabled. You must have admin rights to update a person — unless updating your own details. If you are changing your password, as a non-admin user, then the existing password must also be supplied (using the oldPassword field in addition to the new password value). Admin users cannot be disabled by setting enabled to false. Non-admin users may not disable themselves. You can set custom properties when you update a person: ```JSON { "firstName": "Alice", "properties": { "my:property": "The value" } } ``` Note: setting properties of type d:content and d:category are not supported. @param person_id The identifier of a person. @param person_body_update The person details. @param [Hash] opts the optional parameters @option opts [Array<String>] :fields 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. @return [Array<(PersonEntry
, Fixnum, Hash)>] PersonEntry
data, response status code and response headers
# File lib/alfresco_api/api/people_api.rb, line 527 def update_person_with_http_info(person_id, person_body_update, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: PeopleApi.update_person ..." end # verify the required parameter 'person_id' is set if @api_client.config.client_side_validation && person_id.nil? fail ArgumentError, "Missing the required parameter 'person_id' when calling PeopleApi.update_person" end # verify the required parameter 'person_body_update' is set if @api_client.config.client_side_validation && person_body_update.nil? fail ArgumentError, "Missing the required parameter 'person_body_update' when calling PeopleApi.update_person" end # resource path local_var_path = "/people/{personId}".sub('{' + 'personId' + '}', person_id.to_s) # query parameters query_params = {} query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(person_body_update) auth_names = ['basicAuth'] data, status_code, headers = @api_client.call_api(:PUT, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'PersonEntry') if @api_client.config.debugging @api_client.config.logger.debug "API called: PeopleApi#update_person\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end