require "uri" module PureCloud class ConfigurationApi attr_accessor :api_client def initialize(api_client = ApiClient.default) @api_client = api_client end # Get encryption key list # # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size Page size # @option opts [Integer] :page_number Page number # @return [EncryptionKeyEntityListing] def get_recordingkeys(opts = {}) data, status_code, headers = get_recordingkeys_with_http_info(opts) return data end # Get encryption key list # # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size Page size # @option opts [Integer] :page_number Page number # @return [Array<(EncryptionKeyEntityListing, Fixnum, Hash)>] EncryptionKeyEntityListing data, response status code and response headers def get_recordingkeys_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ConfigurationApi#get_recordingkeys ..." end # resource path path = "/api/v2/configuration/recordingkeys".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) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud Auth'] data, status_code, headers = @api_client.call_api(:GET, path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'EncryptionKeyEntityListing') if @api_client.config.debugging @api_client.config.logger.debug "API called: ConfigurationApi#get_recordingkeys\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Create encryption key # # @param [Hash] opts the optional parameters # @return [EncryptionKey] def post_recordingkeys(opts = {}) data, status_code, headers = post_recordingkeys_with_http_info(opts) return data end # Create encryption key # # @param [Hash] opts the optional parameters # @return [Array<(EncryptionKey, Fixnum, Hash)>] EncryptionKey data, response status code and response headers def post_recordingkeys_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ConfigurationApi#post_recordingkeys ..." end # resource path path = "/api/v2/configuration/recordingkeys".sub('{format}','json') # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud Auth'] data, status_code, headers = @api_client.call_api(:POST, path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'EncryptionKey') if @api_client.config.debugging @api_client.config.logger.debug "API called: ConfigurationApi#post_recordingkeys\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get key rotation schedule # # @param [Hash] opts the optional parameters # @return [KeyRotationSchedule] def get_recordingkeys_rotationschedule(opts = {}) data, status_code, headers = get_recordingkeys_rotationschedule_with_http_info(opts) return data end # Get key rotation schedule # # @param [Hash] opts the optional parameters # @return [Array<(KeyRotationSchedule, Fixnum, Hash)>] KeyRotationSchedule data, response status code and response headers def get_recordingkeys_rotationschedule_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ConfigurationApi#get_recordingkeys_rotationschedule ..." end # resource path path = "/api/v2/configuration/recordingkeys/rotationschedule".sub('{format}','json') # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud Auth'] data, status_code, headers = @api_client.call_api(:GET, path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'KeyRotationSchedule') if @api_client.config.debugging @api_client.config.logger.debug "API called: ConfigurationApi#get_recordingkeys_rotationschedule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Update key rotation schedule # # @param [Hash] opts the optional parameters # @option opts [KeyRotationSchedule] :body KeyRotationSchedule # @return [KeyRotationSchedule] def put_recordingkeys_rotationschedule(opts = {}) data, status_code, headers = put_recordingkeys_rotationschedule_with_http_info(opts) return data end # Update key rotation schedule # # @param [Hash] opts the optional parameters # @option opts [KeyRotationSchedule] :body KeyRotationSchedule # @return [Array<(KeyRotationSchedule, Fixnum, Hash)>] KeyRotationSchedule data, response status code and response headers def put_recordingkeys_rotationschedule_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ConfigurationApi#put_recordingkeys_rotationschedule ..." end # resource path path = "/api/v2/configuration/recordingkeys/rotationschedule".sub('{format}','json') # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(opts[:'body']) auth_names = ['PureCloud Auth'] data, status_code, headers = @api_client.call_api(:PUT, path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'KeyRotationSchedule') if @api_client.config.debugging @api_client.config.logger.debug "API called: ConfigurationApi#put_recordingkeys_rotationschedule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Gets retention policy list with query options to filter on name and enabled. # for a less verbose response, add summary=true to this endpoint # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size The total page size requested # @option opts [Integer] :page_number The page number requested # @option opts [String] :sort_by variable name requested to sort by # @option opts [Array] :expand variable name requested by expand list # @option opts [String] :next_page next page token # @option opts [String] :previous_page Previous page token # @option opts [String] :name the policy name - used for filtering results in searches. # @option opts [BOOLEAN] :enabled checks to see if policy is enabled - use enabled = true or enabled = false # @option opts [BOOLEAN] :summary provides a less verbose response of policy lists. # @option opts [BOOLEAN] :has_errors provides a way to fetch all policies with errors or policies that do not have errors # @return [PolicyEntityListing] def get_retentionpolicies(opts = {}) data, status_code, headers = get_retentionpolicies_with_http_info(opts) return data end # Gets retention policy list with query options to filter on name and enabled. # for a less verbose response, add summary=true to this endpoint # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size The total page size requested # @option opts [Integer] :page_number The page number requested # @option opts [String] :sort_by variable name requested to sort by # @option opts [Array] :expand variable name requested by expand list # @option opts [String] :next_page next page token # @option opts [String] :previous_page Previous page token # @option opts [String] :name the policy name - used for filtering results in searches. # @option opts [BOOLEAN] :enabled checks to see if policy is enabled - use enabled = true or enabled = false # @option opts [BOOLEAN] :summary provides a less verbose response of policy lists. # @option opts [BOOLEAN] :has_errors provides a way to fetch all policies with errors or policies that do not have errors # @return [Array<(PolicyEntityListing, Fixnum, Hash)>] PolicyEntityListing data, response status code and response headers def get_retentionpolicies_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ConfigurationApi#get_retentionpolicies ..." end # resource path path = "/api/v2/configuration/retentionpolicies".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[:'sortBy'] = opts[:'sort_by'] if opts[:'sort_by'] query_params[:'expand'] = @api_client.build_collection_param(opts[:'expand'], :multi) if opts[:'expand'] query_params[:'nextPage'] = opts[:'next_page'] if opts[:'next_page'] query_params[:'previousPage'] = opts[:'previous_page'] if opts[:'previous_page'] query_params[:'name'] = opts[:'name'] if opts[:'name'] query_params[:'enabled'] = opts[:'enabled'] if opts[:'enabled'] query_params[:'summary'] = opts[:'summary'] if opts[:'summary'] query_params[:'hasErrors'] = opts[:'has_errors'] if opts[:'has_errors'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud Auth'] data, status_code, headers = @api_client.call_api(:GET, path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'PolicyEntityListing') if @api_client.config.debugging @api_client.config.logger.debug "API called: ConfigurationApi#get_retentionpolicies\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Create retention policy # # @param [Hash] opts the optional parameters # @option opts [Policy] :body Policy # @return [Policy] def post_retentionpolicies(opts = {}) data, status_code, headers = post_retentionpolicies_with_http_info(opts) return data end # Create retention policy # # @param [Hash] opts the optional parameters # @option opts [Policy] :body Policy # @return [Array<(Policy, Fixnum, Hash)>] Policy data, response status code and response headers def post_retentionpolicies_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ConfigurationApi#post_retentionpolicies ..." end # resource path path = "/api/v2/configuration/retentionpolicies".sub('{format}','json') # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(opts[:'body']) auth_names = ['PureCloud Auth'] data, status_code, headers = @api_client.call_api(:POST, path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Policy') if @api_client.config.debugging @api_client.config.logger.debug "API called: ConfigurationApi#post_retentionpolicies\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Delete policies # Bulk delete of Rules from specified rule set, this will only delete the rules that match the ids specified in the query param. # @param ids # @param [Hash] opts the optional parameters # @return [String] def delete_retentionpolicies(ids, opts = {}) data, status_code, headers = delete_retentionpolicies_with_http_info(ids, opts) return data end # Delete policies # Bulk delete of Rules from specified rule set, this will only delete the rules that match the ids specified in the query param. # @param ids # @param [Hash] opts the optional parameters # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers def delete_retentionpolicies_with_http_info(ids, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ConfigurationApi#delete_retentionpolicies ..." end # verify the required parameter 'ids' is set fail "Missing the required parameter 'ids' when calling delete_retentionpolicies" if ids.nil? # resource path path = "/api/v2/configuration/retentionpolicies".sub('{format}','json') # query parameters query_params = {} query_params[:'ids'] = ids # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud Auth'] data, status_code, headers = @api_client.call_api(:DELETE, path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'String') if @api_client.config.debugging @api_client.config.logger.debug "API called: ConfigurationApi#delete_retentionpolicies\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get policy # # @param policy_id Policy ID # @param [Hash] opts the optional parameters # @return [Policy] def get_retentionpolicies_policy_id(policy_id, opts = {}) data, status_code, headers = get_retentionpolicies_policy_id_with_http_info(policy_id, opts) return data end # Get policy # # @param policy_id Policy ID # @param [Hash] opts the optional parameters # @return [Array<(Policy, Fixnum, Hash)>] Policy data, response status code and response headers def get_retentionpolicies_policy_id_with_http_info(policy_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ConfigurationApi#get_retentionpolicies_policy_id ..." end # verify the required parameter 'policy_id' is set fail "Missing the required parameter 'policy_id' when calling get_retentionpolicies_policy_id" if policy_id.nil? # resource path path = "/api/v2/configuration/retentionpolicies/{policyId}".sub('{format}','json').sub('{' + 'policyId' + '}', policy_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud Auth'] data, status_code, headers = @api_client.call_api(:GET, path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Policy') if @api_client.config.debugging @api_client.config.logger.debug "API called: ConfigurationApi#get_retentionpolicies_policy_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Update policy # # @param policy_id Policy ID # @param [Hash] opts the optional parameters # @option opts [Policy] :body Policy # @return [Policy] def put_retentionpolicies_policy_id(policy_id, opts = {}) data, status_code, headers = put_retentionpolicies_policy_id_with_http_info(policy_id, opts) return data end # Update policy # # @param policy_id Policy ID # @param [Hash] opts the optional parameters # @option opts [Policy] :body Policy # @return [Array<(Policy, Fixnum, Hash)>] Policy data, response status code and response headers def put_retentionpolicies_policy_id_with_http_info(policy_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ConfigurationApi#put_retentionpolicies_policy_id ..." end # verify the required parameter 'policy_id' is set fail "Missing the required parameter 'policy_id' when calling put_retentionpolicies_policy_id" if policy_id.nil? # resource path path = "/api/v2/configuration/retentionpolicies/{policyId}".sub('{format}','json').sub('{' + 'policyId' + '}', policy_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(opts[:'body']) auth_names = ['PureCloud Auth'] data, status_code, headers = @api_client.call_api(:PUT, path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Policy') if @api_client.config.debugging @api_client.config.logger.debug "API called: ConfigurationApi#put_retentionpolicies_policy_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Delete policy # # @param policy_id Policy ID # @param [Hash] opts the optional parameters # @return [String] def delete_retentionpolicies_policy_id(policy_id, opts = {}) data, status_code, headers = delete_retentionpolicies_policy_id_with_http_info(policy_id, opts) return data end # Delete policy # # @param policy_id Policy ID # @param [Hash] opts the optional parameters # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers def delete_retentionpolicies_policy_id_with_http_info(policy_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ConfigurationApi#delete_retentionpolicies_policy_id ..." end # verify the required parameter 'policy_id' is set fail "Missing the required parameter 'policy_id' when calling delete_retentionpolicies_policy_id" if policy_id.nil? # resource path path = "/api/v2/configuration/retentionpolicies/{policyId}".sub('{format}','json').sub('{' + 'policyId' + '}', policy_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud Auth'] data, status_code, headers = @api_client.call_api(:DELETE, path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'String') if @api_client.config.debugging @api_client.config.logger.debug "API called: ConfigurationApi#delete_retentionpolicies_policy_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Patch a retention policy # # @param policy_id Policy ID # @param [Hash] opts the optional parameters # @option opts [Policy] :body Policy # @return [Policy] def patch_retentionpolicies_policy_id(policy_id, opts = {}) data, status_code, headers = patch_retentionpolicies_policy_id_with_http_info(policy_id, opts) return data end # Patch a retention policy # # @param policy_id Policy ID # @param [Hash] opts the optional parameters # @option opts [Policy] :body Policy # @return [Array<(Policy, Fixnum, Hash)>] Policy data, response status code and response headers def patch_retentionpolicies_policy_id_with_http_info(policy_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ConfigurationApi#patch_retentionpolicies_policy_id ..." end # verify the required parameter 'policy_id' is set fail "Missing the required parameter 'policy_id' when calling patch_retentionpolicies_policy_id" if policy_id.nil? # resource path path = "/api/v2/configuration/retentionpolicies/{policyId}".sub('{format}','json').sub('{' + 'policyId' + '}', policy_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(opts[:'body']) auth_names = ['PureCloud Auth'] data, status_code, headers = @api_client.call_api(:PATCH, path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Policy') if @api_client.config.debugging @api_client.config.logger.debug "API called: ConfigurationApi#patch_retentionpolicies_policy_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Lists available schema categories # # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size Page size # @option opts [Integer] :page_number Page number # @return [SchemaCategoryEntityListing] def get_schemas_edges_vnext(opts = {}) data, status_code, headers = get_schemas_edges_vnext_with_http_info(opts) return data end # Lists available schema categories # # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size Page size # @option opts [Integer] :page_number Page number # @return [Array<(SchemaCategoryEntityListing, Fixnum, Hash)>] SchemaCategoryEntityListing data, response status code and response headers def get_schemas_edges_vnext_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ConfigurationApi#get_schemas_edges_vnext ..." end # resource path path = "/api/v2/configuration/schemas/edges/vnext".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) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud Auth'] data, status_code, headers = @api_client.call_api(:GET, path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'SchemaCategoryEntityListing') if @api_client.config.debugging @api_client.config.logger.debug "API called: ConfigurationApi#get_schemas_edges_vnext\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # List schemas of a specific category # # @param schema_category Schema category # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size Page size # @option opts [Integer] :page_number Page number # @return [SchemaReferenceEntityListing] def get_schemas_edges_vnext_schemacategory(schema_category, opts = {}) data, status_code, headers = get_schemas_edges_vnext_schemacategory_with_http_info(schema_category, opts) return data end # List schemas of a specific category # # @param schema_category Schema category # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size Page size # @option opts [Integer] :page_number Page number # @return [Array<(SchemaReferenceEntityListing, Fixnum, Hash)>] SchemaReferenceEntityListing data, response status code and response headers def get_schemas_edges_vnext_schemacategory_with_http_info(schema_category, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ConfigurationApi#get_schemas_edges_vnext_schemacategory ..." end # verify the required parameter 'schema_category' is set fail "Missing the required parameter 'schema_category' when calling get_schemas_edges_vnext_schemacategory" if schema_category.nil? # resource path path = "/api/v2/configuration/schemas/edges/vnext/{schemaCategory}".sub('{format}','json').sub('{' + 'schemaCategory' + '}', schema_category.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'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud Auth'] data, status_code, headers = @api_client.call_api(:GET, path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'SchemaReferenceEntityListing') if @api_client.config.debugging @api_client.config.logger.debug "API called: ConfigurationApi#get_schemas_edges_vnext_schemacategory\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # List schemas of a specific category # # @param schema_category Schema category # @param schema_type Schema type # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size Page size # @option opts [Integer] :page_number Page number # @return [SchemaReferenceEntityListing] def get_schemas_edges_vnext_schemacategory_schematype(schema_category, schema_type, opts = {}) data, status_code, headers = get_schemas_edges_vnext_schemacategory_schematype_with_http_info(schema_category, schema_type, opts) return data end # List schemas of a specific category # # @param schema_category Schema category # @param schema_type Schema type # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size Page size # @option opts [Integer] :page_number Page number # @return [Array<(SchemaReferenceEntityListing, Fixnum, Hash)>] SchemaReferenceEntityListing data, response status code and response headers def get_schemas_edges_vnext_schemacategory_schematype_with_http_info(schema_category, schema_type, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ConfigurationApi#get_schemas_edges_vnext_schemacategory_schematype ..." end # verify the required parameter 'schema_category' is set fail "Missing the required parameter 'schema_category' when calling get_schemas_edges_vnext_schemacategory_schematype" if schema_category.nil? # verify the required parameter 'schema_type' is set fail "Missing the required parameter 'schema_type' when calling get_schemas_edges_vnext_schemacategory_schematype" if schema_type.nil? # resource path path = "/api/v2/configuration/schemas/edges/vnext/{schemaCategory}/{schemaType}".sub('{format}','json').sub('{' + 'schemaCategory' + '}', schema_category.to_s).sub('{' + 'schemaType' + '}', schema_type.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'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud Auth'] data, status_code, headers = @api_client.call_api(:GET, path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'SchemaReferenceEntityListing') if @api_client.config.debugging @api_client.config.logger.debug "API called: ConfigurationApi#get_schemas_edges_vnext_schemacategory_schematype\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get a json schema # # @param schema_category Schema category # @param schema_type Schema type # @param schema_id Schema ID # @param [Hash] opts the optional parameters # @return [Organization] def get_schemas_edges_vnext_schemacategory_schematype_schema_id(schema_category, schema_type, schema_id, opts = {}) data, status_code, headers = get_schemas_edges_vnext_schemacategory_schematype_schema_id_with_http_info(schema_category, schema_type, schema_id, opts) return data end # Get a json schema # # @param schema_category Schema category # @param schema_type Schema type # @param schema_id Schema ID # @param [Hash] opts the optional parameters # @return [Array<(Organization, Fixnum, Hash)>] Organization data, response status code and response headers def get_schemas_edges_vnext_schemacategory_schematype_schema_id_with_http_info(schema_category, schema_type, schema_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ConfigurationApi#get_schemas_edges_vnext_schemacategory_schematype_schema_id ..." end # verify the required parameter 'schema_category' is set fail "Missing the required parameter 'schema_category' when calling get_schemas_edges_vnext_schemacategory_schematype_schema_id" if schema_category.nil? # verify the required parameter 'schema_type' is set fail "Missing the required parameter 'schema_type' when calling get_schemas_edges_vnext_schemacategory_schematype_schema_id" if schema_type.nil? # verify the required parameter 'schema_id' is set fail "Missing the required parameter 'schema_id' when calling get_schemas_edges_vnext_schemacategory_schematype_schema_id" if schema_id.nil? # resource path path = "/api/v2/configuration/schemas/edges/vnext/{schemaCategory}/{schemaType}/{schemaId}".sub('{format}','json').sub('{' + 'schemaCategory' + '}', schema_category.to_s).sub('{' + 'schemaType' + '}', schema_type.to_s).sub('{' + 'schemaId' + '}', schema_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud Auth'] data, status_code, headers = @api_client.call_api(:GET, path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Organization') if @api_client.config.debugging @api_client.config.logger.debug "API called: ConfigurationApi#get_schemas_edges_vnext_schemacategory_schematype_schema_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get metadata for a schema # # @param schema_category Schema category # @param schema_type Schema type # @param schema_id Schema ID # @param extension extension # @param metadata_id Metadata ID # @param [Hash] opts the optional parameters # @option opts [String] :type Type # @return [Organization] def get_schemas_edges_vnext_schemacategory_schematype_schema_id_extension_metadata_id(schema_category, schema_type, schema_id, extension, metadata_id, opts = {}) data, status_code, headers = get_schemas_edges_vnext_schemacategory_schematype_schema_id_extension_metadata_id_with_http_info(schema_category, schema_type, schema_id, extension, metadata_id, opts) return data end # Get metadata for a schema # # @param schema_category Schema category # @param schema_type Schema type # @param schema_id Schema ID # @param extension extension # @param metadata_id Metadata ID # @param [Hash] opts the optional parameters # @option opts [String] :type Type # @return [Array<(Organization, Fixnum, Hash)>] Organization data, response status code and response headers def get_schemas_edges_vnext_schemacategory_schematype_schema_id_extension_metadata_id_with_http_info(schema_category, schema_type, schema_id, extension, metadata_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ConfigurationApi#get_schemas_edges_vnext_schemacategory_schematype_schema_id_extension_metadata_id ..." end # verify the required parameter 'schema_category' is set fail "Missing the required parameter 'schema_category' when calling get_schemas_edges_vnext_schemacategory_schematype_schema_id_extension_metadata_id" if schema_category.nil? # verify the required parameter 'schema_type' is set fail "Missing the required parameter 'schema_type' when calling get_schemas_edges_vnext_schemacategory_schematype_schema_id_extension_metadata_id" if schema_type.nil? # verify the required parameter 'schema_id' is set fail "Missing the required parameter 'schema_id' when calling get_schemas_edges_vnext_schemacategory_schematype_schema_id_extension_metadata_id" if schema_id.nil? # verify the required parameter 'extension' is set fail "Missing the required parameter 'extension' when calling get_schemas_edges_vnext_schemacategory_schematype_schema_id_extension_metadata_id" if extension.nil? # verify the required parameter 'metadata_id' is set fail "Missing the required parameter 'metadata_id' when calling get_schemas_edges_vnext_schemacategory_schematype_schema_id_extension_metadata_id" if metadata_id.nil? # resource path path = "/api/v2/configuration/schemas/edges/vnext/{schemaCategory}/{schemaType}/{schemaId}/{extension}/{metadataId}".sub('{format}','json').sub('{' + 'schemaCategory' + '}', schema_category.to_s).sub('{' + 'schemaType' + '}', schema_type.to_s).sub('{' + 'schemaId' + '}', schema_id.to_s).sub('{' + 'extension' + '}', extension.to_s).sub('{' + 'metadataId' + '}', metadata_id.to_s) # query parameters query_params = {} query_params[:'type'] = opts[:'type'] if opts[:'type'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud Auth'] data, status_code, headers = @api_client.call_api(:GET, path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Organization') if @api_client.config.debugging @api_client.config.logger.debug "API called: ConfigurationApi#get_schemas_edges_vnext_schemacategory_schematype_schema_id_extension_metadata_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end end end