class PureCloud::ContentManagementApi
Attributes
Public Class Methods
# File lib/purecloudplatformclientv2/api/content_management_api.rb, line 23 def initialize(api_client = ApiClient.default) @api_client = api_client end
Public Instance Methods
Delete a document.
@param document_id Document
ID @param [Hash] opts the optional parameters @option opts [BOOLEAN] :override Override any lock on the document @return [nil]
# File lib/purecloudplatformclientv2/api/content_management_api.rb, line 33 def delete_contentmanagement_document(document_id, opts = {}) delete_contentmanagement_document_with_http_info(document_id, opts) return nil end
Delete a document.
@param document_id Document
ID @param [Hash] opts the optional parameters @option opts [BOOLEAN] :override Override any lock on the document @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
# File lib/purecloudplatformclientv2/api/content_management_api.rb, line 44 def delete_contentmanagement_document_with_http_info(document_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ContentManagementApi.delete_contentmanagement_document ..." end # verify the required parameter 'document_id' is set fail ArgumentError, "Missing the required parameter 'document_id' when calling ContentManagementApi.delete_contentmanagement_document" if document_id.nil? # resource path local_var_path = "/api/v2/contentmanagement/documents/{documentId}".sub('{format}','json').sub('{' + 'documentId' + '}', document_id.to_s) # query parameters query_params = {} query_params[:'override'] = opts[:'override'] if opts[:'override'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] 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: ContentManagementApi#delete_contentmanagement_document\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Cancel the command for this status
@param status_id Status ID @param [Hash] opts the optional parameters @return [nil]
# File lib/purecloudplatformclientv2/api/content_management_api.rb, line 169 def delete_contentmanagement_status_status_id(status_id, opts = {}) delete_contentmanagement_status_status_id_with_http_info(status_id, opts) return nil end
Cancel the command for this status
@param status_id Status ID @param [Hash] opts the optional parameters @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
# File lib/purecloudplatformclientv2/api/content_management_api.rb, line 179 def delete_contentmanagement_status_status_id_with_http_info(status_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ContentManagementApi.delete_contentmanagement_status_status_id ..." end # verify the required parameter 'status_id' is set fail ArgumentError, "Missing the required parameter 'status_id' when calling ContentManagementApi.delete_contentmanagement_status_status_id" if status_id.nil? # resource path local_var_path = "/api/v2/contentmanagement/status/{statusId}".sub('{format}','json').sub('{' + 'statusId' + '}', status_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] 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: ContentManagementApi#delete_contentmanagement_status_status_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Delete a workspace
@param workspace_id Workspace
ID @param [Hash] opts the optional parameters @option opts [String] :move_children_to_workspace_id New location for objects in deleted workspace. @return [nil]
# File lib/purecloudplatformclientv2/api/content_management_api.rb, line 234 def delete_contentmanagement_workspace(workspace_id, opts = {}) delete_contentmanagement_workspace_with_http_info(workspace_id, opts) return nil end
Delete a member from a workspace
@param workspace_id Workspace
ID @param member_id Member ID @param [Hash] opts the optional parameters @return [nil]
# File lib/purecloudplatformclientv2/api/content_management_api.rb, line 307 def delete_contentmanagement_workspace_member(workspace_id, member_id, opts = {}) delete_contentmanagement_workspace_member_with_http_info(workspace_id, member_id, opts) return nil end
Delete a member from a workspace
@param workspace_id Workspace
ID @param member_id Member ID @param [Hash] opts the optional parameters @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
# File lib/purecloudplatformclientv2/api/content_management_api.rb, line 318 def delete_contentmanagement_workspace_member_with_http_info(workspace_id, member_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ContentManagementApi.delete_contentmanagement_workspace_member ..." end # verify the required parameter 'workspace_id' is set fail ArgumentError, "Missing the required parameter 'workspace_id' when calling ContentManagementApi.delete_contentmanagement_workspace_member" if workspace_id.nil? # verify the required parameter 'member_id' is set fail ArgumentError, "Missing the required parameter 'member_id' when calling ContentManagementApi.delete_contentmanagement_workspace_member" if member_id.nil? # resource path local_var_path = "/api/v2/contentmanagement/workspaces/{workspaceId}/members/{memberId}".sub('{format}','json').sub('{' + 'workspaceId' + '}', workspace_id.to_s).sub('{' + 'memberId' + '}', member_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] 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: ContentManagementApi#delete_contentmanagement_workspace_member\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Delete workspace tag Delete a tag from a workspace. Will remove this tag from all documents. @param workspace_id Workspace
ID @param tag_id Tag ID @param [Hash] opts the optional parameters @return [nil]
# File lib/purecloudplatformclientv2/api/content_management_api.rb, line 381 def delete_contentmanagement_workspace_tagvalue(workspace_id, tag_id, opts = {}) delete_contentmanagement_workspace_tagvalue_with_http_info(workspace_id, tag_id, opts) return nil end
Delete workspace tag Delete a tag from a workspace. Will remove this tag from all documents. @param workspace_id Workspace
ID @param tag_id Tag ID @param [Hash] opts the optional parameters @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
# File lib/purecloudplatformclientv2/api/content_management_api.rb, line 392 def delete_contentmanagement_workspace_tagvalue_with_http_info(workspace_id, tag_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ContentManagementApi.delete_contentmanagement_workspace_tagvalue ..." end # verify the required parameter 'workspace_id' is set fail ArgumentError, "Missing the required parameter 'workspace_id' when calling ContentManagementApi.delete_contentmanagement_workspace_tagvalue" if workspace_id.nil? # verify the required parameter 'tag_id' is set fail ArgumentError, "Missing the required parameter 'tag_id' when calling ContentManagementApi.delete_contentmanagement_workspace_tagvalue" if tag_id.nil? # resource path local_var_path = "/api/v2/contentmanagement/workspaces/{workspaceId}/tagvalues/{tagId}".sub('{format}','json').sub('{' + 'workspaceId' + '}', workspace_id.to_s).sub('{' + 'tagId' + '}', tag_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] 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: ContentManagementApi#delete_contentmanagement_workspace_tagvalue\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Delete a workspace
@param workspace_id Workspace
ID @param [Hash] opts the optional parameters @option opts [String] :move_children_to_workspace_id New location for objects in deleted workspace. @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
# File lib/purecloudplatformclientv2/api/content_management_api.rb, line 245 def delete_contentmanagement_workspace_with_http_info(workspace_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ContentManagementApi.delete_contentmanagement_workspace ..." end # verify the required parameter 'workspace_id' is set fail ArgumentError, "Missing the required parameter 'workspace_id' when calling ContentManagementApi.delete_contentmanagement_workspace" if workspace_id.nil? # resource path local_var_path = "/api/v2/contentmanagement/workspaces/{workspaceId}".sub('{format}','json').sub('{' + 'workspaceId' + '}', workspace_id.to_s) # query parameters query_params = {} query_params[:'moveChildrenToWorkspaceId'] = opts[:'move_children_to_workspace_id'] if opts[:'move_children_to_workspace_id'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] 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: ContentManagementApi#delete_contentmanagement_workspace\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Get a document.
@param document_id Document
ID @param [Hash] opts the optional parameters @option opts [Array<String>] :expand Which fields, if any, to expand. @return [Document]
# File lib/purecloudplatformclientv2/api/content_management_api.rb, line 455 def get_contentmanagement_document(document_id, opts = {}) data, _status_code, _headers = get_contentmanagement_document_with_http_info(document_id, opts) return data end
Get a list of audits for a document.
@param document_id Document
ID @param [Hash] opts the optional parameters @option opts [Integer] :page_size Page
size (default to 25) @option opts [Integer] :page_number Page
number (default to 1) @option opts [String] :transaction_filter Transaction filter @option opts [String] :level level (default to USER) @option opts [String] :sort_by Sort by @option opts [String] :sort_order Sort order (default to ascending) @return [DocumentAuditEntityListing]
# File lib/purecloudplatformclientv2/api/content_management_api.rb, line 534 def get_contentmanagement_document_audits(document_id, opts = {}) data, _status_code, _headers = get_contentmanagement_document_audits_with_http_info(document_id, opts) return data end
Get a list of audits for a document.
@param document_id Document
ID @param [Hash] opts the optional parameters @option opts [Integer] :page_size Page
size @option opts [Integer] :page_number Page
number @option opts [String] :transaction_filter Transaction filter @option opts [String] :level level @option opts [String] :sort_by Sort by @option opts [String] :sort_order Sort order @return [Array<(DocumentAuditEntityListing
, Fixnum, Hash)>] DocumentAuditEntityListing
data, response status code and response headers
# File lib/purecloudplatformclientv2/api/content_management_api.rb, line 550 def get_contentmanagement_document_audits_with_http_info(document_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ContentManagementApi.get_contentmanagement_document_audits ..." end # verify the required parameter 'document_id' is set fail ArgumentError, "Missing the required parameter 'document_id' when calling ContentManagementApi.get_contentmanagement_document_audits" if document_id.nil? # resource path local_var_path = "/api/v2/contentmanagement/documents/{documentId}/audits".sub('{format}','json').sub('{' + 'documentId' + '}', document_id.to_s) # query parameters query_params = {} query_params[:'pageSize'] = opts[:'page_size'] if opts[:'page_size'] query_params[:'pageNumber'] = opts[:'page_number'] if opts[:'page_number'] query_params[:'transactionFilter'] = opts[:'transaction_filter'] if opts[:'transaction_filter'] query_params[:'level'] = opts[:'level'] if opts[:'level'] query_params[:'sortBy'] = opts[:'sort_by'] if opts[:'sort_by'] query_params[:'sortOrder'] = opts[:'sort_order'] if opts[:'sort_order'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] 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 => 'DocumentAuditEntityListing') if @api_client.config.debugging @api_client.config.logger.debug "API called: ContentManagementApi#get_contentmanagement_document_audits\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Download a document.
@param document_id Document
ID @param [Hash] opts the optional parameters @option opts [String] :disposition Request how the content will be downloaded: a file attachment or inline. Default is attachment. @option opts [String] :content_type The requested format for the specified document. If supported, the document will be returned in that format. Example contentType=audio/wav @return [DownloadResponse]
# File lib/purecloudplatformclientv2/api/content_management_api.rb, line 649 def get_contentmanagement_document_content(document_id, opts = {}) data, _status_code, _headers = get_contentmanagement_document_content_with_http_info(document_id, opts) return data end
Download a document.
@param document_id Document
ID @param [Hash] opts the optional parameters @option opts [String] :disposition Request how the content will be downloaded: a file attachment or inline. Default is attachment. @option opts [String] :content_type The requested format for the specified document. If supported, the document will be returned in that format. Example contentType=audio/wav @return [Array<(DownloadResponse
, Fixnum, Hash)>] DownloadResponse
data, response status code and response headers
# File lib/purecloudplatformclientv2/api/content_management_api.rb, line 661 def get_contentmanagement_document_content_with_http_info(document_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ContentManagementApi.get_contentmanagement_document_content ..." end # verify the required parameter 'document_id' is set fail ArgumentError, "Missing the required parameter 'document_id' when calling ContentManagementApi.get_contentmanagement_document_content" if document_id.nil? if opts[:'disposition'] && !['attachment', 'inline'].include?(opts[:'disposition']) fail ArgumentError, 'invalid value for "disposition", must be one of attachment, inline' end # resource path local_var_path = "/api/v2/contentmanagement/documents/{documentId}/content".sub('{format}','json').sub('{' + 'documentId' + '}', document_id.to_s) # query parameters query_params = {} query_params[:'disposition'] = opts[:'disposition'] if opts[:'disposition'] query_params[:'contentType'] = opts[:'content_type'] if opts[:'content_type'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] 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 => 'DownloadResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: ContentManagementApi#get_contentmanagement_document_content\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Get a document.
@param document_id Document
ID @param [Hash] opts the optional parameters @option opts [Array<String>] :expand Which fields, if any, to expand. @return [Array<(Document
, Fixnum, Hash)>] Document
data, response status code and response headers
# File lib/purecloudplatformclientv2/api/content_management_api.rb, line 466 def get_contentmanagement_document_with_http_info(document_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ContentManagementApi.get_contentmanagement_document ..." end # verify the required parameter 'document_id' is set fail ArgumentError, "Missing the required parameter 'document_id' when calling ContentManagementApi.get_contentmanagement_document" if document_id.nil? # resource path local_var_path = "/api/v2/contentmanagement/documents/{documentId}".sub('{format}','json').sub('{' + 'documentId' + '}', document_id.to_s) # query parameters query_params = {} query_params[:'expand'] = @api_client.build_collection_param(opts[:'expand'], :multi) if opts[:'expand'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] 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 => 'Document') if @api_client.config.debugging @api_client.config.logger.debug "API called: ContentManagementApi#get_contentmanagement_document\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Get a list of documents.
@param workspace_id Workspace
ID @param [Hash] opts the optional parameters @option opts [String] :name Name @option opts [Array<String>] :expand Which fields, if any, to expand. @option opts [Integer] :page_size Page
size (default to 25) @option opts [Integer] :page_number Page
number (default to 1) @option opts [String] :sort_by name or dateCreated @option opts [String] :sort_order ascending or descending (default to ascending) @return [DocumentEntityListing]
# File lib/purecloudplatformclientv2/api/content_management_api.rb, line 740 def get_contentmanagement_documents(workspace_id, opts = {}) data, _status_code, _headers = get_contentmanagement_documents_with_http_info(workspace_id, opts) return data end
Get a list of documents.
@param workspace_id Workspace
ID @param [Hash] opts the optional parameters @option opts [String] :name Name @option opts [Array<String>] :expand Which fields, if any, to expand. @option opts [Integer] :page_size Page
size @option opts [Integer] :page_number Page
number @option opts [String] :sort_by name or dateCreated @option opts [String] :sort_order ascending or descending @return [Array<(DocumentEntityListing
, Fixnum, Hash)>] DocumentEntityListing
data, response status code and response headers
# File lib/purecloudplatformclientv2/api/content_management_api.rb, line 756 def get_contentmanagement_documents_with_http_info(workspace_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ContentManagementApi.get_contentmanagement_documents ..." end # verify the required parameter 'workspace_id' is set fail ArgumentError, "Missing the required parameter 'workspace_id' when calling ContentManagementApi.get_contentmanagement_documents" if workspace_id.nil? # resource path local_var_path = "/api/v2/contentmanagement/documents".sub('{format}','json') # query parameters query_params = {} query_params[:'workspaceId'] = workspace_id query_params[:'name'] = opts[:'name'] if opts[:'name'] query_params[:'expand'] = @api_client.build_collection_param(opts[:'expand'], :multi) if opts[:'expand'] query_params[:'pageSize'] = opts[:'page_size'] if opts[:'page_size'] query_params[:'pageNumber'] = opts[:'page_number'] if opts[:'page_number'] query_params[:'sortBy'] = opts[:'sort_by'] if opts[:'sort_by'] query_params[:'sortOrder'] = opts[:'sort_order'] if opts[:'sort_order'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] 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 => 'DocumentEntityListing') if @api_client.config.debugging @api_client.config.logger.debug "API called: ContentManagementApi#get_contentmanagement_documents\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Query content
@param query_phrase Phrase tokens are ANDed together over all searchable fields @param [Hash] opts the optional parameters @option opts [Integer] :page_size Page
size (default to 25) @option opts [Integer] :page_number Page
number (default to 1) @option opts [String] :sort_by name or dateCreated (default to name) @option opts [String] :sort_order ascending or descending (default to ascending) @option opts [Array<String>] :expand Which fields, if any, to expand. @return [QueryResults]
# File lib/purecloudplatformclientv2/api/content_management_api.rb, line 859 def get_contentmanagement_query(query_phrase, opts = {}) data, _status_code, _headers = get_contentmanagement_query_with_http_info(query_phrase, opts) return data end
Query content
@param query_phrase Phrase tokens are ANDed together over all searchable fields @param [Hash] opts the optional parameters @option opts [Integer] :page_size Page
size @option opts [Integer] :page_number Page
number @option opts [String] :sort_by name or dateCreated @option opts [String] :sort_order ascending or descending @option opts [Array<String>] :expand Which fields, if any, to expand. @return [Array<(QueryResults
, Fixnum, Hash)>] QueryResults
data, response status code and response headers
# File lib/purecloudplatformclientv2/api/content_management_api.rb, line 874 def get_contentmanagement_query_with_http_info(query_phrase, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ContentManagementApi.get_contentmanagement_query ..." end # verify the required parameter 'query_phrase' is set fail ArgumentError, "Missing the required parameter 'query_phrase' when calling ContentManagementApi.get_contentmanagement_query" if query_phrase.nil? # resource path local_var_path = "/api/v2/contentmanagement/query".sub('{format}','json') # query parameters query_params = {} query_params[:'queryPhrase'] = query_phrase query_params[:'pageSize'] = opts[:'page_size'] if opts[:'page_size'] query_params[:'pageNumber'] = opts[:'page_number'] if opts[:'page_number'] query_params[:'sortBy'] = opts[:'sort_by'] if opts[:'sort_by'] query_params[:'sortOrder'] = opts[:'sort_order'] if opts[:'sort_order'] query_params[:'expand'] = @api_client.build_collection_param(opts[:'expand'], :multi) if opts[:'expand'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] 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 => 'QueryResults') if @api_client.config.debugging @api_client.config.logger.debug "API called: ContentManagementApi#get_contentmanagement_query\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Get a Security Profile
@param security_profile_id Security Profile Id @param [Hash] opts the optional parameters @return [SecurityProfile]
# File lib/purecloudplatformclientv2/api/content_management_api.rb, line 965 def get_contentmanagement_securityprofile(security_profile_id, opts = {}) data, _status_code, _headers = get_contentmanagement_securityprofile_with_http_info(security_profile_id, opts) return data end
Get a Security Profile
@param security_profile_id Security Profile Id @param [Hash] opts the optional parameters @return [Array<(SecurityProfile
, Fixnum, Hash)>] SecurityProfile
data, response status code and response headers
# File lib/purecloudplatformclientv2/api/content_management_api.rb, line 975 def get_contentmanagement_securityprofile_with_http_info(security_profile_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ContentManagementApi.get_contentmanagement_securityprofile ..." end # verify the required parameter 'security_profile_id' is set fail ArgumentError, "Missing the required parameter 'security_profile_id' when calling ContentManagementApi.get_contentmanagement_securityprofile" if security_profile_id.nil? # resource path local_var_path = "/api/v2/contentmanagement/securityprofiles/{securityProfileId}".sub('{format}','json').sub('{' + 'securityProfileId' + '}', security_profile_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] 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 => 'SecurityProfile') if @api_client.config.debugging @api_client.config.logger.debug "API called: ContentManagementApi#get_contentmanagement_securityprofile\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Get a List of Security Profiles
@param [Hash] opts the optional parameters @return [SecurityProfileEntityListing]
# File lib/purecloudplatformclientv2/api/content_management_api.rb, line 1029 def get_contentmanagement_securityprofiles(opts = {}) data, _status_code, _headers = get_contentmanagement_securityprofiles_with_http_info(opts) return data end
Get a List of Security Profiles
@param [Hash] opts the optional parameters @return [Array<(SecurityProfileEntityListing
, Fixnum, Hash)>] SecurityProfileEntityListing
data, response status code and response headers
# File lib/purecloudplatformclientv2/api/content_management_api.rb, line 1038 def get_contentmanagement_securityprofiles_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ContentManagementApi.get_contentmanagement_securityprofiles ..." end # resource path local_var_path = "/api/v2/contentmanagement/securityprofiles".sub('{format}','json') # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] 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 => 'SecurityProfileEntityListing') if @api_client.config.debugging @api_client.config.logger.debug "API called: ContentManagementApi#get_contentmanagement_securityprofiles\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Get a list of statuses for pending operations
@param [Hash] opts the optional parameters @option opts [Integer] :page_size Page
size (default to 25) @option opts [Integer] :page_number Page
number (default to 1) @return [CommandStatusEntityListing]
# File lib/purecloudplatformclientv2/api/content_management_api.rb, line 1360 def get_contentmanagement_status(opts = {}) data, _status_code, _headers = get_contentmanagement_status_with_http_info(opts) return data end
Get a status.
@param status_id Status ID @param [Hash] opts the optional parameters @return [CommandStatus]
# File lib/purecloudplatformclientv2/api/content_management_api.rb, line 1432 def get_contentmanagement_status_status_id(status_id, opts = {}) data, _status_code, _headers = get_contentmanagement_status_status_id_with_http_info(status_id, opts) return data end
Get a status.
@param status_id Status ID @param [Hash] opts the optional parameters @return [Array<(CommandStatus
, Fixnum, Hash)>] CommandStatus
data, response status code and response headers
# File lib/purecloudplatformclientv2/api/content_management_api.rb, line 1442 def get_contentmanagement_status_status_id_with_http_info(status_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ContentManagementApi.get_contentmanagement_status_status_id ..." end # verify the required parameter 'status_id' is set fail ArgumentError, "Missing the required parameter 'status_id' when calling ContentManagementApi.get_contentmanagement_status_status_id" if status_id.nil? # resource path local_var_path = "/api/v2/contentmanagement/status/{statusId}".sub('{format}','json').sub('{' + 'statusId' + '}', status_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] 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 => 'CommandStatus') if @api_client.config.debugging @api_client.config.logger.debug "API called: ContentManagementApi#get_contentmanagement_status_status_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Get a list of statuses for pending operations
@param [Hash] opts the optional parameters @option opts [Integer] :page_size Page
size @option opts [Integer] :page_number Page
number @return [Array<(CommandStatusEntityListing
, Fixnum, Hash)>] CommandStatusEntityListing
data, response status code and response headers
# File lib/purecloudplatformclientv2/api/content_management_api.rb, line 1371 def get_contentmanagement_status_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ContentManagementApi.get_contentmanagement_status ..." end # resource path local_var_path = "/api/v2/contentmanagement/status".sub('{format}','json') # query parameters query_params = {} query_params[:'pageSize'] = opts[:'page_size'] if opts[:'page_size'] query_params[:'pageNumber'] = opts[:'page_number'] if opts[:'page_number'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] 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 => 'CommandStatusEntityListing') if @api_client.config.debugging @api_client.config.logger.debug "API called: ContentManagementApi#get_contentmanagement_status\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Get usage details.
@param [Hash] opts the optional parameters @return [Usage]
# File lib/purecloudplatformclientv2/api/content_management_api.rb, line 1496 def get_contentmanagement_usage(opts = {}) data, _status_code, _headers = get_contentmanagement_usage_with_http_info(opts) return data end
Get usage details.
@param [Hash] opts the optional parameters @return [Array<(Usage
, Fixnum, Hash)>] Usage
data, response status code and response headers
# File lib/purecloudplatformclientv2/api/content_management_api.rb, line 1505 def get_contentmanagement_usage_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ContentManagementApi.get_contentmanagement_usage ..." end # resource path local_var_path = "/api/v2/contentmanagement/usage".sub('{format}','json') # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] 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 => 'Usage') if @api_client.config.debugging @api_client.config.logger.debug "API called: ContentManagementApi#get_contentmanagement_usage\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Get a workspace.
@param workspace_id Workspace
ID @param [Hash] opts the optional parameters @option opts [Array<String>] :expand Which fields, if any, to expand. @return [Workspace]
# File lib/purecloudplatformclientv2/api/content_management_api.rb, line 1553 def get_contentmanagement_workspace(workspace_id, opts = {}) data, _status_code, _headers = get_contentmanagement_workspace_with_http_info(workspace_id, opts) return data end
Get a list of documents.
@param workspace_id Workspace
ID @param [Hash] opts the optional parameters @option opts [Array<String>] :expand Which fields, if any, to expand. @option opts [Integer] :page_size Page
size (default to 25) @option opts [Integer] :page_number Page
number (default to 1) @option opts [String] :sort_by name or dateCreated @option opts [String] :sort_order ascending or descending (default to ascending) @return [DocumentEntityListing]
# File lib/purecloudplatformclientv2/api/content_management_api.rb, line 1631 def get_contentmanagement_workspace_documents(workspace_id, opts = {}) data, _status_code, _headers = get_contentmanagement_workspace_documents_with_http_info(workspace_id, opts) return data end
Get a list of documents.
@param workspace_id Workspace
ID @param [Hash] opts the optional parameters @option opts [Array<String>] :expand Which fields, if any, to expand. @option opts [Integer] :page_size Page
size @option opts [Integer] :page_number Page
number @option opts [String] :sort_by name or dateCreated @option opts [String] :sort_order ascending or descending @return [Array<(DocumentEntityListing
, Fixnum, Hash)>] DocumentEntityListing
data, response status code and response headers
# File lib/purecloudplatformclientv2/api/content_management_api.rb, line 1646 def get_contentmanagement_workspace_documents_with_http_info(workspace_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ContentManagementApi.get_contentmanagement_workspace_documents ..." end # verify the required parameter 'workspace_id' is set fail ArgumentError, "Missing the required parameter 'workspace_id' when calling ContentManagementApi.get_contentmanagement_workspace_documents" if workspace_id.nil? # resource path local_var_path = "/api/v2/contentmanagement/workspaces/{workspaceId}/documents".sub('{format}','json').sub('{' + 'workspaceId' + '}', workspace_id.to_s) # query parameters query_params = {} query_params[:'expand'] = @api_client.build_collection_param(opts[:'expand'], :multi) if opts[:'expand'] query_params[:'pageSize'] = opts[:'page_size'] if opts[:'page_size'] query_params[:'pageNumber'] = opts[:'page_number'] if opts[:'page_number'] query_params[:'sortBy'] = opts[:'sort_by'] if opts[:'sort_by'] query_params[:'sortOrder'] = opts[:'sort_order'] if opts[:'sort_order'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] 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 => 'DocumentEntityListing') if @api_client.config.debugging @api_client.config.logger.debug "API called: ContentManagementApi#get_contentmanagement_workspace_documents\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Get a workspace member
@param workspace_id Workspace
ID @param member_id Member ID @param [Hash] opts the optional parameters @option opts [Array<String>] :expand Which fields, if any, to expand. @return [WorkspaceMember]
# File lib/purecloudplatformclientv2/api/content_management_api.rb, line 1738 def get_contentmanagement_workspace_member(workspace_id, member_id, opts = {}) data, _status_code, _headers = get_contentmanagement_workspace_member_with_http_info(workspace_id, member_id, opts) return data end
Get a workspace member
@param workspace_id Workspace
ID @param member_id Member ID @param [Hash] opts the optional parameters @option opts [Array<String>] :expand Which fields, if any, to expand. @return [Array<(WorkspaceMember
, Fixnum, Hash)>] WorkspaceMember
data, response status code and response headers
# File lib/purecloudplatformclientv2/api/content_management_api.rb, line 1750 def get_contentmanagement_workspace_member_with_http_info(workspace_id, member_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ContentManagementApi.get_contentmanagement_workspace_member ..." end # verify the required parameter 'workspace_id' is set fail ArgumentError, "Missing the required parameter 'workspace_id' when calling ContentManagementApi.get_contentmanagement_workspace_member" if workspace_id.nil? # verify the required parameter 'member_id' is set fail ArgumentError, "Missing the required parameter 'member_id' when calling ContentManagementApi.get_contentmanagement_workspace_member" if member_id.nil? # resource path local_var_path = "/api/v2/contentmanagement/workspaces/{workspaceId}/members/{memberId}".sub('{format}','json').sub('{' + 'workspaceId' + '}', workspace_id.to_s).sub('{' + 'memberId' + '}', member_id.to_s) # query parameters query_params = {} query_params[:'expand'] = @api_client.build_collection_param(opts[:'expand'], :multi) if opts[:'expand'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] 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 => 'WorkspaceMember') if @api_client.config.debugging @api_client.config.logger.debug "API called: ContentManagementApi#get_contentmanagement_workspace_member\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Get a list workspace members
@param workspace_id Workspace
ID @param [Hash] opts the optional parameters @option opts [Integer] :page_size Page
size (default to 25) @option opts [Integer] :page_number Page
number (default to 1) @option opts [Array<String>] :expand Which fields, if any, to expand. @return [WorkspaceMemberEntityListing]
# File lib/purecloudplatformclientv2/api/content_management_api.rb, line 1823 def get_contentmanagement_workspace_members(workspace_id, opts = {}) data, _status_code, _headers = get_contentmanagement_workspace_members_with_http_info(workspace_id, opts) return data end
Get a list workspace members
@param workspace_id Workspace
ID @param [Hash] opts the optional parameters @option opts [Integer] :page_size Page
size @option opts [Integer] :page_number Page
number @option opts [Array<String>] :expand Which fields, if any, to expand. @return [Array<(WorkspaceMemberEntityListing
, Fixnum, Hash)>] WorkspaceMemberEntityListing
data, response status code and response headers
# File lib/purecloudplatformclientv2/api/content_management_api.rb, line 1836 def get_contentmanagement_workspace_members_with_http_info(workspace_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ContentManagementApi.get_contentmanagement_workspace_members ..." end # verify the required parameter 'workspace_id' is set fail ArgumentError, "Missing the required parameter 'workspace_id' when calling ContentManagementApi.get_contentmanagement_workspace_members" if workspace_id.nil? # resource path local_var_path = "/api/v2/contentmanagement/workspaces/{workspaceId}/members".sub('{format}','json').sub('{' + 'workspaceId' + '}', workspace_id.to_s) # query parameters query_params = {} query_params[:'pageSize'] = opts[:'page_size'] if opts[:'page_size'] query_params[:'pageNumber'] = opts[:'page_number'] if opts[:'page_number'] query_params[:'expand'] = @api_client.build_collection_param(opts[:'expand'], :multi) if opts[:'expand'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] 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 => 'WorkspaceMemberEntityListing') if @api_client.config.debugging @api_client.config.logger.debug "API called: ContentManagementApi#get_contentmanagement_workspace_members\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Get a workspace tag
@param workspace_id Workspace
ID @param tag_id Tag ID @param [Hash] opts the optional parameters @option opts [Array<String>] :expand Which fields, if any, to expand. @return [TagValue]
# File lib/purecloudplatformclientv2/api/content_management_api.rb, line 1914 def get_contentmanagement_workspace_tagvalue(workspace_id, tag_id, opts = {}) data, _status_code, _headers = get_contentmanagement_workspace_tagvalue_with_http_info(workspace_id, tag_id, opts) return data end
Get a workspace tag
@param workspace_id Workspace
ID @param tag_id Tag ID @param [Hash] opts the optional parameters @option opts [Array<String>] :expand Which fields, if any, to expand. @return [Array<(TagValue
, Fixnum, Hash)>] TagValue
data, response status code and response headers
# File lib/purecloudplatformclientv2/api/content_management_api.rb, line 1926 def get_contentmanagement_workspace_tagvalue_with_http_info(workspace_id, tag_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ContentManagementApi.get_contentmanagement_workspace_tagvalue ..." end # verify the required parameter 'workspace_id' is set fail ArgumentError, "Missing the required parameter 'workspace_id' when calling ContentManagementApi.get_contentmanagement_workspace_tagvalue" if workspace_id.nil? # verify the required parameter 'tag_id' is set fail ArgumentError, "Missing the required parameter 'tag_id' when calling ContentManagementApi.get_contentmanagement_workspace_tagvalue" if tag_id.nil? # resource path local_var_path = "/api/v2/contentmanagement/workspaces/{workspaceId}/tagvalues/{tagId}".sub('{format}','json').sub('{' + 'workspaceId' + '}', workspace_id.to_s).sub('{' + 'tagId' + '}', tag_id.to_s) # query parameters query_params = {} query_params[:'expand'] = @api_client.build_collection_param(opts[:'expand'], :multi) if opts[:'expand'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] 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 => 'TagValue') if @api_client.config.debugging @api_client.config.logger.debug "API called: ContentManagementApi#get_contentmanagement_workspace_tagvalue\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Get a list of workspace tags
@param workspace_id Workspace
ID @param [Hash] opts the optional parameters @option opts [String] :value filter the list of tags returned @option opts [Integer] :page_size Page
size (default to 25) @option opts [Integer] :page_number Page
number (default to 1) @option opts [Array<String>] :expand Which fields, if any, to expand. @return [TagValueEntityListing]
# File lib/purecloudplatformclientv2/api/content_management_api.rb, line 2000 def get_contentmanagement_workspace_tagvalues(workspace_id, opts = {}) data, _status_code, _headers = get_contentmanagement_workspace_tagvalues_with_http_info(workspace_id, opts) return data end
Get a list of workspace tags
@param workspace_id Workspace
ID @param [Hash] opts the optional parameters @option opts [String] :value filter the list of tags returned @option opts [Integer] :page_size Page
size @option opts [Integer] :page_number Page
number @option opts [Array<String>] :expand Which fields, if any, to expand. @return [Array<(TagValueEntityListing
, Fixnum, Hash)>] TagValueEntityListing
data, response status code and response headers
# File lib/purecloudplatformclientv2/api/content_management_api.rb, line 2014 def get_contentmanagement_workspace_tagvalues_with_http_info(workspace_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ContentManagementApi.get_contentmanagement_workspace_tagvalues ..." end # verify the required parameter 'workspace_id' is set fail ArgumentError, "Missing the required parameter 'workspace_id' when calling ContentManagementApi.get_contentmanagement_workspace_tagvalues" if workspace_id.nil? # resource path local_var_path = "/api/v2/contentmanagement/workspaces/{workspaceId}/tagvalues".sub('{format}','json').sub('{' + 'workspaceId' + '}', workspace_id.to_s) # query parameters query_params = {} query_params[:'value'] = opts[:'value'] if opts[:'value'] query_params[:'pageSize'] = opts[:'page_size'] if opts[:'page_size'] query_params[:'pageNumber'] = opts[:'page_number'] if opts[:'page_number'] query_params[:'expand'] = @api_client.build_collection_param(opts[:'expand'], :multi) if opts[:'expand'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] 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 => 'TagValueEntityListing') if @api_client.config.debugging @api_client.config.logger.debug "API called: ContentManagementApi#get_contentmanagement_workspace_tagvalues\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Get a workspace.
@param workspace_id Workspace
ID @param [Hash] opts the optional parameters @option opts [Array<String>] :expand Which fields, if any, to expand. @return [Array<(Workspace
, Fixnum, Hash)>] Workspace
data, response status code and response headers
# File lib/purecloudplatformclientv2/api/content_management_api.rb, line 1564 def get_contentmanagement_workspace_with_http_info(workspace_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ContentManagementApi.get_contentmanagement_workspace ..." end # verify the required parameter 'workspace_id' is set fail ArgumentError, "Missing the required parameter 'workspace_id' when calling ContentManagementApi.get_contentmanagement_workspace" if workspace_id.nil? # resource path local_var_path = "/api/v2/contentmanagement/workspaces/{workspaceId}".sub('{format}','json').sub('{' + 'workspaceId' + '}', workspace_id.to_s) # query parameters query_params = {} query_params[:'expand'] = @api_client.build_collection_param(opts[:'expand'], :multi) if opts[:'expand'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] 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 => 'Workspace') if @api_client.config.debugging @api_client.config.logger.debug "API called: ContentManagementApi#get_contentmanagement_workspace\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Get a list of workspaces. Specifying 'content' access will return all workspaces the user has document access to, while 'admin' access will return all group workspaces the user has administrative rights to. @param [Hash] opts the optional parameters @option opts [Integer] :page_size Page
size (default to 25) @option opts [Integer] :page_number Page
number (default to 1) @option opts [Array<String>] :access Requested access level. @option opts [Array<String>] :expand Which fields, if any, to expand. @return [WorkspaceEntityListing]
# File lib/purecloudplatformclientv2/api/content_management_api.rb, line 2100 def get_contentmanagement_workspaces(opts = {}) data, _status_code, _headers = get_contentmanagement_workspaces_with_http_info(opts) return data end
Get a list of workspaces. Specifying 'content' access will return all workspaces the user has document access to, while 'admin' access will return all group workspaces the user has administrative rights to. @param [Hash] opts the optional parameters @option opts [Integer] :page_size Page
size @option opts [Integer] :page_number Page
number @option opts [Array<String>] :access Requested access level. @option opts [Array<String>] :expand Which fields, if any, to expand. @return [Array<(WorkspaceEntityListing
, Fixnum, Hash)>] WorkspaceEntityListing
data, response status code and response headers
# File lib/purecloudplatformclientv2/api/content_management_api.rb, line 2113 def get_contentmanagement_workspaces_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ContentManagementApi.get_contentmanagement_workspaces ..." end # resource path local_var_path = "/api/v2/contentmanagement/workspaces".sub('{format}','json') # query parameters query_params = {} query_params[:'pageSize'] = opts[:'page_size'] if opts[:'page_size'] query_params[:'pageNumber'] = opts[:'page_number'] if opts[:'page_number'] query_params[:'access'] = @api_client.build_collection_param(opts[:'access'], :multi) if opts[:'access'] query_params[:'expand'] = @api_client.build_collection_param(opts[:'expand'], :multi) if opts[:'expand'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] 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 => 'WorkspaceEntityListing') if @api_client.config.debugging @api_client.config.logger.debug "API called: ContentManagementApi#get_contentmanagement_workspaces\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Query audits
@param body Allows for a filtered query returning facet information @param [Hash] opts the optional parameters @return [QueryResults]
# File lib/purecloudplatformclientv2/api/content_management_api.rb, line 2188 def post_contentmanagement_auditquery(body, opts = {}) data, _status_code, _headers = post_contentmanagement_auditquery_with_http_info(body, opts) return data end
Query audits
@param body Allows for a filtered query returning facet information @param [Hash] opts the optional parameters @return [Array<(QueryResults
, Fixnum, Hash)>] QueryResults
data, response status code and response headers
# File lib/purecloudplatformclientv2/api/content_management_api.rb, line 2198 def post_contentmanagement_auditquery_with_http_info(body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ContentManagementApi.post_contentmanagement_auditquery ..." end # verify the required parameter 'body' is set fail ArgumentError, "Missing the required parameter 'body' when calling ContentManagementApi.post_contentmanagement_auditquery" if body.nil? # resource path local_var_path = "/api/v2/contentmanagement/auditquery".sub('{format}','json') # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['PureCloud OAuth'] 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 => 'QueryResults') if @api_client.config.debugging @api_client.config.logger.debug "API called: ContentManagementApi#post_contentmanagement_auditquery\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Update a document.
@param document_id Document
ID @param body Document
@param [Hash] opts the optional parameters @option opts [String] :expand Expand some document fields @option opts [BOOLEAN] :override Override any lock on the document @return [Document]
# File lib/purecloudplatformclientv2/api/content_management_api.rb, line 2256 def post_contentmanagement_document(document_id, body, opts = {}) data, _status_code, _headers = post_contentmanagement_document_with_http_info(document_id, body, opts) return data end
Replace the contents of a document.
@param document_id Document
ID @param body Replace Request @param [Hash] opts the optional parameters @option opts [BOOLEAN] :override Override any lock on the document @return [ReplaceResponse]
# File lib/purecloudplatformclientv2/api/content_management_api.rb, line 2352 def post_contentmanagement_document_content(document_id, body, opts = {}) data, _status_code, _headers = post_contentmanagement_document_content_with_http_info(document_id, body, opts) return data end
Replace the contents of a document.
@param document_id Document
ID @param body Replace Request @param [Hash] opts the optional parameters @option opts [BOOLEAN] :override Override any lock on the document @return [Array<(ReplaceResponse
, Fixnum, Hash)>] ReplaceResponse
data, response status code and response headers
# File lib/purecloudplatformclientv2/api/content_management_api.rb, line 2364 def post_contentmanagement_document_content_with_http_info(document_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ContentManagementApi.post_contentmanagement_document_content ..." end # verify the required parameter 'document_id' is set fail ArgumentError, "Missing the required parameter 'document_id' when calling ContentManagementApi.post_contentmanagement_document_content" if document_id.nil? # verify the required parameter 'body' is set fail ArgumentError, "Missing the required parameter 'body' when calling ContentManagementApi.post_contentmanagement_document_content" if body.nil? # resource path local_var_path = "/api/v2/contentmanagement/documents/{documentId}/content".sub('{format}','json').sub('{' + 'documentId' + '}', document_id.to_s) # query parameters query_params = {} query_params[:'override'] = opts[:'override'] if opts[:'override'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['PureCloud OAuth'] 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 => 'ReplaceResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: ContentManagementApi#post_contentmanagement_document_content\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Update a document.
@param document_id Document
ID @param body Document
@param [Hash] opts the optional parameters @option opts [String] :expand Expand some document fields @option opts [BOOLEAN] :override Override any lock on the document @return [Array<(Document
, Fixnum, Hash)>] Document
data, response status code and response headers
# File lib/purecloudplatformclientv2/api/content_management_api.rb, line 2269 def post_contentmanagement_document_with_http_info(document_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ContentManagementApi.post_contentmanagement_document ..." end # verify the required parameter 'document_id' is set fail ArgumentError, "Missing the required parameter 'document_id' when calling ContentManagementApi.post_contentmanagement_document" if document_id.nil? # verify the required parameter 'body' is set fail ArgumentError, "Missing the required parameter 'body' when calling ContentManagementApi.post_contentmanagement_document" if body.nil? if opts[:'expand'] && !['acl'].include?(opts[:'expand']) fail ArgumentError, 'invalid value for "expand", must be one of acl' end # resource path local_var_path = "/api/v2/contentmanagement/documents/{documentId}".sub('{format}','json').sub('{' + 'documentId' + '}', document_id.to_s) # query parameters query_params = {} query_params[:'expand'] = opts[:'expand'] if opts[:'expand'] query_params[:'override'] = opts[:'override'] if opts[:'override'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['PureCloud OAuth'] 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 => 'Document') if @api_client.config.debugging @api_client.config.logger.debug "API called: ContentManagementApi#post_contentmanagement_document\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Add a document.
@param body Document
@param [Hash] opts the optional parameters @option opts [String] :copy_source Copy a document within a workspace or to a new workspace. Provide a document ID as the copy source. @option opts [String] :move_source Move a document to a new workspace. Provide a document ID as the move source. @option opts [BOOLEAN] :override Override any lock on the source document @return [Document]
# File lib/purecloudplatformclientv2/api/content_management_api.rb, line 2437 def post_contentmanagement_documents(body, opts = {}) data, _status_code, _headers = post_contentmanagement_documents_with_http_info(body, opts) return data end
Add a document.
@param body Document
@param [Hash] opts the optional parameters @option opts [String] :copy_source Copy a document within a workspace or to a new workspace. Provide a document ID as the copy source. @option opts [String] :move_source Move a document to a new workspace. Provide a document ID as the move source. @option opts [BOOLEAN] :override Override any lock on the source document @return [Array<(Document
, Fixnum, Hash)>] Document
data, response status code and response headers
# File lib/purecloudplatformclientv2/api/content_management_api.rb, line 2450 def post_contentmanagement_documents_with_http_info(body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ContentManagementApi.post_contentmanagement_documents ..." end # verify the required parameter 'body' is set fail ArgumentError, "Missing the required parameter 'body' when calling ContentManagementApi.post_contentmanagement_documents" if body.nil? # resource path local_var_path = "/api/v2/contentmanagement/documents".sub('{format}','json') # query parameters query_params = {} query_params[:'copySource'] = opts[:'copy_source'] if opts[:'copy_source'] query_params[:'moveSource'] = opts[:'move_source'] if opts[:'move_source'] query_params[:'override'] = opts[:'override'] if opts[:'override'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['PureCloud OAuth'] 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 => 'Document') if @api_client.config.debugging @api_client.config.logger.debug "API called: ContentManagementApi#post_contentmanagement_documents\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Query content
@param body Allows for a filtered query returning facet information @param [Hash] opts the optional parameters @option opts [String] :expand Expand some document fields @return [QueryResults]
# File lib/purecloudplatformclientv2/api/content_management_api.rb, line 2527 def post_contentmanagement_query(body, opts = {}) data, _status_code, _headers = post_contentmanagement_query_with_http_info(body, opts) return data end
Query content
@param body Allows for a filtered query returning facet information @param [Hash] opts the optional parameters @option opts [String] :expand Expand some document fields @return [Array<(QueryResults
, Fixnum, Hash)>] QueryResults
data, response status code and response headers
# File lib/purecloudplatformclientv2/api/content_management_api.rb, line 2538 def post_contentmanagement_query_with_http_info(body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ContentManagementApi.post_contentmanagement_query ..." end # verify the required parameter 'body' is set fail ArgumentError, "Missing the required parameter 'body' when calling ContentManagementApi.post_contentmanagement_query" if body.nil? if opts[:'expand'] && !['acl', 'workspace'].include?(opts[:'expand']) fail ArgumentError, 'invalid value for "expand", must be one of acl, workspace' end # resource path local_var_path = "/api/v2/contentmanagement/query".sub('{format}','json') # query parameters query_params = {} query_params[:'expand'] = opts[:'expand'] if opts[:'expand'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['PureCloud OAuth'] 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 => 'QueryResults') if @api_client.config.debugging @api_client.config.logger.debug "API called: ContentManagementApi#post_contentmanagement_query\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Create a workspace tag
@param workspace_id Workspace
ID @param body tag @param [Hash] opts the optional parameters @return [TagValue]
# File lib/purecloudplatformclientv2/api/content_management_api.rb, line 2670 def post_contentmanagement_workspace_tagvalues(workspace_id, body, opts = {}) data, _status_code, _headers = post_contentmanagement_workspace_tagvalues_with_http_info(workspace_id, body, opts) return data end
Perform a prefix query on tags in the workspace
@param workspace_id Workspace
ID @param body query @param [Hash] opts the optional parameters @option opts [Array<String>] :expand Which fields, if any, to expand. @return [TagValueEntityListing]
# File lib/purecloudplatformclientv2/api/content_management_api.rb, line 2746 def post_contentmanagement_workspace_tagvalues_query(workspace_id, body, opts = {}) data, _status_code, _headers = post_contentmanagement_workspace_tagvalues_query_with_http_info(workspace_id, body, opts) return data end
Perform a prefix query on tags in the workspace
@param workspace_id Workspace
ID @param body query @param [Hash] opts the optional parameters @option opts [Array<String>] :expand Which fields, if any, to expand. @return [Array<(TagValueEntityListing
, Fixnum, Hash)>] TagValueEntityListing
data, response status code and response headers
# File lib/purecloudplatformclientv2/api/content_management_api.rb, line 2758 def post_contentmanagement_workspace_tagvalues_query_with_http_info(workspace_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ContentManagementApi.post_contentmanagement_workspace_tagvalues_query ..." end # verify the required parameter 'workspace_id' is set fail ArgumentError, "Missing the required parameter 'workspace_id' when calling ContentManagementApi.post_contentmanagement_workspace_tagvalues_query" if workspace_id.nil? # verify the required parameter 'body' is set fail ArgumentError, "Missing the required parameter 'body' when calling ContentManagementApi.post_contentmanagement_workspace_tagvalues_query" if body.nil? # resource path local_var_path = "/api/v2/contentmanagement/workspaces/{workspaceId}/tagvalues/query".sub('{format}','json').sub('{' + 'workspaceId' + '}', workspace_id.to_s) # query parameters query_params = {} query_params[:'expand'] = @api_client.build_collection_param(opts[:'expand'], :multi) if opts[:'expand'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['PureCloud OAuth'] 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 => 'TagValueEntityListing') if @api_client.config.debugging @api_client.config.logger.debug "API called: ContentManagementApi#post_contentmanagement_workspace_tagvalues_query\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Create a workspace tag
@param workspace_id Workspace
ID @param body tag @param [Hash] opts the optional parameters @return [Array<(TagValue
, Fixnum, Hash)>] TagValue
data, response status code and response headers
# File lib/purecloudplatformclientv2/api/content_management_api.rb, line 2681 def post_contentmanagement_workspace_tagvalues_with_http_info(workspace_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ContentManagementApi.post_contentmanagement_workspace_tagvalues ..." end # verify the required parameter 'workspace_id' is set fail ArgumentError, "Missing the required parameter 'workspace_id' when calling ContentManagementApi.post_contentmanagement_workspace_tagvalues" if workspace_id.nil? # verify the required parameter 'body' is set fail ArgumentError, "Missing the required parameter 'body' when calling ContentManagementApi.post_contentmanagement_workspace_tagvalues" if body.nil? # resource path local_var_path = "/api/v2/contentmanagement/workspaces/{workspaceId}/tagvalues".sub('{format}','json').sub('{' + 'workspaceId' + '}', workspace_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['PureCloud OAuth'] 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 => 'TagValue') if @api_client.config.debugging @api_client.config.logger.debug "API called: ContentManagementApi#post_contentmanagement_workspace_tagvalues\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Create a group workspace
@param body Workspace
@param [Hash] opts the optional parameters @return [Workspace]
# File lib/purecloudplatformclientv2/api/content_management_api.rb, line 2828 def post_contentmanagement_workspaces(body, opts = {}) data, _status_code, _headers = post_contentmanagement_workspaces_with_http_info(body, opts) return data end
Create a group workspace
@param body Workspace
@param [Hash] opts the optional parameters @return [Array<(Workspace
, Fixnum, Hash)>] Workspace
data, response status code and response headers
# File lib/purecloudplatformclientv2/api/content_management_api.rb, line 2838 def post_contentmanagement_workspaces_with_http_info(body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ContentManagementApi.post_contentmanagement_workspaces ..." end # verify the required parameter 'body' is set fail ArgumentError, "Missing the required parameter 'body' when calling ContentManagementApi.post_contentmanagement_workspaces" if body.nil? # resource path local_var_path = "/api/v2/contentmanagement/workspaces".sub('{format}','json') # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['PureCloud OAuth'] 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 => 'Workspace') if @api_client.config.debugging @api_client.config.logger.debug "API called: ContentManagementApi#post_contentmanagement_workspaces\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Update a workspace
@param workspace_id Workspace
ID @param body Workspace
@param [Hash] opts the optional parameters @return [Workspace]
# File lib/purecloudplatformclientv2/api/content_management_api.rb, line 2894 def put_contentmanagement_workspace(workspace_id, body, opts = {}) data, _status_code, _headers = put_contentmanagement_workspace_with_http_info(workspace_id, body, opts) return data end
Add a member to a workspace
@param workspace_id Workspace
ID @param member_id Member ID @param body Workspace
Member @param [Hash] opts the optional parameters @return [WorkspaceMember]
# File lib/purecloudplatformclientv2/api/content_management_api.rb, line 2970 def put_contentmanagement_workspace_member(workspace_id, member_id, body, opts = {}) data, _status_code, _headers = put_contentmanagement_workspace_member_with_http_info(workspace_id, member_id, body, opts) return data end
Add a member to a workspace
@param workspace_id Workspace
ID @param member_id Member ID @param body Workspace
Member @param [Hash] opts the optional parameters @return [Array<(WorkspaceMember
, Fixnum, Hash)>] WorkspaceMember
data, response status code and response headers
# File lib/purecloudplatformclientv2/api/content_management_api.rb, line 2982 def put_contentmanagement_workspace_member_with_http_info(workspace_id, member_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ContentManagementApi.put_contentmanagement_workspace_member ..." end # verify the required parameter 'workspace_id' is set fail ArgumentError, "Missing the required parameter 'workspace_id' when calling ContentManagementApi.put_contentmanagement_workspace_member" if workspace_id.nil? # verify the required parameter 'member_id' is set fail ArgumentError, "Missing the required parameter 'member_id' when calling ContentManagementApi.put_contentmanagement_workspace_member" if member_id.nil? # verify the required parameter 'body' is set fail ArgumentError, "Missing the required parameter 'body' when calling ContentManagementApi.put_contentmanagement_workspace_member" if body.nil? # resource path local_var_path = "/api/v2/contentmanagement/workspaces/{workspaceId}/members/{memberId}".sub('{format}','json').sub('{' + 'workspaceId' + '}', workspace_id.to_s).sub('{' + 'memberId' + '}', member_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['PureCloud OAuth'] 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 => 'WorkspaceMember') if @api_client.config.debugging @api_client.config.logger.debug "API called: ContentManagementApi#put_contentmanagement_workspace_member\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Update a workspace tag. Will update all documents with the new tag value.
@param workspace_id Workspace
ID @param tag_id Tag ID @param body Workspace
@param [Hash] opts the optional parameters @return [TagValue]
# File lib/purecloudplatformclientv2/api/content_management_api.rb, line 3055 def put_contentmanagement_workspace_tagvalue(workspace_id, tag_id, body, opts = {}) data, _status_code, _headers = put_contentmanagement_workspace_tagvalue_with_http_info(workspace_id, tag_id, body, opts) return data end
Update a workspace tag. Will update all documents with the new tag value.
@param workspace_id Workspace
ID @param tag_id Tag ID @param body Workspace
@param [Hash] opts the optional parameters @return [Array<(TagValue
, Fixnum, Hash)>] TagValue
data, response status code and response headers
# File lib/purecloudplatformclientv2/api/content_management_api.rb, line 3067 def put_contentmanagement_workspace_tagvalue_with_http_info(workspace_id, tag_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ContentManagementApi.put_contentmanagement_workspace_tagvalue ..." end # verify the required parameter 'workspace_id' is set fail ArgumentError, "Missing the required parameter 'workspace_id' when calling ContentManagementApi.put_contentmanagement_workspace_tagvalue" if workspace_id.nil? # verify the required parameter 'tag_id' is set fail ArgumentError, "Missing the required parameter 'tag_id' when calling ContentManagementApi.put_contentmanagement_workspace_tagvalue" if tag_id.nil? # verify the required parameter 'body' is set fail ArgumentError, "Missing the required parameter 'body' when calling ContentManagementApi.put_contentmanagement_workspace_tagvalue" if body.nil? # resource path local_var_path = "/api/v2/contentmanagement/workspaces/{workspaceId}/tagvalues/{tagId}".sub('{format}','json').sub('{' + 'workspaceId' + '}', workspace_id.to_s).sub('{' + 'tagId' + '}', tag_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['PureCloud OAuth'] 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 => 'TagValue') if @api_client.config.debugging @api_client.config.logger.debug "API called: ContentManagementApi#put_contentmanagement_workspace_tagvalue\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Update a workspace
@param workspace_id Workspace
ID @param body Workspace
@param [Hash] opts the optional parameters @return [Array<(Workspace
, Fixnum, Hash)>] Workspace
data, response status code and response headers
# File lib/purecloudplatformclientv2/api/content_management_api.rb, line 2905 def put_contentmanagement_workspace_with_http_info(workspace_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ContentManagementApi.put_contentmanagement_workspace ..." end # verify the required parameter 'workspace_id' is set fail ArgumentError, "Missing the required parameter 'workspace_id' when calling ContentManagementApi.put_contentmanagement_workspace" if workspace_id.nil? # verify the required parameter 'body' is set fail ArgumentError, "Missing the required parameter 'body' when calling ContentManagementApi.put_contentmanagement_workspace" if body.nil? # resource path local_var_path = "/api/v2/contentmanagement/workspaces/{workspaceId}".sub('{format}','json').sub('{' + 'workspaceId' + '}', workspace_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['PureCloud OAuth'] 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 => 'Workspace') if @api_client.config.debugging @api_client.config.logger.debug "API called: ContentManagementApi#put_contentmanagement_workspace\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end