Skip to content

Latest commit

 

History

History
81 lines (57 loc) · 2.11 KB

File metadata and controls

81 lines (57 loc) · 2.11 KB

WhatpulseSdk::ComputersApi

All URIs are relative to https://whatpulse.test/api/v1

Method HTTP request Description
v1_users_computers GET /users/{id}/computers Get user computers

v1_users_computers

v1_users_computers(id, opts)

Get user computers

Get a list of computers for a specific user. Returns computer information including hardware details if you have the appropriate permissions. You can filter by archived status to show only active or archived computers.

Examples

require 'time'
require 'whatpulse-sdk'
# setup authorization
WhatpulseSdk.configure do |config|
  # Configure Bearer authorization: http
  config.access_token = 'YOUR_BEARER_TOKEN'
end

api_instance = WhatpulseSdk::ComputersApi.new
id = 'id_example' # String | User ID or username
opts = {
  is_archived: true # Boolean | 
}

begin
  # Get user computers
  result = api_instance.v1_users_computers(id, opts)
  p result
rescue WhatpulseSdk::ApiError => e
  puts "Error when calling ComputersApi->v1_users_computers: #{e}"
end

Using the v1_users_computers_with_http_info variant

This returns an Array which contains the response data, status code and headers.

<Array(, Integer, Hash)> v1_users_computers_with_http_info(id, opts)

begin
  # Get user computers
  data, status_code, headers = api_instance.v1_users_computers_with_http_info(id, opts)
  p status_code # => 2xx
  p headers # => { ... }
  p data # => <V1UsersComputers200Response>
rescue WhatpulseSdk::ApiError => e
  puts "Error when calling ComputersApi->v1_users_computers_with_http_info: #{e}"
end

Parameters

Name Type Description Notes
id String User ID or username
is_archived Boolean [optional]

Return type

V1UsersComputers200Response

Authorization

http

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json