Method: PureCloud::ContentManagementApi#get_workspaces_workspace_id_with_http_info

Defined in:
lib/purecloud/api/content_management_api.rb

#get_workspaces_workspace_id_with_http_info(workspace_id, opts = {}) ⇒ Array<(Workspace, Fixnum, Hash)>

Get a workspace.

Parameters:

  • workspace_id

    Workspace ID

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

    the optional parameters

Options Hash (opts):

  • :expand (Array<String>)

    Which fields, if any, to expand.

Returns:

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

    Workspace data, response status code and response headers



1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
# File 'lib/purecloud/api/content_management_api.rb', line 1348

def get_workspaces_workspace_id_with_http_info(workspace_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ContentManagementApi#get_workspaces_workspace_id ..."
  end
  
  # verify the required parameter 'workspace_id' is set
  fail "Missing the required parameter 'workspace_id' when calling get_workspaces_workspace_id" 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)
  _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, 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_workspaces_workspace_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end