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(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.
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}"
endThis 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| Name | Type | Description | Notes |
|---|---|---|---|
| id | String | User ID or username | |
| is_archived | Boolean | [optional] |
- Content-Type: Not defined
- Accept: application/json