class AlfrescoAPI::SitesApi
Attributes
Public Class Methods
# File lib/alfresco_api/api/sites_api.rb, line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end
Public Instance Methods
Create a site Note: this endpoint is available in Alfresco 5.2 and newer versions. Creates a default site with the given details. Unless explicitly specified, the site id will be generated from the site title. The site id must be unique and only contain alphanumeric and/or dash characters. Note: the id of a site cannot be updated once the site has been created. For example, to create a public site called "Marketing" the following body could be used: “`JSON { "title": "Marketing", "visibility": "PUBLIC" } “` The creation of the (surf) configuration files required by Share can be skipped via the skipConfiguration query parameter. Note: if skipped then such a site will not work within Share. The addition of the site to the user's site favorites can be skipped via the skipAddToFavorites query parameter. The creator will be added as a member with Site
Manager role. When you create a site, a container called documentLibrary is created for you in the new site. This container is the root folder for content stored in the site. @param site_body_create The site details @param [Hash] opts the optional parameters @option opts [BOOLEAN] :skip_configuration Flag to indicate whether the Share-specific (surf) configuration files for the site should not be created. (default to false) @option opts [BOOLEAN] :skip_add_to_favorites Flag to indicate whether the site should not be added to the user's site favorites. (default to false) @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 [SiteEntry]
# File lib/alfresco_api/api/sites_api.rb, line 31 def create_site(site_body_create, opts = {}) data, _status_code, _headers = create_site_with_http_info(site_body_create, opts) return data end
Create a site membership Creates a site membership for person personId on site siteId. You can set the role to one of four types: * SiteConsumer * SiteCollaborator * SiteContributor * SiteManager Note: You can create more than one site membership by specifying a list of people in the JSON body like this: “`JSON [ { "role": "SiteConsumer", "id": "joe" }, { "role": "SiteConsumer", "id": "fred" } ] “` If you specify a list as input, then a paginated list rather than an entry is returned in the response body. For example: “`JSON { "list": { "pagination": { "count": 2, "hasMoreItems": false, "totalItems": 2, "skipCount": 0, "maxItems": 100 }, "entries": [ { "entry": { … } }, { "entry": { … } } ] } } “` @param site_id The identifier of a site. @param site_membership_body_create The person to add and their role @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 [SiteMemberEntry]
# File lib/alfresco_api/api/sites_api.rb, line 94 def create_site_membership(site_id, site_membership_body_create, opts = {}) data, _status_code, _headers = create_site_membership_with_http_info(site_id, site_membership_body_create, opts) return data end
Create a site membership request Create a site membership request for yourself on the site with the identifier of id, specified in the JSON body. The result of the request differs depending on the type of site. * For a public site, you join the site immediately as a SiteConsumer. * For a moderated site, your request is added to the site membership request list. The request waits for approval from the Site
Manager. * You cannot request membership of a private site. Members are invited by the site administrator. You can use the `-me-` string in place of `<personId>` to specify the currently authenticated user. Note: You can create site membership requests for more than one site by specifying a list of sites in the JSON body like this: “`JSON [ { "message": "Please can you add me", "id": "test-site-1", "title": "Request for test site 1", }, { "message": "Please can you add me", "id": "test-site-2", "title": "Request for test site 2", } ] “` If you specify a list as input, then a paginated list rather than an entry is returned in the response body. For example: “`JSON { "list": { "pagination": { "count": 2, "hasMoreItems": false, "totalItems": 2, "skipCount": 0, "maxItems": 100 }, "entries": [ { "entry": { … } }, { "entry": { … } } ] } } “` @param person_id The identifier of a person. @param site_membership_request_body_create Site
membership request 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 [SiteMembershipRequestEntry]
# File lib/alfresco_api/api/sites_api.rb, line 158 def create_site_membership_request_for_person(person_id, site_membership_request_body_create, opts = {}) data, _status_code, _headers = create_site_membership_request_for_person_with_http_info(person_id, site_membership_request_body_create, opts) return data end
Create a site membership request Create a site membership request for yourself on the site with the identifier of id, specified in the JSON body. The result of the request differs depending on the type of site. * For a public site, you join the site immediately as a SiteConsumer. * For a moderated site, your request is added to the site membership request list. The request waits for approval from the Site
Manager. * You cannot request membership of a private site. Members are invited by the site administrator. You can use the `-me-` string in place of `<personId>` to specify the currently authenticated user. Note: You can create site membership requests for more than one site by specifying a list of sites in the JSON body like this: ```JSON [ { "message": "Please can you add me", "id": "test-site-1", "title": "Request for test site 1", }, { "message": "Please can you add me", "id": "test-site-2", "title": "Request for test site 2", } ] ``` If you specify a list as input, then a paginated list rather than an entry is returned in the response body. For example: ```JSON { "list": { "pagination": { "count": 2, "hasMoreItems": false, "totalItems": 2, "skipCount": 0, "maxItems": 100 }, "entries": [ { "entry": { … } }, { "entry": { … } } ] } } ``` @param person_id The identifier of a person. @param site_membership_request_body_create Site
membership request 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<(SiteMembershipRequestEntry
, Fixnum, Hash)>] SiteMembershipRequestEntry
data, response status code and response headers
# File lib/alfresco_api/api/sites_api.rb, line 170 def create_site_membership_request_for_person_with_http_info(person_id, site_membership_request_body_create, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SitesApi.create_site_membership_request_for_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 SitesApi.create_site_membership_request_for_person" end # verify the required parameter 'site_membership_request_body_create' is set if @api_client.config.client_side_validation && site_membership_request_body_create.nil? fail ArgumentError, "Missing the required parameter 'site_membership_request_body_create' when calling SitesApi.create_site_membership_request_for_person" end # resource path local_var_path = "/people/{personId}/site-membership-requests".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(site_membership_request_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 => 'SiteMembershipRequestEntry') if @api_client.config.debugging @api_client.config.logger.debug "API called: SitesApi#create_site_membership_request_for_person\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Create a site membership Creates a site membership for person personId on site siteId. You can set the role to one of four types: * SiteConsumer * SiteCollaborator * SiteContributor * SiteManager Note: You can create more than one site membership by specifying a list of people in the JSON body like this: ```JSON [ { "role": "SiteConsumer", "id": "joe" }, { "role": "SiteConsumer", "id": "fred" } ] ``` If you specify a list as input, then a paginated list rather than an entry is returned in the response body. For example: ```JSON { "list": { "pagination": { "count": 2, "hasMoreItems": false, "totalItems": 2, "skipCount": 0, "maxItems": 100 }, "entries": [ { "entry": { … } }, { "entry": { … } } ] } } ``` @param site_id The identifier of a site. @param site_membership_body_create The person to add and their role @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<(SiteMemberEntry
, Fixnum, Hash)>] SiteMemberEntry
data, response status code and response headers
# File lib/alfresco_api/api/sites_api.rb, line 106 def create_site_membership_with_http_info(site_id, site_membership_body_create, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SitesApi.create_site_membership ..." end # verify the required parameter 'site_id' is set if @api_client.config.client_side_validation && site_id.nil? fail ArgumentError, "Missing the required parameter 'site_id' when calling SitesApi.create_site_membership" end # verify the required parameter 'site_membership_body_create' is set if @api_client.config.client_side_validation && site_membership_body_create.nil? fail ArgumentError, "Missing the required parameter 'site_membership_body_create' when calling SitesApi.create_site_membership" end # resource path local_var_path = "/sites/{siteId}/members".sub('{' + 'siteId' + '}', site_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(site_membership_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 => 'SiteMemberEntry') if @api_client.config.debugging @api_client.config.logger.debug "API called: SitesApi#create_site_membership\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Create a site Note: this endpoint is available in Alfresco 5.2 and newer versions. Creates a default site with the given details. Unless explicitly specified, the site id will be generated from the site title. The site id must be unique and only contain alphanumeric and/or dash characters. Note: the id of a site cannot be updated once the site has been created. For example, to create a public site called "Marketing" the following body could be used: ```JSON { "title": "Marketing", "visibility": "PUBLIC" } ``` The creation of the (surf) configuration files required by Share can be skipped via the skipConfiguration query parameter. Note: if skipped then such a site will not work within Share. The addition of the site to the user's site favorites can be skipped via the skipAddToFavorites query parameter. The creator will be added as a member with Site
Manager role. When you create a site, a container called documentLibrary is created for you in the new site. This container is the root folder for content stored in the site. @param site_body_create The site details @param [Hash] opts the optional parameters @option opts [BOOLEAN] :skip_configuration Flag to indicate whether the Share-specific (surf) configuration files for the site should not be created. @option opts [BOOLEAN] :skip_add_to_favorites Flag to indicate whether the site should not be added to the user's site favorites. @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<(SiteEntry
, Fixnum, Hash)>] SiteEntry
data, response status code and response headers
# File lib/alfresco_api/api/sites_api.rb, line 44 def create_site_with_http_info(site_body_create, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SitesApi.create_site ..." end # verify the required parameter 'site_body_create' is set if @api_client.config.client_side_validation && site_body_create.nil? fail ArgumentError, "Missing the required parameter 'site_body_create' when calling SitesApi.create_site" end # resource path local_var_path = "/sites" # query parameters query_params = {} query_params[:'skipConfiguration'] = opts[:'skip_configuration'] if !opts[:'skip_configuration'].nil? query_params[:'skipAddToFavorites'] = opts[:'skip_add_to_favorites'] if !opts[:'skip_add_to_favorites'].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 = @api_client.object_to_http_body(site_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 => 'SiteEntry') if @api_client.config.debugging @api_client.config.logger.debug "API called: SitesApi#create_site\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Delete a site Note: this endpoint is available in Alfresco 5.2 and newer versions. Deletes the site with siteId. @param site_id The identifier of a site. @param [Hash] opts the optional parameters @option opts [BOOLEAN] :permanent Flag to indicate whether the site should be permanently deleted i.e. bypass the trashcan. (default to false) @return [nil]
# File lib/alfresco_api/api/sites_api.rb, line 221 def delete_site(site_id, opts = {}) delete_site_with_http_info(site_id, opts) return nil end
Delete a site membership Deletes person personId as a member of site siteId. You can use the `-me-` string in place of `<personId>` to specify the currently authenticated user. @param site_id The identifier of a site. @param person_id The identifier of a person. @param [Hash] opts the optional parameters @return [nil]
# File lib/alfresco_api/api/sites_api.rb, line 278 def delete_site_membership(site_id, person_id, opts = {}) delete_site_membership_with_http_info(site_id, person_id, opts) return nil end
Delete a site membership Deletes person personId as a member of site siteId. 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 site_id The identifier of a site. @param [Hash] opts the optional parameters @return [nil]
# File lib/alfresco_api/api/sites_api.rb, line 338 def delete_site_membership_for_person(person_id, site_id, opts = {}) delete_site_membership_for_person_with_http_info(person_id, site_id, opts) return nil end
Delete a site membership Deletes person personId as a member of site siteId. 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 site_id The identifier of a site. @param [Hash] opts the optional parameters @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
# File lib/alfresco_api/api/sites_api.rb, line 349 def delete_site_membership_for_person_with_http_info(person_id, site_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SitesApi.delete_site_membership_for_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 SitesApi.delete_site_membership_for_person" end # verify the required parameter 'site_id' is set if @api_client.config.client_side_validation && site_id.nil? fail ArgumentError, "Missing the required parameter 'site_id' when calling SitesApi.delete_site_membership_for_person" end # resource path local_var_path = "/people/{personId}/sites/{siteId}".sub('{' + 'personId' + '}', person_id.to_s).sub('{' + 'siteId' + '}', site_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: SitesApi#delete_site_membership_for_person\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Delete a site membership request Deletes the site membership request to site siteId for 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 site_id The identifier of a site. @param [Hash] opts the optional parameters @return [nil]
# File lib/alfresco_api/api/sites_api.rb, line 398 def delete_site_membership_request_for_person(person_id, site_id, opts = {}) delete_site_membership_request_for_person_with_http_info(person_id, site_id, opts) return nil end
Delete a site membership request Deletes the site membership request to site siteId for 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 site_id The identifier of a site. @param [Hash] opts the optional parameters @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
# File lib/alfresco_api/api/sites_api.rb, line 409 def delete_site_membership_request_for_person_with_http_info(person_id, site_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SitesApi.delete_site_membership_request_for_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 SitesApi.delete_site_membership_request_for_person" end # verify the required parameter 'site_id' is set if @api_client.config.client_side_validation && site_id.nil? fail ArgumentError, "Missing the required parameter 'site_id' when calling SitesApi.delete_site_membership_request_for_person" end # resource path local_var_path = "/people/{personId}/site-membership-requests/{siteId}".sub('{' + 'personId' + '}', person_id.to_s).sub('{' + 'siteId' + '}', site_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: SitesApi#delete_site_membership_request_for_person\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Delete a site membership Deletes person personId as a member of site siteId. You can use the `-me-` string in place of `<personId>` to specify the currently authenticated user. @param site_id The identifier of a site. @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/sites_api.rb, line 289 def delete_site_membership_with_http_info(site_id, person_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SitesApi.delete_site_membership ..." end # verify the required parameter 'site_id' is set if @api_client.config.client_side_validation && site_id.nil? fail ArgumentError, "Missing the required parameter 'site_id' when calling SitesApi.delete_site_membership" 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 SitesApi.delete_site_membership" end # resource path local_var_path = "/sites/{siteId}/members/{personId}".sub('{' + 'siteId' + '}', site_id.to_s).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: SitesApi#delete_site_membership\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Delete a site Note: this endpoint is available in Alfresco 5.2 and newer versions. Deletes the site with siteId. @param site_id The identifier of a site. @param [Hash] opts the optional parameters @option opts [BOOLEAN] :permanent Flag to indicate whether the site should be permanently deleted i.e. bypass the trashcan. @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
# File lib/alfresco_api/api/sites_api.rb, line 232 def delete_site_with_http_info(site_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SitesApi.delete_site ..." end # verify the required parameter 'site_id' is set if @api_client.config.client_side_validation && site_id.nil? fail ArgumentError, "Missing the required parameter 'site_id' when calling SitesApi.delete_site" end # resource path local_var_path = "/sites/{siteId}".sub('{' + 'siteId' + '}', site_id.to_s) # query parameters query_params = {} query_params[:'permanent'] = opts[:'permanent'] if !opts[:'permanent'].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(: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: SitesApi#delete_site\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Get a site Gets information for site siteId. You can use the relations parameter to include one or more related entities in a single response and so reduce network traffic. The entity types in Alfresco are organized in a tree structure. The sites entity has two children, containers and members. The following relations parameter returns all the container and member objects related to the site siteId: “` containers,members “` @param site_id The identifier of a site. @param [Hash] opts the optional parameters @option opts [Array<String>] :relations Use the relations parameter to include one or more related entities in a single response. @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 [SiteEntry]
# File lib/alfresco_api/api/sites_api.rb, line 459 def get_site(site_id, opts = {}) data, _status_code, _headers = get_site_with_http_info(site_id, opts) return data end
Get a site container Gets information on the container containerId in site siteId. @param site_id The identifier of a site. @param container_id The unique identifier of a site container. @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 [SiteContainerEntry]
# File lib/alfresco_api/api/sites_api.rb, line 520 def get_site_container(site_id, container_id, opts = {}) data, _status_code, _headers = get_site_container_with_http_info(site_id, container_id, opts) return data end
Get a site container Gets information on the container containerId in site siteId. @param site_id The identifier of a site. @param container_id The unique identifier of a site container. @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<(SiteContainerEntry
, Fixnum, Hash)>] SiteContainerEntry
data, response status code and response headers
# File lib/alfresco_api/api/sites_api.rb, line 532 def get_site_container_with_http_info(site_id, container_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SitesApi.get_site_container ..." end # verify the required parameter 'site_id' is set if @api_client.config.client_side_validation && site_id.nil? fail ArgumentError, "Missing the required parameter 'site_id' when calling SitesApi.get_site_container" end # verify the required parameter 'container_id' is set if @api_client.config.client_side_validation && container_id.nil? fail ArgumentError, "Missing the required parameter 'container_id' when calling SitesApi.get_site_container" end # resource path local_var_path = "/sites/{siteId}/containers/{containerId}".sub('{' + 'siteId' + '}', site_id.to_s).sub('{' + 'containerId' + '}', container_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 => 'SiteContainerEntry') if @api_client.config.debugging @api_client.config.logger.debug "API called: SitesApi#get_site_container\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Get a site membership Gets site membership information for person personId on site siteId. You can use the `-me-` string in place of `<personId>` to specify the currently authenticated user. @param site_id The identifier of a site. @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 [SiteMemberEntry]
# File lib/alfresco_api/api/sites_api.rb, line 584 def get_site_membership(site_id, person_id, opts = {}) data, _status_code, _headers = get_site_membership_with_http_info(site_id, person_id, opts) return data end
Get a site membership Gets site membership information for person personId on site siteId. 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 site_id The identifier of a site. @param [Hash] opts the optional parameters @return [SiteRoleEntry]
# File lib/alfresco_api/api/sites_api.rb, line 647 def get_site_membership_for_person(person_id, site_id, opts = {}) data, _status_code, _headers = get_site_membership_for_person_with_http_info(person_id, site_id, opts) return data end
Get a site membership Gets site membership information for person personId on site siteId. 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 site_id The identifier of a site. @param [Hash] opts the optional parameters @return [Array<(SiteRoleEntry
, Fixnum, Hash)>] SiteRoleEntry
data, response status code and response headers
# File lib/alfresco_api/api/sites_api.rb, line 658 def get_site_membership_for_person_with_http_info(person_id, site_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SitesApi.get_site_membership_for_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 SitesApi.get_site_membership_for_person" end # verify the required parameter 'site_id' is set if @api_client.config.client_side_validation && site_id.nil? fail ArgumentError, "Missing the required parameter 'site_id' when calling SitesApi.get_site_membership_for_person" end # resource path local_var_path = "/people/{personId}/sites/{siteId}".sub('{' + 'personId' + '}', person_id.to_s).sub('{' + 'siteId' + '}', site_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(: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 => 'SiteRoleEntry') if @api_client.config.debugging @api_client.config.logger.debug "API called: SitesApi#get_site_membership_for_person\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Get a site membership request Gets the site membership request for site siteId for person personId, if one exists. 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 site_id The identifier of a site. @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 [SiteMembershipRequestEntry]
# File lib/alfresco_api/api/sites_api.rb, line 709 def get_site_membership_request_for_person(person_id, site_id, opts = {}) data, _status_code, _headers = get_site_membership_request_for_person_with_http_info(person_id, site_id, opts) return data end
Get a site membership request Gets the site membership request for site siteId for person personId, if one exists. 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 site_id The identifier of a site. @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<(SiteMembershipRequestEntry
, Fixnum, Hash)>] SiteMembershipRequestEntry
data, response status code and response headers
# File lib/alfresco_api/api/sites_api.rb, line 721 def get_site_membership_request_for_person_with_http_info(person_id, site_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SitesApi.get_site_membership_request_for_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 SitesApi.get_site_membership_request_for_person" end # verify the required parameter 'site_id' is set if @api_client.config.client_side_validation && site_id.nil? fail ArgumentError, "Missing the required parameter 'site_id' when calling SitesApi.get_site_membership_request_for_person" end # resource path local_var_path = "/people/{personId}/site-membership-requests/{siteId}".sub('{' + 'personId' + '}', person_id.to_s).sub('{' + 'siteId' + '}', site_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 => 'SiteMembershipRequestEntry') if @api_client.config.debugging @api_client.config.logger.debug "API called: SitesApi#get_site_membership_request_for_person\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Get a site membership Gets site membership information for person personId on site siteId. You can use the `-me-` string in place of `<personId>` to specify the currently authenticated user. @param site_id The identifier of a site. @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<(SiteMemberEntry
, Fixnum, Hash)>] SiteMemberEntry
data, response status code and response headers
# File lib/alfresco_api/api/sites_api.rb, line 596 def get_site_membership_with_http_info(site_id, person_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SitesApi.get_site_membership ..." end # verify the required parameter 'site_id' is set if @api_client.config.client_side_validation && site_id.nil? fail ArgumentError, "Missing the required parameter 'site_id' when calling SitesApi.get_site_membership" 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 SitesApi.get_site_membership" end # resource path local_var_path = "/sites/{siteId}/members/{personId}".sub('{' + 'siteId' + '}', site_id.to_s).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 => 'SiteMemberEntry') if @api_client.config.debugging @api_client.config.logger.debug "API called: SitesApi#get_site_membership\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Get a site Gets information for site siteId. You can use the relations parameter to include one or more related entities in a single response and so reduce network traffic. The entity types in Alfresco are organized in a tree structure. The sites entity has two children, containers and members. The following relations parameter returns all the container and member objects related to the site siteId: ``` containers,members ``` @param site_id The identifier of a site. @param [Hash] opts the optional parameters @option opts [Array<String>] :relations Use the relations parameter to include one or more related entities in a single response. @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<(SiteEntry
, Fixnum, Hash)>] SiteEntry
data, response status code and response headers
# File lib/alfresco_api/api/sites_api.rb, line 471 def get_site_with_http_info(site_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SitesApi.get_site ..." end # verify the required parameter 'site_id' is set if @api_client.config.client_side_validation && site_id.nil? fail ArgumentError, "Missing the required parameter 'site_id' when calling SitesApi.get_site" end # resource path local_var_path = "/sites/{siteId}".sub('{' + 'siteId' + '}', site_id.to_s) # query parameters query_params = {} query_params[:'relations'] = @api_client.build_collection_param(opts[:'relations'], :csv) if !opts[:'relations'].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 => 'SiteEntry') if @api_client.config.debugging @api_client.config.logger.debug "API called: SitesApi#get_site\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
List site containers Gets a list of containers for the site siteId. @param site_id The identifier of a site. @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>] :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 [SiteContainerPaging]
# File lib/alfresco_api/api/sites_api.rb, line 774 def list_site_containers(site_id, opts = {}) data, _status_code, _headers = list_site_containers_with_http_info(site_id, opts) return data end
List site containers Gets a list of containers for the site siteId. @param site_id The identifier of a site. @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>] :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<(SiteContainerPaging
, Fixnum, Hash)>] SiteContainerPaging
data, response status code and response headers
# File lib/alfresco_api/api/sites_api.rb, line 787 def list_site_containers_with_http_info(site_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SitesApi.list_site_containers ..." end # verify the required parameter 'site_id' is set if @api_client.config.client_side_validation && site_id.nil? fail ArgumentError, "Missing the required parameter 'site_id' when calling SitesApi.list_site_containers" 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 SitesApi.list_site_containers, 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 SitesApi.list_site_containers, must be greater than or equal to 1.' end # resource path local_var_path = "/sites/{siteId}/containers".sub('{' + 'siteId' + '}', site_id.to_s) # 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[:'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 => 'SiteContainerPaging') if @api_client.config.debugging @api_client.config.logger.debug "API called: SitesApi#list_site_containers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
List site membership requests Gets a list of the current site membership requests for 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 [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>] :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 [SiteMembershipRequestPaging]
# File lib/alfresco_api/api/sites_api.rb, line 846 def list_site_membership_requests_for_person(person_id, opts = {}) data, _status_code, _headers = list_site_membership_requests_for_person_with_http_info(person_id, opts) return data end
List site membership requests Gets a list of the current site membership requests for 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 [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>] :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<(SiteMembershipRequestPaging
, Fixnum, Hash)>] SiteMembershipRequestPaging
data, response status code and response headers
# File lib/alfresco_api/api/sites_api.rb, line 859 def list_site_membership_requests_for_person_with_http_info(person_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SitesApi.list_site_membership_requests_for_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 SitesApi.list_site_membership_requests_for_person" 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 SitesApi.list_site_membership_requests_for_person, 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 SitesApi.list_site_membership_requests_for_person, must be greater than or equal to 1.' end # resource path local_var_path = "/people/{personId}/site-membership-requests".sub('{' + 'personId' + '}', person_id.to_s) # 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[:'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 => 'SiteMembershipRequestPaging') if @api_client.config.debugging @api_client.config.logger.debug "API called: SitesApi#list_site_membership_requests_for_person\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
List site memberships Gets a list of site memberships for site siteId. @param site_id The identifier of a site. @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>] :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 [SiteMemberPaging]
# File lib/alfresco_api/api/sites_api.rb, line 918 def list_site_memberships(site_id, opts = {}) data, _status_code, _headers = list_site_memberships_with_http_info(site_id, opts) return data end
List site memberships Gets a list of site membership information for person personId. You can use the `-me-` string in place of `<personId>` to specify the currently authenticated user. You can use the where parameter to filter the returned sites by visibility or site preset. Example to filter by visibility, use any one of: “` (visibility='PRIVATE') (visibility='PUBLIC') (visibility='MODERATED') “` Example to filter by site preset: “` (preset='site-dashboard') “` The default sort order for the returned list is for sites to be sorted by ascending title. You can override the default by using the orderBy parameter. You can specify one or more of the following fields in the orderBy parameter: * id * title * role @param person_id The identifier of a person. @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>] :relations Use the relations parameter to include one or more related entities in a single response. @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. @option opts [String] :where A string to restrict the returned objects by using a predicate. @return [SiteRolePaging]
# File lib/alfresco_api/api/sites_api.rb, line 993 def list_site_memberships_for_person(person_id, opts = {}) data, _status_code, _headers = list_site_memberships_for_person_with_http_info(person_id, opts) return data end
List site memberships Gets a list of site membership information for person personId. You can use the `-me-` string in place of `<personId>` to specify the currently authenticated user. You can use the where parameter to filter the returned sites by visibility or site preset. Example to filter by visibility, use any one of: ``` (visibility='PRIVATE') (visibility='PUBLIC') (visibility='MODERATED') ``` Example to filter by site preset: ``` (preset='site-dashboard') ``` The default sort order for the returned list is for sites to be sorted by ascending title. You can override the default by using the orderBy parameter. You can specify one or more of the following fields in the orderBy parameter: * id * title * role @param person_id The identifier of a person. @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>] :relations Use the relations parameter to include one or more related entities in a single response. @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. @option opts [String] :where A string to restrict the returned objects by using a predicate. @return [Array<(SiteRolePaging
, Fixnum, Hash)>] SiteRolePaging
data, response status code and response headers
# File lib/alfresco_api/api/sites_api.rb, line 1009 def list_site_memberships_for_person_with_http_info(person_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SitesApi.list_site_memberships_for_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 SitesApi.list_site_memberships_for_person" 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 SitesApi.list_site_memberships_for_person, 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 SitesApi.list_site_memberships_for_person, must be greater than or equal to 1.' end # resource path local_var_path = "/people/{personId}/sites".sub('{' + 'personId' + '}', person_id.to_s) # 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[:'relations'] = @api_client.build_collection_param(opts[:'relations'], :csv) if !opts[:'relations'].nil? query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil? query_params[:'where'] = opts[:'where'] if !opts[:'where'].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 => 'SiteRolePaging') if @api_client.config.debugging @api_client.config.logger.debug "API called: SitesApi#list_site_memberships_for_person\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
List site memberships Gets a list of site memberships for site siteId. @param site_id The identifier of a site. @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>] :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<(SiteMemberPaging
, Fixnum, Hash)>] SiteMemberPaging
data, response status code and response headers
# File lib/alfresco_api/api/sites_api.rb, line 931 def list_site_memberships_with_http_info(site_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SitesApi.list_site_memberships ..." end # verify the required parameter 'site_id' is set if @api_client.config.client_side_validation && site_id.nil? fail ArgumentError, "Missing the required parameter 'site_id' when calling SitesApi.list_site_memberships" 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 SitesApi.list_site_memberships, 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 SitesApi.list_site_memberships, must be greater than or equal to 1.' end # resource path local_var_path = "/sites/{siteId}/members".sub('{' + 'siteId' + '}', site_id.to_s) # 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[:'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 => 'SiteMemberPaging') if @api_client.config.debugging @api_client.config.logger.debug "API called: SitesApi#list_site_memberships\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
List sites Gets a list of sites in this repository. You can use the where parameter to filter the returned sites by visibility or site preset. Example to filter by visibility, use any one of: “` (visibility='PRIVATE') (visibility='PUBLIC') (visibility='MODERATED') “` Example to filter by site preset: “` (preset='site-dashboard') “` The default sort order for the returned list is for sites to be sorted by ascending title. You can override the default by using the orderBy parameter. You can specify one or more of the following fields in the orderBy parameter: * id * title * description You can use the relations parameter to include one or more related entities in a single response and so reduce network traffic. The entity types in Alfresco are organized in a tree structure. The sites entity has two children, containers and members. The following relations parameter returns all the container and member objects related to each site: “` containers,members “` @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>] :relations Use the relations parameter to include one or more related entities in a single response. @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. @option opts [String] :where A string to restrict the returned objects by using a predicate. @return [SitePaging]
# File lib/alfresco_api/api/sites_api.rb, line 1073 def list_sites(opts = {}) data, _status_code, _headers = list_sites_with_http_info(opts) return data end
List sites Gets a list of sites in this repository. You can use the where parameter to filter the returned sites by visibility or site preset. Example to filter by visibility, use any one of: ``` (visibility='PRIVATE') (visibility='PUBLIC') (visibility='MODERATED') ``` Example to filter by site preset: ``` (preset='site-dashboard') ``` The default sort order for the returned list is for sites to be sorted by ascending title. You can override the default by using the orderBy parameter. You can specify one or more of the following fields in the orderBy parameter: * id * title * description You can use the relations parameter to include one or more related entities in a single response and so reduce network traffic. The entity types in Alfresco are organized in a tree structure. The sites entity has two children, containers and members. The following relations parameter returns all the container and member objects related to each site: ``` containers,members ``` @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>] :relations Use the relations parameter to include one or more related entities in a single response. @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. @option opts [String] :where A string to restrict the returned objects by using a predicate. @return [Array<(SitePaging
, Fixnum, Hash)>] SitePaging
data, response status code and response headers
# File lib/alfresco_api/api/sites_api.rb, line 1088 def list_sites_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SitesApi.list_sites ..." 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 SitesApi.list_sites, 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 SitesApi.list_sites, must be greater than or equal to 1.' end # resource path local_var_path = "/sites" # 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[:'relations'] = @api_client.build_collection_param(opts[:'relations'], :csv) if !opts[:'relations'].nil? query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil? query_params[:'where'] = opts[:'where'] if !opts[:'where'].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 => 'SitePaging') if @api_client.config.debugging @api_client.config.logger.debug "API called: SitesApi#list_sites\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Update a site Note: this endpoint is available in Alfresco 5.2 and newer versions. Update the details for the given site siteId. Site
Manager or otherwise a (site) admin can update title, description or visibility. Note: the id of a site cannot be updated once the site has been created. @param site_id The identifier of a site. @param site_body_update The site information to update. @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 [SiteEntry]
# File lib/alfresco_api/api/sites_api.rb, line 1145 def update_site(site_id, site_body_update, opts = {}) data, _status_code, _headers = update_site_with_http_info(site_id, site_body_update, opts) return data end
Update a site membership Update the membership of person personId in site siteId. You can use the `-me-` string in place of `<personId>` to specify the currently authenticated user. You can set the role to one of four types: * SiteConsumer * SiteCollaborator * SiteContributor * SiteManager @param site_id The identifier of a site. @param person_id The identifier of a person. @param site_membership_body_update The persons new role @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 [SiteMemberEntry]
# File lib/alfresco_api/api/sites_api.rb, line 1210 def update_site_membership(site_id, person_id, site_membership_body_update, opts = {}) data, _status_code, _headers = update_site_membership_with_http_info(site_id, person_id, site_membership_body_update, opts) return data end
Update a site membership request Updates the message for the site membership request to site siteId for 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 site_id The identifier of a site. @param site_membership_request_body_update The new message to display @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 [SiteMembershipRequestEntry]
# File lib/alfresco_api/api/sites_api.rb, line 1280 def update_site_membership_request_for_person(person_id, site_id, site_membership_request_body_update, opts = {}) data, _status_code, _headers = update_site_membership_request_for_person_with_http_info(person_id, site_id, site_membership_request_body_update, opts) return data end
Update a site membership request Updates the message for the site membership request to site siteId for 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 site_id The identifier of a site. @param site_membership_request_body_update The new message to display @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<(SiteMembershipRequestEntry
, Fixnum, Hash)>] SiteMembershipRequestEntry
data, response status code and response headers
# File lib/alfresco_api/api/sites_api.rb, line 1293 def update_site_membership_request_for_person_with_http_info(person_id, site_id, site_membership_request_body_update, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SitesApi.update_site_membership_request_for_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 SitesApi.update_site_membership_request_for_person" end # verify the required parameter 'site_id' is set if @api_client.config.client_side_validation && site_id.nil? fail ArgumentError, "Missing the required parameter 'site_id' when calling SitesApi.update_site_membership_request_for_person" end # verify the required parameter 'site_membership_request_body_update' is set if @api_client.config.client_side_validation && site_membership_request_body_update.nil? fail ArgumentError, "Missing the required parameter 'site_membership_request_body_update' when calling SitesApi.update_site_membership_request_for_person" end # resource path local_var_path = "/people/{personId}/site-membership-requests/{siteId}".sub('{' + 'personId' + '}', person_id.to_s).sub('{' + 'siteId' + '}', site_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(site_membership_request_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 => 'SiteMembershipRequestEntry') if @api_client.config.debugging @api_client.config.logger.debug "API called: SitesApi#update_site_membership_request_for_person\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Update a site membership Update the membership of person personId in site siteId. You can use the `-me-` string in place of `<personId>` to specify the currently authenticated user. You can set the role to one of four types: * SiteConsumer * SiteCollaborator * SiteContributor * SiteManager @param site_id The identifier of a site. @param person_id The identifier of a person. @param site_membership_body_update The persons new role @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<(SiteMemberEntry
, Fixnum, Hash)>] SiteMemberEntry
data, response status code and response headers
# File lib/alfresco_api/api/sites_api.rb, line 1223 def update_site_membership_with_http_info(site_id, person_id, site_membership_body_update, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SitesApi.update_site_membership ..." end # verify the required parameter 'site_id' is set if @api_client.config.client_side_validation && site_id.nil? fail ArgumentError, "Missing the required parameter 'site_id' when calling SitesApi.update_site_membership" 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 SitesApi.update_site_membership" end # verify the required parameter 'site_membership_body_update' is set if @api_client.config.client_side_validation && site_membership_body_update.nil? fail ArgumentError, "Missing the required parameter 'site_membership_body_update' when calling SitesApi.update_site_membership" end # resource path local_var_path = "/sites/{siteId}/members/{personId}".sub('{' + 'siteId' + '}', site_id.to_s).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(site_membership_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 => 'SiteMemberEntry') if @api_client.config.debugging @api_client.config.logger.debug "API called: SitesApi#update_site_membership\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Update a site Note: this endpoint is available in Alfresco 5.2 and newer versions. Update the details for the given site siteId. Site
Manager or otherwise a (site) admin can update title, description or visibility. Note: the id of a site cannot be updated once the site has been created. @param site_id The identifier of a site. @param site_body_update The site information to update. @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<(SiteEntry
, Fixnum, Hash)>] SiteEntry
data, response status code and response headers
# File lib/alfresco_api/api/sites_api.rb, line 1157 def update_site_with_http_info(site_id, site_body_update, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SitesApi.update_site ..." end # verify the required parameter 'site_id' is set if @api_client.config.client_side_validation && site_id.nil? fail ArgumentError, "Missing the required parameter 'site_id' when calling SitesApi.update_site" end # verify the required parameter 'site_body_update' is set if @api_client.config.client_side_validation && site_body_update.nil? fail ArgumentError, "Missing the required parameter 'site_body_update' when calling SitesApi.update_site" end # resource path local_var_path = "/sites/{siteId}".sub('{' + 'siteId' + '}', site_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(site_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 => 'SiteEntry') if @api_client.config.debugging @api_client.config.logger.debug "API called: SitesApi#update_site\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end