Class: AlfrescoAPI::SitesApi

Inherits:
Object
  • Object
show all
Defined in:
lib/alfresco_api/api/sites_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ SitesApi

Returns a new instance of SitesApi.



19
20
21
# File 'lib/alfresco_api/api/sites_api.rb', line 19

def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



17
18
19
# File 'lib/alfresco_api/api/sites_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#create_site(site_body_create, opts = {}) ⇒ SiteEntry

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.

Parameters:

  • site_body_create

    The site details

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :skip_configuration (BOOLEAN)

    Flag to indicate whether the Share-specific (surf) configuration files for the site should not be created. (default to false)

  • :skip_add_to_favorites (BOOLEAN)

    Flag to indicate whether the site should not be added to the user's site favorites. (default to false)

  • :fields (Array<String>)

    A list of field names. You can use this parameter to restrict the fields returned within a response if, for example, you want to save on overall bandwidth. The list applies to a returned individual entity or entries within a collection. If the API method also supports the include parameter, then the fields specified in the include parameter are returned in addition to those specified in the fields parameter.

Returns:



31
32
33
34
# 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_site_membership(site_id, site_membership_body_create, opts = {}) ⇒ SiteMemberEntry

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": { … } } ] } } “`

Parameters:

  • site_id

    The identifier of a site.

  • site_membership_body_create

    The person to add and their role

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :fields (Array<String>)

    A list of field names. You can use this parameter to restrict the fields returned within a response if, for example, you want to save on overall bandwidth. The list applies to a returned individual entity or entries within a collection. If the API method also supports the include parameter, then the fields specified in the include parameter are returned in addition to those specified in the fields parameter.

Returns:



94
95
96
97
# 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_site_membership_request_for_person(person_id, site_membership_request_body_create, opts = {}) ⇒ SiteMembershipRequestEntry

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": { … } } ] } } “`

Parameters:

  • person_id

    The identifier of a person.

  • site_membership_request_body_create

    Site membership request details

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :fields (Array<String>)

    A list of field names. You can use this parameter to restrict the fields returned within a response if, for example, you want to save on overall bandwidth. The list applies to a returned individual entity or entries within a collection. If the API method also supports the include parameter, then the fields specified in the include parameter are returned in addition to those specified in the fields parameter.

Returns:



158
159
160
161
# 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_site_membership_request_for_person_with_http_info(person_id, site_membership_request_body_create, opts = {}) ⇒ Array<(SiteMembershipRequestEntry, Fixnum, Hash)>

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 &#x60;-me-&#x60; string in place of &#x60;&lt;personId&gt;&#x60; 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: &#x60;&#x60;&#x60;JSON [ { &quot;message&quot;: &quot;Please can you add me&quot;, &quot;id&quot;: &quot;test-site-1&quot;, &quot;title&quot;: &quot;Request for test site 1&quot;, }, { &quot;message&quot;: &quot;Please can you add me&quot;, &quot;id&quot;: &quot;test-site-2&quot;, &quot;title&quot;: &quot;Request for test site 2&quot;, } ] &#x60;&#x60;&#x60; If you specify a list as input, then a paginated list rather than an entry is returned in the response body. For example: &#x60;&#x60;&#x60;JSON { &quot;list&quot;: { &quot;pagination&quot;: { &quot;count&quot;: 2, &quot;hasMoreItems&quot;: false, &quot;totalItems&quot;: 2, &quot;skipCount&quot;: 0, &quot;maxItems&quot;: 100 }, &quot;entries&quot;: [ { &quot;entry&quot;: { … } }, { &quot;entry&quot;: { … } } ] } } &#x60;&#x60;&#x60;

Parameters:

  • person_id

    The identifier of a person.

  • site_membership_request_body_create

    Site membership request details

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :fields (Array<String>)

    A list of field names. You can use this parameter to restrict the fields returned within a response if, for example, you want to save on overall bandwidth. The list applies to a returned individual entity or entries within a collection. If the API method also supports the include parameter, then the fields specified in the include parameter are returned in addition to those specified in the fields parameter.

Returns:

  • (Array<(SiteMembershipRequestEntry, Fixnum, Hash)>)

    SiteMembershipRequestEntry data, response status code and response headers



170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
# 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_site_membership_with_http_info(site_id, site_membership_body_create, opts = {}) ⇒ Array<(SiteMemberEntry, Fixnum, Hash)>

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: &#x60;&#x60;&#x60;JSON [ { &quot;role&quot;: &quot;SiteConsumer&quot;, &quot;id&quot;: &quot;joe&quot; }, { &quot;role&quot;: &quot;SiteConsumer&quot;, &quot;id&quot;: &quot;fred&quot; } ] &#x60;&#x60;&#x60; If you specify a list as input, then a paginated list rather than an entry is returned in the response body. For example: &#x60;&#x60;&#x60;JSON { &quot;list&quot;: { &quot;pagination&quot;: { &quot;count&quot;: 2, &quot;hasMoreItems&quot;: false, &quot;totalItems&quot;: 2, &quot;skipCount&quot;: 0, &quot;maxItems&quot;: 100 }, &quot;entries&quot;: [ { &quot;entry&quot;: { … } }, { &quot;entry&quot;: { … } } ] } } &#x60;&#x60;&#x60;

Parameters:

  • site_id

    The identifier of a site.

  • site_membership_body_create

    The person to add and their role

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :fields (Array<String>)

    A list of field names. You can use this parameter to restrict the fields returned within a response if, for example, you want to save on overall bandwidth. The list applies to a returned individual entity or entries within a collection. If the API method also supports the include parameter, then the fields specified in the include parameter are returned in addition to those specified in the fields parameter.

Returns:

  • (Array<(SiteMemberEntry, Fixnum, Hash)>)

    SiteMemberEntry data, response status code and response headers



106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
# 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_site_with_http_info(site_body_create, opts = {}) ⇒ Array<(SiteEntry, Fixnum, Hash)>

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 &quot;Marketing&quot; the following body could be used: &#x60;&#x60;&#x60;JSON { &quot;title&quot;: &quot;Marketing&quot;, &quot;visibility&quot;: &quot;PUBLIC&quot; } &#x60;&#x60;&#x60; 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&#39;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.

Parameters:

  • site_body_create

    The site details

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :skip_configuration (BOOLEAN)

    Flag to indicate whether the Share-specific (surf) configuration files for the site should not be created.

  • :skip_add_to_favorites (BOOLEAN)

    Flag to indicate whether the site should not be added to the user&#39;s site favorites.

  • :fields (Array<String>)

    A list of field names. You can use this parameter to restrict the fields returned within a response if, for example, you want to save on overall bandwidth. The list applies to a returned individual entity or entries within a collection. If the API method also supports the include parameter, then the fields specified in the include parameter are returned in addition to those specified in the fields parameter.

Returns:

  • (Array<(SiteEntry, Fixnum, Hash)>)

    SiteEntry data, response status code and response headers



44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
# 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_site(site_id, opts = {}) ⇒ nil

Delete a site Note: this endpoint is available in Alfresco 5.2 and newer versions. Deletes the site with siteId.

Parameters:

  • site_id

    The identifier of a site.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :permanent (BOOLEAN)

    Flag to indicate whether the site should be permanently deleted i.e. bypass the trashcan. (default to false)

Returns:

  • (nil)


221
222
223
224
# 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_site_membership(site_id, person_id, opts = {}) ⇒ nil

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.

Parameters:

  • site_id

    The identifier of a site.

  • person_id

    The identifier of a person.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


278
279
280
281
# 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_site_membership_for_person(person_id, site_id, opts = {}) ⇒ nil

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.

Parameters:

  • person_id

    The identifier of a person.

  • site_id

    The identifier of a site.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


338
339
340
341
# 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_site_membership_for_person_with_http_info(person_id, site_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Delete a site membership Deletes person personId as a member of site siteId. You can use the &#x60;-me-&#x60; string in place of &#x60;&lt;personId&gt;&#x60; to specify the currently authenticated user.

Parameters:

  • person_id

    The identifier of a person.

  • site_id

    The identifier of a site.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Fixnum, Hash)>)

    nil, response status code and response headers



349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
# 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_site_membership_request_for_person(person_id, site_id, opts = {}) ⇒ nil

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.

Parameters:

  • person_id

    The identifier of a person.

  • site_id

    The identifier of a site.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


398
399
400
401
# 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_site_membership_request_for_person_with_http_info(person_id, site_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Delete a site membership request Deletes the site membership request to site siteId for person personId. You can use the &#x60;-me-&#x60; string in place of &#x60;&lt;personId&gt;&#x60; to specify the currently authenticated user.

Parameters:

  • person_id

    The identifier of a person.

  • site_id

    The identifier of a site.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Fixnum, Hash)>)

    nil, response status code and response headers



409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
# 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_site_membership_with_http_info(site_id, person_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Delete a site membership Deletes person personId as a member of site siteId. You can use the &#x60;-me-&#x60; string in place of &#x60;&lt;personId&gt;&#x60; to specify the currently authenticated user.

Parameters:

  • site_id

    The identifier of a site.

  • person_id

    The identifier of a person.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Fixnum, Hash)>)

    nil, response status code and response headers



289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
# 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_site_with_http_info(site_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Delete a site Note: this endpoint is available in Alfresco 5.2 and newer versions. Deletes the site with siteId.

Parameters:

  • site_id

    The identifier of a site.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :permanent (BOOLEAN)

    Flag to indicate whether the site should be permanently deleted i.e. bypass the trashcan.

Returns:

  • (Array<(nil, Fixnum, Hash)>)

    nil, response status code and response headers



232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
# 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_site(site_id, opts = {}) ⇒ SiteEntry

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 “`

Parameters:

  • site_id

    The identifier of a site.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :relations (Array<String>)

    Use the relations parameter to include one or more related entities in a single response.

  • :fields (Array<String>)

    A list of field names. You can use this parameter to restrict the fields returned within a response if, for example, you want to save on overall bandwidth. The list applies to a returned individual entity or entries within a collection. If the API method also supports the include parameter, then the fields specified in the include parameter are returned in addition to those specified in the fields parameter.

Returns:



459
460
461
462
# 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_site_container(site_id, container_id, opts = {}) ⇒ SiteContainerEntry

Get a site container Gets information on the container containerId in site siteId.

Parameters:

  • site_id

    The identifier of a site.

  • container_id

    The unique identifier of a site container.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :fields (Array<String>)

    A list of field names. You can use this parameter to restrict the fields returned within a response if, for example, you want to save on overall bandwidth. The list applies to a returned individual entity or entries within a collection. If the API method also supports the include parameter, then the fields specified in the include parameter are returned in addition to those specified in the fields parameter.

Returns:



520
521
522
523
# 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_site_container_with_http_info(site_id, container_id, opts = {}) ⇒ Array<(SiteContainerEntry, Fixnum, Hash)>

Get a site container Gets information on the container containerId in site siteId.

Parameters:

  • site_id

    The identifier of a site.

  • container_id

    The unique identifier of a site container.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :fields (Array<String>)

    A list of field names. You can use this parameter to restrict the fields returned within a response if, for example, you want to save on overall bandwidth. The list applies to a returned individual entity or entries within a collection. If the API method also supports the include parameter, then the fields specified in the include parameter are returned in addition to those specified in the fields parameter.

Returns:

  • (Array<(SiteContainerEntry, Fixnum, Hash)>)

    SiteContainerEntry data, response status code and response headers



532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
# 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_site_membership(site_id, person_id, opts = {}) ⇒ SiteMemberEntry

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.

Parameters:

  • site_id

    The identifier of a site.

  • person_id

    The identifier of a person.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :fields (Array<String>)

    A list of field names. You can use this parameter to restrict the fields returned within a response if, for example, you want to save on overall bandwidth. The list applies to a returned individual entity or entries within a collection. If the API method also supports the include parameter, then the fields specified in the include parameter are returned in addition to those specified in the fields parameter.

Returns:



584
585
586
587
# 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_site_membership_for_person(person_id, site_id, opts = {}) ⇒ SiteRoleEntry

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.

Parameters:

  • person_id

    The identifier of a person.

  • site_id

    The identifier of a site.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



647
648
649
650
# 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_site_membership_for_person_with_http_info(person_id, site_id, opts = {}) ⇒ Array<(SiteRoleEntry, Fixnum, Hash)>

Get a site membership Gets site membership information for person personId on site siteId. You can use the &#x60;-me-&#x60; string in place of &#x60;&lt;personId&gt;&#x60; to specify the currently authenticated user.

Parameters:

  • person_id

    The identifier of a person.

  • site_id

    The identifier of a site.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(SiteRoleEntry, Fixnum, Hash)>)

    SiteRoleEntry data, response status code and response headers



658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
# 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_site_membership_request_for_person(person_id, site_id, opts = {}) ⇒ SiteMembershipRequestEntry

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.

Parameters:

  • person_id

    The identifier of a person.

  • site_id

    The identifier of a site.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :fields (Array<String>)

    A list of field names. You can use this parameter to restrict the fields returned within a response if, for example, you want to save on overall bandwidth. The list applies to a returned individual entity or entries within a collection. If the API method also supports the include parameter, then the fields specified in the include parameter are returned in addition to those specified in the fields parameter.

Returns:



709
710
711
712
# 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_site_membership_request_for_person_with_http_info(person_id, site_id, opts = {}) ⇒ Array<(SiteMembershipRequestEntry, Fixnum, Hash)>

Get a site membership request Gets the site membership request for site siteId for person personId, if one exists. You can use the &#x60;-me-&#x60; string in place of &#x60;&lt;personId&gt;&#x60; to specify the currently authenticated user.

Parameters:

  • person_id

    The identifier of a person.

  • site_id

    The identifier of a site.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :fields (Array<String>)

    A list of field names. You can use this parameter to restrict the fields returned within a response if, for example, you want to save on overall bandwidth. The list applies to a returned individual entity or entries within a collection. If the API method also supports the include parameter, then the fields specified in the include parameter are returned in addition to those specified in the fields parameter.

Returns:

  • (Array<(SiteMembershipRequestEntry, Fixnum, Hash)>)

    SiteMembershipRequestEntry data, response status code and response headers



721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
# 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_site_membership_with_http_info(site_id, person_id, opts = {}) ⇒ Array<(SiteMemberEntry, Fixnum, Hash)>

Get a site membership Gets site membership information for person personId on site siteId. You can use the &#x60;-me-&#x60; string in place of &#x60;&lt;personId&gt;&#x60; to specify the currently authenticated user.

Parameters:

  • site_id

    The identifier of a site.

  • person_id

    The identifier of a person.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :fields (Array<String>)

    A list of field names. You can use this parameter to restrict the fields returned within a response if, for example, you want to save on overall bandwidth. The list applies to a returned individual entity or entries within a collection. If the API method also supports the include parameter, then the fields specified in the include parameter are returned in addition to those specified in the fields parameter.

Returns:

  • (Array<(SiteMemberEntry, Fixnum, Hash)>)

    SiteMemberEntry data, response status code and response headers



596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
# 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_site_with_http_info(site_id, opts = {}) ⇒ Array<(SiteEntry, Fixnum, Hash)>

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: &#x60;&#x60;&#x60; containers,members &#x60;&#x60;&#x60;

Parameters:

  • site_id

    The identifier of a site.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :relations (Array<String>)

    Use the relations parameter to include one or more related entities in a single response.

  • :fields (Array<String>)

    A list of field names. You can use this parameter to restrict the fields returned within a response if, for example, you want to save on overall bandwidth. The list applies to a returned individual entity or entries within a collection. If the API method also supports the include parameter, then the fields specified in the include parameter are returned in addition to those specified in the fields parameter.

Returns:

  • (Array<(SiteEntry, Fixnum, Hash)>)

    SiteEntry data, response status code and response headers



471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
# 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(site_id, opts = {}) ⇒ SiteContainerPaging

List site containers Gets a list of containers for the site siteId.

Parameters:

  • site_id

    The identifier of a site.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :skip_count (Integer)

    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)

  • :max_items (Integer)

    The maximum number of items to return in the list. If not supplied then the default value is 100. (default to 100)

  • :fields (Array<String>)

    A list of field names. You can use this parameter to restrict the fields returned within a response if, for example, you want to save on overall bandwidth. The list applies to a returned individual entity or entries within a collection. If the API method also supports the include parameter, then the fields specified in the include parameter are returned in addition to those specified in the fields parameter.

Returns:



774
775
776
777
# 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_with_http_info(site_id, opts = {}) ⇒ Array<(SiteContainerPaging, Fixnum, Hash)>

List site containers Gets a list of containers for the site siteId.

Parameters:

  • site_id

    The identifier of a site.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :skip_count (Integer)

    The number of entities that exist in the collection before those included in this list. If not supplied then the default value is 0.

  • :max_items (Integer)

    The maximum number of items to return in the list. If not supplied then the default value is 100.

  • :fields (Array<String>)

    A list of field names. You can use this parameter to restrict the fields returned within a response if, for example, you want to save on overall bandwidth. The list applies to a returned individual entity or entries within a collection. If the API method also supports the include parameter, then the fields specified in the include parameter are returned in addition to those specified in the fields parameter.

Returns:

  • (Array<(SiteContainerPaging, Fixnum, Hash)>)

    SiteContainerPaging data, response status code and response headers



787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
# 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_for_person(person_id, opts = {}) ⇒ SiteMembershipRequestPaging

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.

Parameters:

  • person_id

    The identifier of a person.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :skip_count (Integer)

    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)

  • :max_items (Integer)

    The maximum number of items to return in the list. If not supplied then the default value is 100. (default to 100)

  • :fields (Array<String>)

    A list of field names. You can use this parameter to restrict the fields returned within a response if, for example, you want to save on overall bandwidth. The list applies to a returned individual entity or entries within a collection. If the API method also supports the include parameter, then the fields specified in the include parameter are returned in addition to those specified in the fields parameter.

Returns:



846
847
848
849
# 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_for_person_with_http_info(person_id, opts = {}) ⇒ Array<(SiteMembershipRequestPaging, Fixnum, Hash)>

List site membership requests Gets a list of the current site membership requests for person personId. You can use the &#x60;-me-&#x60; string in place of &#x60;&lt;personId&gt;&#x60; to specify the currently authenticated user.

Parameters:

  • person_id

    The identifier of a person.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :skip_count (Integer)

    The number of entities that exist in the collection before those included in this list. If not supplied then the default value is 0.

  • :max_items (Integer)

    The maximum number of items to return in the list. If not supplied then the default value is 100.

  • :fields (Array<String>)

    A list of field names. You can use this parameter to restrict the fields returned within a response if, for example, you want to save on overall bandwidth. The list applies to a returned individual entity or entries within a collection. If the API method also supports the include parameter, then the fields specified in the include parameter are returned in addition to those specified in the fields parameter.

Returns:



859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
# 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(site_id, opts = {}) ⇒ SiteMemberPaging

List site memberships Gets a list of site memberships for site siteId.

Parameters:

  • site_id

    The identifier of a site.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :skip_count (Integer)

    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)

  • :max_items (Integer)

    The maximum number of items to return in the list. If not supplied then the default value is 100. (default to 100)

  • :fields (Array<String>)

    A list of field names. You can use this parameter to restrict the fields returned within a response if, for example, you want to save on overall bandwidth. The list applies to a returned individual entity or entries within a collection. If the API method also supports the include parameter, then the fields specified in the include parameter are returned in addition to those specified in the fields parameter.

Returns:



918
919
920
921
# 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_for_person(person_id, opts = {}) ⇒ SiteRolePaging

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

Parameters:

  • person_id

    The identifier of a person.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :skip_count (Integer)

    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)

  • :max_items (Integer)

    The maximum number of items to return in the list. If not supplied then the default value is 100. (default to 100)

  • :order_by (Array<String>)

    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.

  • :relations (Array<String>)

    Use the relations parameter to include one or more related entities in a single response.

  • :fields (Array<String>)

    A list of field names. You can use this parameter to restrict the fields returned within a response if, for example, you want to save on overall bandwidth. The list applies to a returned individual entity or entries within a collection. If the API method also supports the include parameter, then the fields specified in the include parameter are returned in addition to those specified in the fields parameter.

  • :where (String)

    A string to restrict the returned objects by using a predicate.

Returns:



993
994
995
996
# 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_for_person_with_http_info(person_id, opts = {}) ⇒ Array<(SiteRolePaging, Fixnum, Hash)>

List site memberships Gets a list of site membership information for person personId. You can use the &#x60;-me-&#x60; string in place of &#x60;&lt;personId&gt;&#x60; 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: &#x60;&#x60;&#x60; (visibility&#x3D;&#39;PRIVATE&#39;) (visibility&#x3D;&#39;PUBLIC&#39;) (visibility&#x3D;&#39;MODERATED&#39;) &#x60;&#x60;&#x60; Example to filter by site preset: &#x60;&#x60;&#x60; (preset&#x3D;&#39;site-dashboard&#39;) &#x60;&#x60;&#x60; 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

Parameters:

  • person_id

    The identifier of a person.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :skip_count (Integer)

    The number of entities that exist in the collection before those included in this list. If not supplied then the default value is 0.

  • :max_items (Integer)

    The maximum number of items to return in the list. If not supplied then the default value is 100.

  • :order_by (Array<String>)

    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.

  • :relations (Array<String>)

    Use the relations parameter to include one or more related entities in a single response.

  • :fields (Array<String>)

    A list of field names. You can use this parameter to restrict the fields returned within a response if, for example, you want to save on overall bandwidth. The list applies to a returned individual entity or entries within a collection. If the API method also supports the include parameter, then the fields specified in the include parameter are returned in addition to those specified in the fields parameter.

  • :where (String)

    A string to restrict the returned objects by using a predicate.

Returns:

  • (Array<(SiteRolePaging, Fixnum, Hash)>)

    SiteRolePaging data, response status code and response headers



1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
# 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_with_http_info(site_id, opts = {}) ⇒ Array<(SiteMemberPaging, Fixnum, Hash)>

List site memberships Gets a list of site memberships for site siteId.

Parameters:

  • site_id

    The identifier of a site.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :skip_count (Integer)

    The number of entities that exist in the collection before those included in this list. If not supplied then the default value is 0.

  • :max_items (Integer)

    The maximum number of items to return in the list. If not supplied then the default value is 100.

  • :fields (Array<String>)

    A list of field names. You can use this parameter to restrict the fields returned within a response if, for example, you want to save on overall bandwidth. The list applies to a returned individual entity or entries within a collection. If the API method also supports the include parameter, then the fields specified in the include parameter are returned in addition to those specified in the fields parameter.

Returns:

  • (Array<(SiteMemberPaging, Fixnum, Hash)>)

    SiteMemberPaging data, response status code and response headers



931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
# 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(opts = {}) ⇒ SitePaging

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 “`

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :skip_count (Integer)

    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)

  • :max_items (Integer)

    The maximum number of items to return in the list. If not supplied then the default value is 100. (default to 100)

  • :order_by (Array<String>)

    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.

  • :relations (Array<String>)

    Use the relations parameter to include one or more related entities in a single response.

  • :fields (Array<String>)

    A list of field names. You can use this parameter to restrict the fields returned within a response if, for example, you want to save on overall bandwidth. The list applies to a returned individual entity or entries within a collection. If the API method also supports the include parameter, then the fields specified in the include parameter are returned in addition to those specified in the fields parameter.

  • :where (String)

    A string to restrict the returned objects by using a predicate.

Returns:



1073
1074
1075
1076
# 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_with_http_info(opts = {}) ⇒ Array<(SitePaging, Fixnum, Hash)>

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: &#x60;&#x60;&#x60; (visibility&#x3D;&#39;PRIVATE&#39;) (visibility&#x3D;&#39;PUBLIC&#39;) (visibility&#x3D;&#39;MODERATED&#39;) &#x60;&#x60;&#x60; Example to filter by site preset: &#x60;&#x60;&#x60; (preset&#x3D;&#39;site-dashboard&#39;) &#x60;&#x60;&#x60; 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: &#x60;&#x60;&#x60; containers,members &#x60;&#x60;&#x60;

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :skip_count (Integer)

    The number of entities that exist in the collection before those included in this list. If not supplied then the default value is 0.

  • :max_items (Integer)

    The maximum number of items to return in the list. If not supplied then the default value is 100.

  • :order_by (Array<String>)

    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.

  • :relations (Array<String>)

    Use the relations parameter to include one or more related entities in a single response.

  • :fields (Array<String>)

    A list of field names. You can use this parameter to restrict the fields returned within a response if, for example, you want to save on overall bandwidth. The list applies to a returned individual entity or entries within a collection. If the API method also supports the include parameter, then the fields specified in the include parameter are returned in addition to those specified in the fields parameter.

  • :where (String)

    A string to restrict the returned objects by using a predicate.

Returns:

  • (Array<(SitePaging, Fixnum, Hash)>)

    SitePaging data, response status code and response headers



1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
# 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_site(site_id, site_body_update, opts = {}) ⇒ SiteEntry

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.

Parameters:

  • site_id

    The identifier of a site.

  • site_body_update

    The site information to update.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :fields (Array<String>)

    A list of field names. You can use this parameter to restrict the fields returned within a response if, for example, you want to save on overall bandwidth. The list applies to a returned individual entity or entries within a collection. If the API method also supports the include parameter, then the fields specified in the include parameter are returned in addition to those specified in the fields parameter.

Returns:



1145
1146
1147
1148
# 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_site_membership(site_id, person_id, site_membership_body_update, opts = {}) ⇒ SiteMemberEntry

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

Parameters:

  • site_id

    The identifier of a site.

  • person_id

    The identifier of a person.

  • site_membership_body_update

    The persons new role

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :fields (Array<String>)

    A list of field names. You can use this parameter to restrict the fields returned within a response if, for example, you want to save on overall bandwidth. The list applies to a returned individual entity or entries within a collection. If the API method also supports the include parameter, then the fields specified in the include parameter are returned in addition to those specified in the fields parameter.

Returns:



1210
1211
1212
1213
# 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_site_membership_request_for_person(person_id, site_id, site_membership_request_body_update, opts = {}) ⇒ SiteMembershipRequestEntry

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.

Parameters:

  • person_id

    The identifier of a person.

  • site_id

    The identifier of a site.

  • site_membership_request_body_update

    The new message to display

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :fields (Array<String>)

    A list of field names. You can use this parameter to restrict the fields returned within a response if, for example, you want to save on overall bandwidth. The list applies to a returned individual entity or entries within a collection. If the API method also supports the include parameter, then the fields specified in the include parameter are returned in addition to those specified in the fields parameter.

Returns:



1280
1281
1282
1283
# 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_site_membership_request_for_person_with_http_info(person_id, site_id, site_membership_request_body_update, opts = {}) ⇒ Array<(SiteMembershipRequestEntry, Fixnum, Hash)>

Update a site membership request Updates the message for the site membership request to site siteId for person personId. You can use the &#x60;-me-&#x60; string in place of &#x60;&lt;personId&gt;&#x60; to specify the currently authenticated user.

Parameters:

  • person_id

    The identifier of a person.

  • site_id

    The identifier of a site.

  • site_membership_request_body_update

    The new message to display

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :fields (Array<String>)

    A list of field names. You can use this parameter to restrict the fields returned within a response if, for example, you want to save on overall bandwidth. The list applies to a returned individual entity or entries within a collection. If the API method also supports the include parameter, then the fields specified in the include parameter are returned in addition to those specified in the fields parameter.

Returns:

  • (Array<(SiteMembershipRequestEntry, Fixnum, Hash)>)

    SiteMembershipRequestEntry data, response status code and response headers



1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
# 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_site_membership_with_http_info(site_id, person_id, site_membership_body_update, opts = {}) ⇒ Array<(SiteMemberEntry, Fixnum, Hash)>

Update a site membership Update the membership of person personId in site siteId. You can use the &#x60;-me-&#x60; string in place of &#x60;&lt;personId&gt;&#x60; to specify the currently authenticated user. You can set the role to one of four types: * SiteConsumer * SiteCollaborator * SiteContributor * SiteManager

Parameters:

  • site_id

    The identifier of a site.

  • person_id

    The identifier of a person.

  • site_membership_body_update

    The persons new role

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :fields (Array<String>)

    A list of field names. You can use this parameter to restrict the fields returned within a response if, for example, you want to save on overall bandwidth. The list applies to a returned individual entity or entries within a collection. If the API method also supports the include parameter, then the fields specified in the include parameter are returned in addition to those specified in the fields parameter.

Returns:

  • (Array<(SiteMemberEntry, Fixnum, Hash)>)

    SiteMemberEntry data, response status code and response headers



1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
# 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_site_with_http_info(site_id, site_body_update, opts = {}) ⇒ Array<(SiteEntry, Fixnum, Hash)>

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.

Parameters:

  • site_id

    The identifier of a site.

  • site_body_update

    The site information to update.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :fields (Array<String>)

    A list of field names. You can use this parameter to restrict the fields returned within a response if, for example, you want to save on overall bandwidth. The list applies to a returned individual entity or entries within a collection. If the API method also supports the include parameter, then the fields specified in the include parameter are returned in addition to those specified in the fields parameter.

Returns:

  • (Array<(SiteEntry, Fixnum, Hash)>)

    SiteEntry data, response status code and response headers



1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
# 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