Class: AlfrescoAPI::SharedlinksApi

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ SharedlinksApi

Returns a new instance of SharedlinksApi.



19
20
21
# File 'lib/alfresco_api/api/sharedlinks_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/sharedlinks_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

Create a shared link to a file Note: this endpoint is available in Alfresco 5.2 and newer versions. Create a shared link to the file nodeId in the request body. Also, an optional expiry date could be set, so the shared link would become invalid when the expiry date is reached. For example: “‘JSON { "nodeId": "1ff9da1a-ee2f-4b9c-8c34-3333333333", "expiresAt": "2017-03-23T23:00:00.000+0000" } “` Note: You can create shared links to more than one file specifying a list of **nodeId**s in the JSON body like this: “`JSON [ { "nodeId": "1ff9da1a-ee2f-4b9c-8c34-4444444444" }, { "nodeId": "1ff9da1a-ee2f-4b9c-8c34-5555555555" } ] “` 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:

  • shared_link_body_create

    The nodeId to create a shared link for.

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

    the optional parameters

Options Hash (opts):

  • :include (Array<String>)

    Returns additional information about the shared link, the following optional fields can be requested: * allowableOperations * path

  • :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:



30
31
32
33
# File 'lib/alfresco_api/api/sharedlinks_api.rb', line 30

def create_shared_link(shared_link_body_create, opts = {})
  data, _status_code, _headers = create_shared_link_with_http_info(shared_link_body_create, opts)
  return data
end

Create a shared link to a file Note: this endpoint is available in Alfresco 5.2 and newer versions. Create a shared link to the file nodeId in the request body. Also, an optional expiry date could be set, so the shared link would become invalid when the expiry date is reached. For example: &#x60;&#x60;&#x60;JSON { &quot;nodeId&quot;: &quot;1ff9da1a-ee2f-4b9c-8c34-3333333333&quot;, &quot;expiresAt&quot;: &quot;2017-03-23T23:00:00.000+0000&quot; } &#x60;&#x60;&#x60; Note: You can create shared links to more than one file specifying a list of **nodeId**s in the JSON body like this: &#x60;&#x60;&#x60;JSON [ { &quot;nodeId&quot;: &quot;1ff9da1a-ee2f-4b9c-8c34-4444444444&quot; }, { &quot;nodeId&quot;: &quot;1ff9da1a-ee2f-4b9c-8c34-5555555555&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:

  • shared_link_body_create

    The nodeId to create a shared link for.

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

    the optional parameters

Options Hash (opts):

  • :include (Array<String>)

    Returns additional information about the shared link, the following optional fields can be requested: * allowableOperations * path

  • :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<(SharedLinkEntry, Fixnum, Hash)>)

    SharedLinkEntry data, response status code and response headers



42
43
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
# File 'lib/alfresco_api/api/sharedlinks_api.rb', line 42

def create_shared_link_with_http_info(shared_link_body_create, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: SharedlinksApi.create_shared_link ..."
  end
  # verify the required parameter 'shared_link_body_create' is set
  if @api_client.config.client_side_validation && shared_link_body_create.nil?
    fail ArgumentError, "Missing the required parameter 'shared_link_body_create' when calling SharedlinksApi.create_shared_link"
  end
  # resource path
  local_var_path = "/shared-links"

  # query parameters
  query_params = {}
  query_params[:'include'] = @api_client.build_collection_param(opts[:'include'], :csv) if !opts[:'include'].nil?
  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(shared_link_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 => 'SharedLinkEntry')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: SharedlinksApi#create_shared_link\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

Deletes a shared link Note: this endpoint is available in Alfresco 5.2 and newer versions. Deletes the shared link with identifier sharedId.

Parameters:

  • shared_id

    The identifier of a shared link to a file.

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

    the optional parameters

Returns:

  • (nil)


89
90
91
92
# File 'lib/alfresco_api/api/sharedlinks_api.rb', line 89

def delete_shared_link(shared_id, opts = {})
  delete_shared_link_with_http_info(shared_id, opts)
  return nil
end

Deletes a shared link Note: this endpoint is available in Alfresco 5.2 and newer versions. Deletes the shared link with identifier sharedId.

Parameters:

  • shared_id

    The identifier of a shared link to a file.

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



99
100
101
102
103
104
105
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
# File 'lib/alfresco_api/api/sharedlinks_api.rb', line 99

def delete_shared_link_with_http_info(shared_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: SharedlinksApi.delete_shared_link ..."
  end
  # verify the required parameter 'shared_id' is set
  if @api_client.config.client_side_validation && shared_id.nil?
    fail ArgumentError, "Missing the required parameter 'shared_id' when calling SharedlinksApi.delete_shared_link"
  end
  # resource path
  local_var_path = "/shared-links/{sharedId}".sub('{' + 'sharedId' + '}', shared_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: SharedlinksApi#delete_shared_link\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

Email shared link Note: this endpoint is available in Alfresco 5.2 and newer versions. Sends email with app-specific url including identifier sharedId. The client and recipientEmails properties are mandatory in the request body. For example, to email a shared link with minimum info: “‘JSON { "client": "myClient", "recipientEmails": ["[email protected]", "[email protected]"] } “` A plain text message property can be optionally provided in the request body to customise the sent email. Also, a locale property can be optionally provided in the request body to send the emails in a particular language (if the locale is supported by Alfresco). For example, to email a shared link with a messages and a locale: “`JSON { "client": "myClient", "recipientEmails": ["[email protected]", "[email protected]"], "message": "myMessage", "locale":"en-GB" } “` Note: The client must be registered before you can send a shared link email. See [server documentation]. However, out-of-the-box share is registered as a default client, so you could pass share as the client name: “`JSON { "client": "share", "recipientEmails": ["[email protected]"] } “`

Parameters:

  • shared_id

    The identifier of a shared link to a file.

  • shared_link_body_email

    The shared link email to send.

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

    the optional parameters

Returns:

  • (nil)


144
145
146
147
# File 'lib/alfresco_api/api/sharedlinks_api.rb', line 144

def email_shared_link(shared_id, shared_link_body_email, opts = {})
  email_shared_link_with_http_info(shared_id, shared_link_body_email, opts)
  return nil
end

Email shared link Note: this endpoint is available in Alfresco 5.2 and newer versions. Sends email with app-specific url including identifier sharedId. The client and recipientEmails properties are mandatory in the request body. For example, to email a shared link with minimum info: &#x60;&#x60;&#x60;JSON { &quot;client&quot;: &quot;myClient&quot;, &quot;recipientEmails&quot;: [&quot;[email protected]&quot;, &quot;[email protected]&quot;] } &#x60;&#x60;&#x60; A plain text message property can be optionally provided in the request body to customise the sent email. Also, a locale property can be optionally provided in the request body to send the emails in a particular language (if the locale is supported by Alfresco). For example, to email a shared link with a messages and a locale: &#x60;&#x60;&#x60;JSON { &quot;client&quot;: &quot;myClient&quot;, &quot;recipientEmails&quot;: [&quot;[email protected]&quot;, &quot;[email protected]&quot;], &quot;message&quot;: &quot;myMessage&quot;, &quot;locale&quot;:&quot;en-GB&quot; } &#x60;&#x60;&#x60; Note: The client must be registered before you can send a shared link email. See [server documentation]. However, out-of-the-box share is registered as a default client, so you could pass share as the client name: &#x60;&#x60;&#x60;JSON { &quot;client&quot;: &quot;share&quot;, &quot;recipientEmails&quot;: [&quot;[email protected]&quot;] } &#x60;&#x60;&#x60;

Parameters:

  • shared_id

    The identifier of a shared link to a file.

  • shared_link_body_email

    The shared link email to send.

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
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
# File 'lib/alfresco_api/api/sharedlinks_api.rb', line 155

def email_shared_link_with_http_info(shared_id, shared_link_body_email, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: SharedlinksApi.email_shared_link ..."
  end
  # verify the required parameter 'shared_id' is set
  if @api_client.config.client_side_validation && shared_id.nil?
    fail ArgumentError, "Missing the required parameter 'shared_id' when calling SharedlinksApi.email_shared_link"
  end
  # verify the required parameter 'shared_link_body_email' is set
  if @api_client.config.client_side_validation && shared_link_body_email.nil?
    fail ArgumentError, "Missing the required parameter 'shared_link_body_email' when calling SharedlinksApi.email_shared_link"
  end
  # resource path
  local_var_path = "/shared-links/{sharedId}/email".sub('{' + 'sharedId' + '}', shared_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(shared_link_body_email)
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: SharedlinksApi#email_shared_link\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

Get a shared link Note: this endpoint is available in Alfresco 5.2 and newer versions. Gets minimal information for the file with shared link identifier sharedId. Note: No authentication is required to call this endpoint.

Parameters:

  • shared_id

    The identifier of a shared link to a file.

  • 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:



204
205
206
207
# File 'lib/alfresco_api/api/sharedlinks_api.rb', line 204

def get_shared_link(shared_id, opts = {})
  data, _status_code, _headers = get_shared_link_with_http_info(shared_id, opts)
  return data
end

Get shared link content Note: this endpoint is available in Alfresco 5.2 and newer versions. Gets the content of the file with shared link identifier sharedId. Note: No authentication is required to call this endpoint.

Parameters:

  • shared_id

    The identifier of a shared link to a file.

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

    the optional parameters

Options Hash (opts):

  • :attachment (BOOLEAN)

    true enables a web browser to download the file as an attachment. false means a web browser may preview the file in a new tab or window, but not download the file. You can only set this parameter to false if the content type of the file is in the supported list; for example, certain image files and PDF files. If the content type is not supported for preview, then a value of false is ignored, and the attachment will be returned in the response. (default to true)

  • :if_modified_since (DateTime)

    Only returns the content if it has been modified since the date provided. Use the date format defined by HTTP. For example, &#x60;Wed, 09 Mar 2016 16:56:34 GMT&#x60;.

Returns:

  • (nil)


263
264
265
266
# File 'lib/alfresco_api/api/sharedlinks_api.rb', line 263

def get_shared_link_content(shared_id, opts = {})
  get_shared_link_content_with_http_info(shared_id, opts)
  return nil
end

Get shared link content Note: this endpoint is available in Alfresco 5.2 and newer versions. Gets the content of the file with shared link identifier sharedId. Note: No authentication is required to call this endpoint.

Parameters:

  • shared_id

    The identifier of a shared link to a file.

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

    the optional parameters

Options Hash (opts):

  • :attachment (BOOLEAN)

    true enables a web browser to download the file as an attachment. false means a web browser may preview the file in a new tab or window, but not download the file. You can only set this parameter to false if the content type of the file is in the supported list; for example, certain image files and PDF files. If the content type is not supported for preview, then a value of false is ignored, and the attachment will be returned in the response.

  • :if_modified_since (DateTime)

    Only returns the content if it has been modified since the date provided. Use the date format defined by HTTP. For example, &#x60;Wed, 09 Mar 2016 16:56:34 GMT&#x60;.

Returns:

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

    nil, response status code and response headers



275
276
277
278
279
280
281
282
283
284
285
286
287
288
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
# File 'lib/alfresco_api/api/sharedlinks_api.rb', line 275

def get_shared_link_content_with_http_info(shared_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: SharedlinksApi.get_shared_link_content ..."
  end
  # verify the required parameter 'shared_id' is set
  if @api_client.config.client_side_validation && shared_id.nil?
    fail ArgumentError, "Missing the required parameter 'shared_id' when calling SharedlinksApi.get_shared_link_content"
  end
  # resource path
  local_var_path = "/shared-links/{sharedId}/content".sub('{' + 'sharedId' + '}', shared_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'attachment'] = opts[:'attachment'] if !opts[:'attachment'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
  header_params[:'If-Modified-Since'] = opts[:'if_modified_since'] if !opts[:'if_modified_since'].nil?

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: SharedlinksApi#get_shared_link_content\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

Get shared link rendition information Note: this endpoint is available in Alfresco 5.2 and newer versions. Gets rendition information for the file with shared link identifier sharedId. This API method returns rendition information where the rendition status is CREATED, which means the rendition is available to view/download. Note: No authentication is required to call this endpoint.

Parameters:

  • shared_id

    The identifier of a shared link to a file.

  • rendition_id

    The name of a thumbnail rendition, for example doclib, or pdf.

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

    the optional parameters

Returns:



322
323
324
325
# File 'lib/alfresco_api/api/sharedlinks_api.rb', line 322

def get_shared_link_rendition(shared_id, rendition_id, opts = {})
  data, _status_code, _headers = get_shared_link_rendition_with_http_info(shared_id, rendition_id, opts)
  return data
end

Get shared link rendition content Note: this endpoint is available in Alfresco 5.2 and newer versions. Gets the rendition content for file with shared link identifier sharedId. Note: No authentication is required to call this endpoint.

Parameters:

  • shared_id

    The identifier of a shared link to a file.

  • rendition_id

    The name of a thumbnail rendition, for example doclib, or pdf.

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

    the optional parameters

Options Hash (opts):

  • :attachment (BOOLEAN)

    true enables a web browser to download the file as an attachment. false means a web browser may preview the file in a new tab or window, but not download the file. You can only set this parameter to false if the content type of the file is in the supported list; for example, certain image files and PDF files. If the content type is not supported for preview, then a value of false is ignored, and the attachment will be returned in the response. (default to true)

  • :if_modified_since (DateTime)

    Only returns the content if it has been modified since the date provided. Use the date format defined by HTTP. For example, &#x60;Wed, 09 Mar 2016 16:56:34 GMT&#x60;.

Returns:

  • (nil)


385
386
387
388
# File 'lib/alfresco_api/api/sharedlinks_api.rb', line 385

def get_shared_link_rendition_content(shared_id, rendition_id, opts = {})
  get_shared_link_rendition_content_with_http_info(shared_id, rendition_id, opts)
  return nil
end

Get shared link rendition content Note: this endpoint is available in Alfresco 5.2 and newer versions. Gets the rendition content for file with shared link identifier sharedId. Note: No authentication is required to call this endpoint.

Parameters:

  • shared_id

    The identifier of a shared link to a file.

  • rendition_id

    The name of a thumbnail rendition, for example doclib, or pdf.

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

    the optional parameters

Options Hash (opts):

  • :attachment (BOOLEAN)

    true enables a web browser to download the file as an attachment. false means a web browser may preview the file in a new tab or window, but not download the file. You can only set this parameter to false if the content type of the file is in the supported list; for example, certain image files and PDF files. If the content type is not supported for preview, then a value of false is ignored, and the attachment will be returned in the response.

  • :if_modified_since (DateTime)

    Only returns the content if it has been modified since the date provided. Use the date format defined by HTTP. For example, &#x60;Wed, 09 Mar 2016 16:56:34 GMT&#x60;.

Returns:

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

    nil, response status code and response headers



398
399
400
401
402
403
404
405
406
407
408
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
# File 'lib/alfresco_api/api/sharedlinks_api.rb', line 398

def get_shared_link_rendition_content_with_http_info(shared_id, rendition_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: SharedlinksApi.get_shared_link_rendition_content ..."
  end
  # verify the required parameter 'shared_id' is set
  if @api_client.config.client_side_validation && shared_id.nil?
    fail ArgumentError, "Missing the required parameter 'shared_id' when calling SharedlinksApi.get_shared_link_rendition_content"
  end
  # verify the required parameter 'rendition_id' is set
  if @api_client.config.client_side_validation && rendition_id.nil?
    fail ArgumentError, "Missing the required parameter 'rendition_id' when calling SharedlinksApi.get_shared_link_rendition_content"
  end
  # resource path
  local_var_path = "/shared-links/{sharedId}/renditions/{renditionId}/content".sub('{' + 'sharedId' + '}', shared_id.to_s).sub('{' + 'renditionId' + '}', rendition_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'attachment'] = opts[:'attachment'] if !opts[:'attachment'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
  header_params[:'If-Modified-Since'] = opts[:'if_modified_since'] if !opts[:'if_modified_since'].nil?

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: SharedlinksApi#get_shared_link_rendition_content\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

Get shared link rendition information Note: this endpoint is available in Alfresco 5.2 and newer versions. Gets rendition information for the file with shared link identifier sharedId. This API method returns rendition information where the rendition status is CREATED, which means the rendition is available to view/download. Note: No authentication is required to call this endpoint.

Parameters:

  • shared_id

    The identifier of a shared link to a file.

  • rendition_id

    The name of a thumbnail rendition, for example doclib, or pdf.

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

    the optional parameters

Returns:

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

    RenditionEntry data, response status code and response headers



333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
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
# File 'lib/alfresco_api/api/sharedlinks_api.rb', line 333

def get_shared_link_rendition_with_http_info(shared_id, rendition_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: SharedlinksApi.get_shared_link_rendition ..."
  end
  # verify the required parameter 'shared_id' is set
  if @api_client.config.client_side_validation && shared_id.nil?
    fail ArgumentError, "Missing the required parameter 'shared_id' when calling SharedlinksApi.get_shared_link_rendition"
  end
  # verify the required parameter 'rendition_id' is set
  if @api_client.config.client_side_validation && rendition_id.nil?
    fail ArgumentError, "Missing the required parameter 'rendition_id' when calling SharedlinksApi.get_shared_link_rendition"
  end
  # resource path
  local_var_path = "/shared-links/{sharedId}/renditions/{renditionId}".sub('{' + 'sharedId' + '}', shared_id.to_s).sub('{' + 'renditionId' + '}', rendition_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 => 'RenditionEntry')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: SharedlinksApi#get_shared_link_rendition\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

Get a shared link Note: this endpoint is available in Alfresco 5.2 and newer versions. Gets minimal information for the file with shared link identifier sharedId. Note: No authentication is required to call this endpoint.

Parameters:

  • shared_id

    The identifier of a shared link to a file.

  • 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<(SharedLinkEntry, Fixnum, Hash)>)

    SharedLinkEntry data, response status code and response headers



215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
# File 'lib/alfresco_api/api/sharedlinks_api.rb', line 215

def get_shared_link_with_http_info(shared_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: SharedlinksApi.get_shared_link ..."
  end
  # verify the required parameter 'shared_id' is set
  if @api_client.config.client_side_validation && shared_id.nil?
    fail ArgumentError, "Missing the required parameter 'shared_id' when calling SharedlinksApi.get_shared_link"
  end
  # resource path
  local_var_path = "/shared-links/{sharedId}".sub('{' + 'sharedId' + '}', shared_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 => 'SharedLinkEntry')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: SharedlinksApi#get_shared_link\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

List renditions for a shared link Note: this endpoint is available in Alfresco 5.2 and newer versions. Gets a list of the rendition information for the file with shared link identifier sharedId. This API method returns rendition information, including the rendition id, for each rendition where the rendition status is CREATED, which means the rendition is available to view/download. Note: No authentication is required to call this endpoint.

Parameters:

  • shared_id

    The identifier of a shared link to a file.

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

    the optional parameters

Returns:



448
449
450
451
# File 'lib/alfresco_api/api/sharedlinks_api.rb', line 448

def list_shared_link_renditions(shared_id, opts = {})
  data, _status_code, _headers = list_shared_link_renditions_with_http_info(shared_id, opts)
  return data
end

List renditions for a shared link Note: this endpoint is available in Alfresco 5.2 and newer versions. Gets a list of the rendition information for the file with shared link identifier sharedId. This API method returns rendition information, including the rendition id, for each rendition where the rendition status is CREATED, which means the rendition is available to view/download. Note: No authentication is required to call this endpoint.

Parameters:

  • shared_id

    The identifier of a shared link to a file.

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

    the optional parameters

Returns:

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

    RenditionPaging data, response status code and response headers



458
459
460
461
462
463
464
465
466
467
468
469
470
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
# File 'lib/alfresco_api/api/sharedlinks_api.rb', line 458

def list_shared_link_renditions_with_http_info(shared_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: SharedlinksApi.list_shared_link_renditions ..."
  end
  # verify the required parameter 'shared_id' is set
  if @api_client.config.client_side_validation && shared_id.nil?
    fail ArgumentError, "Missing the required parameter 'shared_id' when calling SharedlinksApi.list_shared_link_renditions"
  end
  # resource path
  local_var_path = "/shared-links/{sharedId}/renditions".sub('{' + 'sharedId' + '}', shared_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 => 'RenditionPaging')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: SharedlinksApi#list_shared_link_renditions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

List shared links Note: this endpoint is available in Alfresco 5.2 and newer versions. Get a list of links that the current user has read permission on source node. The list is ordered in descending modified order. Note: The list of links is eventually consistent so newly created shared links may not appear immediately.

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)

  • :where (String)

    Optionally filter the list by &quot;sharedByUser&quot; userid of person who shared the link (can also use -me-) * &#x60;&#x60;&#x60;where&#x3D;(sharedByUser&#x3D;&#39;jbloggs&#39;)&#x60;&#x60;&#x60; * &#x60;&#x60;&#x60;where&#x3D;(sharedByUser&#x3D;&#39;-me-&#39;)&#x60;&#x60;&#x60;

  • :include (Array<String>)

    Returns additional information about the shared link, the following optional fields can be requested: * allowableOperations * path

  • :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:



507
508
509
510
# File 'lib/alfresco_api/api/sharedlinks_api.rb', line 507

def list_shared_links(opts = {})
  data, _status_code, _headers = list_shared_links_with_http_info(opts)
  return data
end

List shared links Note: this endpoint is available in Alfresco 5.2 and newer versions. Get a list of links that the current user has read permission on source node. The list is ordered in descending modified order. Note: The list of links is eventually consistent so newly created shared links may not appear immediately.

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.

  • :where (String)

    Optionally filter the list by &quot;sharedByUser&quot; userid of person who shared the link (can also use -me-) * &#x60;&#x60;&#x60;where&#x3D;(sharedByUser&#x3D;&#39;jbloggs&#39;)&#x60;&#x60;&#x60; * &#x60;&#x60;&#x60;where&#x3D;(sharedByUser&#x3D;&#39;-me-&#39;)&#x60;&#x60;&#x60;

  • :include (Array<String>)

    Returns additional information about the shared link, the following optional fields can be requested: * allowableOperations * path

  • :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<(SharedLinkPaging, Fixnum, Hash)>)

    SharedLinkPaging data, response status code and response headers



521
522
523
524
525
526
527
528
529
530
531
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
# File 'lib/alfresco_api/api/sharedlinks_api.rb', line 521

def list_shared_links_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: SharedlinksApi.list_shared_links ..."
  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 SharedlinksApi.list_shared_links, 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 SharedlinksApi.list_shared_links, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = "/shared-links"

  # 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[:'where'] = opts[:'where'] if !opts[:'where'].nil?
  query_params[:'include'] = @api_client.build_collection_param(opts[:'include'], :csv) if !opts[:'include'].nil?
  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'SharedLinkPaging')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: SharedlinksApi#list_shared_links\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end