class AlfrescoAPI::SharedlinksApi
Attributes
Public Class Methods
# File lib/alfresco_api/api/sharedlinks_api.rb, line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end
Public Instance Methods
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": { … } } ] } } “` @param shared_link_body_create The nodeId to create a shared link for. @param [Hash] opts the optional parameters @option opts [Array<String>] :include Returns additional information about the shared link, the following optional fields can be requested: * allowableOperations * path @option opts [Array<String>] :fields A list of field names. You can use this parameter to restrict the fields returned within a response if, for example, you want to save on overall bandwidth. The list applies to a returned individual entity or entries within a collection. If the API method also supports the include parameter, then the fields specified in the include parameter are returned in addition to those specified in the fields parameter. @return [SharedLinkEntry]
# 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: ```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": { … } } ] } } ``` @param shared_link_body_create The nodeId to create a shared link for. @param [Hash] opts the optional parameters @option opts [Array<String>] :include Returns additional information about the shared link, the following optional fields can be requested: * allowableOperations * path @option opts [Array<String>] :fields A list of field names. You can use this parameter to restrict the fields returned within a response if, for example, you want to save on overall bandwidth. The list applies to a returned individual entity or entries within a collection. If the API method also supports the include parameter, then the fields specified in the include parameter are returned in addition to those specified in the fields parameter. @return [Array<(SharedLinkEntry
, Fixnum, Hash)>] SharedLinkEntry
data, response status code and response headers
# 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. @param shared_id The identifier of a shared link to a file. @param [Hash] opts the optional parameters @return [nil]
# 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. @param shared_id The identifier of a shared link to a file. @param [Hash] opts the optional parameters @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
# 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": ["john.doe@acme.com", "joe.bloggs@acme.com"] } “` 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": ["john.doe@acme.com", "joe.bloggs@acme.com"], "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": ["john.doe@acme.com"] } “` @param shared_id The identifier of a shared link to a file. @param shared_link_body_email The shared link email to send. @param [Hash] opts the optional parameters @return [nil]
# 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: ```JSON { "client": "myClient", "recipientEmails": ["john.doe@acme.com", "joe.bloggs@acme.com"] } ``` 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": ["john.doe@acme.com", "joe.bloggs@acme.com"], "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": ["john.doe@acme.com"] } ``` @param shared_id The identifier of a shared link to a file. @param shared_link_body_email The shared link email to send. @param [Hash] opts the optional parameters @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
# 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. @param shared_id The identifier of a shared link to a file. @param [Hash] opts the optional parameters @option opts [Array<String>] :fields A list of field names. You can use this parameter to restrict the fields returned within a response if, for example, you want to save on overall bandwidth. The list applies to a returned individual entity or entries within a collection. If the API method also supports the include parameter, then the fields specified in the include parameter are returned in addition to those specified in the fields parameter. @return [SharedLinkEntry]
# 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. @param shared_id The identifier of a shared link to a file. @param [Hash] opts the optional parameters @option opts [BOOLEAN] :attachment true enables a web browser to download the file as an attachment. false means a web browser may preview the file in a new tab or window, but not download the file. You can only set this parameter to false if the content type of the file is in the supported list; for example, certain image files and PDF files. If the content type is not supported for preview, then a value of false is ignored, and the attachment will be returned in the response. (default to true) @option opts [DateTime] :if_modified_since Only returns the content if it has been modified since the date provided. Use the date format defined by HTTP. For example, `Wed, 09 Mar 2016 16:56:34 GMT`. @return [nil]
# 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. @param shared_id The identifier of a shared link to a file. @param [Hash] opts the optional parameters @option opts [BOOLEAN] :attachment true enables a web browser to download the file as an attachment. false means a web browser may preview the file in a new tab or window, but not download the file. You can only set this parameter to false if the content type of the file is in the supported list; for example, certain image files and PDF files. If the content type is not supported for preview, then a value of false is ignored, and the attachment will be returned in the response. @option opts [DateTime] :if_modified_since Only returns the content if it has been modified since the date provided. Use the date format defined by HTTP. For example, `Wed, 09 Mar 2016 16:56:34 GMT`. @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
# 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.
@param shared_id The identifier of a shared link to a file. @param rendition_id The name of a thumbnail rendition, for example doclib, or pdf. @param [Hash] opts the optional parameters @return [RenditionEntry]
# 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. @param shared_id The identifier of a shared link to a file. @param rendition_id The name of a thumbnail rendition, for example doclib, or pdf. @param [Hash] opts the optional parameters @option opts [BOOLEAN] :attachment true enables a web browser to download the file as an attachment. false means a web browser may preview the file in a new tab or window, but not download the file. You can only set this parameter to false if the content type of the file is in the supported list; for example, certain image files and PDF files. If the content type is not supported for preview, then a value of false is ignored, and the attachment will be returned in the response. (default to true) @option opts [DateTime] :if_modified_since Only returns the content if it has been modified since the date provided. Use the date format defined by HTTP. For example, `Wed, 09 Mar 2016 16:56:34 GMT`. @return [nil]
# 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. @param shared_id The identifier of a shared link to a file. @param rendition_id The name of a thumbnail rendition, for example doclib, or pdf. @param [Hash] opts the optional parameters @option opts [BOOLEAN] :attachment true enables a web browser to download the file as an attachment. false means a web browser may preview the file in a new tab or window, but not download the file. You can only set this parameter to false if the content type of the file is in the supported list; for example, certain image files and PDF files. If the content type is not supported for preview, then a value of false is ignored, and the attachment will be returned in the response. @option opts [DateTime] :if_modified_since Only returns the content if it has been modified since the date provided. Use the date format defined by HTTP. For example, `Wed, 09 Mar 2016 16:56:34 GMT`. @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
# 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.
@param shared_id The identifier of a shared link to a file. @param rendition_id The name of a thumbnail rendition, for example doclib, or pdf. @param [Hash] opts the optional parameters @return [Array<(RenditionEntry
, Fixnum, Hash)>] RenditionEntry
data, response status code and response headers
# 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. @param shared_id The identifier of a shared link to a file. @param [Hash] opts the optional parameters @option opts [Array<String>] :fields A list of field names. You can use this parameter to restrict the fields returned within a response if, for example, you want to save on overall bandwidth. The list applies to a returned individual entity or entries within a collection. If the API method also supports the include parameter, then the fields specified in the include parameter are returned in addition to those specified in the fields parameter. @return [Array<(SharedLinkEntry
, Fixnum, Hash)>] SharedLinkEntry
data, response status code and response headers
# 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.
@param shared_id The identifier of a shared link to a file. @param [Hash] opts the optional parameters @return [RenditionPaging]
# 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.
@param shared_id The identifier of a shared link to a file. @param [Hash] opts the optional parameters @return [Array<(RenditionPaging
, Fixnum, Hash)>] RenditionPaging
data, response status code and response headers
# 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. @param [Hash] opts the optional parameters @option opts [Integer] :skip_count The number of entities that exist in the collection before those included in this list. If not supplied then the default value is 0. (default to 0) @option opts [Integer] :max_items The maximum number of items to return in the list. If not supplied then the default value is 100. (default to 100) @option opts [String] :where Optionally filter the list by "sharedByUser" userid of person who shared the link (can also use -me-) * ```where=(sharedByUser='jbloggs')``` * ```where=(sharedByUser='-me-')``` @option opts [Array<String>] :include Returns additional information about the shared link, the following optional fields can be requested: * allowableOperations * path @option opts [Array<String>] :fields A list of field names. You can use this parameter to restrict the fields returned within a response if, for example, you want to save on overall bandwidth. The list applies to a returned individual entity or entries within a collection. If the API method also supports the include parameter, then the fields specified in the include parameter are returned in addition to those specified in the fields parameter. @return [SharedLinkPaging]
# 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. @param [Hash] opts the optional parameters @option opts [Integer] :skip_count The number of entities that exist in the collection before those included in this list. If not supplied then the default value is 0. @option opts [Integer] :max_items The maximum number of items to return in the list. If not supplied then the default value is 100. @option opts [String] :where Optionally filter the list by "sharedByUser" userid of person who shared the link (can also use -me-) * ```where=(sharedByUser='jbloggs')``` * ```where=(sharedByUser='-me-')``` @option opts [Array<String>] :include Returns additional information about the shared link, the following optional fields can be requested: * allowableOperations * path @option opts [Array<String>] :fields A list of field names. You can use this parameter to restrict the fields returned within a response if, for example, you want to save on overall bandwidth. The list applies to a returned individual entity or entries within a collection. If the API method also supports the include parameter, then the fields specified in the include parameter are returned in addition to those specified in the fields parameter. @return [Array<(SharedLinkPaging
, Fixnum, Hash)>] SharedLinkPaging
data, response status code and response headers
# 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