fleet/server/kolide
Zach Wasserman 6215acdd1b
Add host details in API responses (#223)
Add label and pack information for the returned hosts in the single-host
API endpoints.

Example:

```
curl -k 'https://localhost:8080/api/v1/kolide/hosts/7' -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzZXNzaW9uX2tleSI6Ii9oNEZ4MUpEVmlvQWhtMC8wNUJKbzZpdldsUDZpMDhjQVBuZXRLeFIvWjNOUGgvMW9VdCsxQnFlNU1CVDVsMlU3ckVGMm5Sb1VxS3ZSUllzSmJJR2lBPT0ifQ.GQQsJgBU3JA1H1o4Y8fPjyfF78F_VY4c9AbrP5k0sCg'
{
  "host": {
    "created_at": "2021-01-16T00:22:33Z",
    "updated_at": "2021-01-16T00:22:51Z",
    "id": 7,
    "detail_updated_at": "1970-01-02T00:00:00Z",
    "label_updated_at": "1970-01-02T00:00:00Z",
    "last_enrolled_at": "2021-01-16T00:22:33Z",
    "seen_time": "2021-01-16T00:22:51Z",
    "hostname": "55d91fc9c303",
    "uuid": "853a4588-0000-0000-a061-7d494d04e9c4",
    "platform": "ubuntu",
    "osquery_version": "4.6.0",
    "os_version": "Ubuntu 20.04.0",
    "build": "",
    "platform_like": "debian",
    "code_name": "",
    "uptime": 0,
    "memory": 16794206208,
    "cpu_type": "x86_64",
    "cpu_subtype": "158",
    "cpu_brand": "Intel(R) Core(TM) i9-9980HK CPU @ 2.40GHz\u0000\u0000\u0000\u0000\u0000\u0000\u0000",
    "cpu_physical_cores": 8,
    "cpu_logical_cores": 8,
    "hardware_vendor": "",
    "hardware_model": "",
    "hardware_version": "",
    "hardware_serial": "",
    "computer_name": "55d91fc9c303",
    "primary_ip": "",
    "primary_mac": "",
    "distributed_interval": 10,
    "config_tls_refresh": 0,
    "logger_tls_period": 10,
    "enroll_secret_name": "default",
    "labels": [
      {
        "created_at": "2020-12-22T01:22:47Z",
        "updated_at": "2020-12-22T01:22:47Z",
        "id": 6,
        "name": "All Hosts",
        "description": "All hosts which have enrolled in Fleet",
        "query": "select 1;",
        "label_type": "builtin",
        "label_membership_type": "dynamic"
      }
    ],
    "packs": [
      {
        "created_at": "2021-01-20T16:36:42Z",
        "updated_at": "2021-01-20T16:36:42Z",
        "id": 2,
        "name": "test"
      }
    ],
    "status": "offline",
    "display_text": "55d91fc9c303"
  }
}
```
2021-01-25 13:05:02 -08:00
..
app.go Consistent use of constants in fleetctl (#2320) 2020-10-08 10:16:07 -07:00
campaigns.go Update the Go import paths to new repo name (#27) 2020-11-11 09:59:12 -08:00
carves.go Add AWS S3 as file carving backend (#126) 2020-12-16 09:16:55 -08:00
datastore.go Add file carving support (#15) 2020-11-04 20:45:16 -08:00
emails.go Allow import of github.com/kolide/fleet (#2213) 2020-03-29 19:22:04 -07:00
fleetctl.go Add fleetctl get label, pack, query for individual items by name (#1768) 2018-05-08 18:10:01 -06:00
hosts_test.go Implement pagination of hosts in the web UI 2020-07-21 14:05:46 -07:00
hosts.go Add host details in API responses (#223) 2021-01-25 13:05:02 -08:00
import_config_test.go Fix bug in Osquery import and updated import docs (#1478) 2017-04-23 19:41:27 -05:00
import_config_unmarshaler.go Fix documentation typos (#1682) 2017-12-21 18:37:32 -08:00
import_config.go Fix documentation typos (#1682) 2017-12-21 18:37:32 -08:00
invites.go Remove soft-deletion pattern (#2327) 2020-10-22 10:51:26 -07:00
labels.go Add host details in API responses (#223) 2021-01-25 13:05:02 -08:00
live_query_store.go Move live query operations from MySQL to Redis 2020-07-21 14:05:46 -07:00
logging.go Add Google Cloud PubSub logging (#2049) 2019-07-16 15:41:50 -07:00
meta.go Refactor osquery options interface (#1674) 2018-01-02 16:22:45 -08:00
network_interfaces.go Fix flapping host network interfaces (#1283) 2017-02-24 14:37:47 -08:00
osquery_options_test.go Refactor osquery options interface (#1674) 2018-01-02 16:22:45 -08:00
osquery_options.go Consistent use of constants in fleetctl (#2320) 2020-10-08 10:16:07 -07:00
osquery.go Expose live query error messages via API (#205) 2021-01-19 14:52:29 -08:00
packs.go Add host details in API responses (#223) 2021-01-25 13:05:02 -08:00
queries_test.go Prevent SQLite ATTACH from being used in queries (#129) 2020-12-14 18:13:34 -08:00
queries.go Prevent SQLite ATTACH from being used in queries (#129) 2020-12-14 18:13:34 -08:00
query_results.go Add warning in query UI when Redis fails (#2086) 2019-08-13 09:42:58 -07:00
scheduled_queries.go Remove soft-deletion pattern (#2327) 2020-10-22 10:51:26 -07:00
service.go Add file carving support (#15) 2020-11-04 20:45:16 -08:00
sessions.go SSO Login and Configuration Support (#1506) 2017-05-17 10:58:40 -05:00
status.go Add ability to disable live queries (#2167) 2020-01-13 16:53:04 -08:00
targets.go Move live query operations from MySQL to Redis 2020-07-21 14:05:46 -07:00
traits.go Remove soft-deletion pattern (#2327) 2020-10-22 10:51:26 -07:00
transactions.go Added support for atomic imports and dry run imports (#1510) 2017-05-30 14:42:00 -05:00
users_test.go Organizing go code (#241) 2016-09-26 11:48:55 -07:00
users.go Implement fleetctl user create (#9) 2020-11-04 17:06:55 -08:00