fleet/server/service
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
..
testdata add endpoint to serve the kolide certificate back to the user (#1025) 2017-01-20 14:32:10 -05:00
client_appconfig.go Update the Go import paths to new repo name (#27) 2020-11-11 09:59:12 -08:00
client_carves.go Add AWS S3 as file carving backend (#126) 2020-12-16 09:16:55 -08:00
client_debug.go Add debug endpoints and associated fleetctl commands (#45) 2020-11-17 17:12:37 -08:00
client_errors.go Improve client error messages with unexpected server errors (#1776) 2018-05-09 16:54:23 -07:00
client_hosts.go Add host details in API responses (#223) 2021-01-25 13:05:02 -08:00
client_labels.go Update the Go import paths to new repo name (#27) 2020-11-11 09:59:12 -08:00
client_live_query.go Update the Go import paths to new repo name (#27) 2020-11-11 09:59:12 -08:00
client_options.go Update the Go import paths to new repo name (#27) 2020-11-11 09:59:12 -08:00
client_packs.go Update the Go import paths to new repo name (#27) 2020-11-11 09:59:12 -08:00
client_queries.go Update the Go import paths to new repo name (#27) 2020-11-11 09:59:12 -08:00
client_sessions.go Add file carving support (#15) 2020-11-04 20:45:16 -08:00
client_setup.go Update the Go import paths to new repo name (#27) 2020-11-11 09:59:12 -08:00
client_targets.go Update the Go import paths to new repo name (#27) 2020-11-11 09:59:12 -08:00
client_users.go Update the Go import paths to new repo name (#27) 2020-11-11 09:59:12 -08:00
client.go Fix fleetctl Windows issues (#40) 2020-11-17 16:02:14 -08:00
debug_handler_test.go Add debug endpoints and associated fleetctl commands (#45) 2020-11-17 17:12:37 -08:00
debug_handler.go Add debug endpoints and associated fleetctl commands (#45) 2020-11-17 17:12:37 -08:00
endpoint_appconfig_test.go Update the Go import paths to new repo name (#27) 2020-11-11 09:59:12 -08:00
endpoint_appconfig.go Update the Go import paths to new repo name (#27) 2020-11-11 09:59:12 -08:00
endpoint_campaigns.go Update the Go import paths to new repo name (#27) 2020-11-11 09:59:12 -08:00
endpoint_carves.go Update the Go import paths to new repo name (#27) 2020-11-11 09:59:12 -08:00
endpoint_certificate.go Update the Go import paths to new repo name (#27) 2020-11-11 09:59:12 -08:00
endpoint_change_email.go Update the Go import paths to new repo name (#27) 2020-11-11 09:59:12 -08:00
endpoint_hosts.go Add host details in API responses (#223) 2021-01-25 13:05:02 -08:00
endpoint_invites.go Update the Go import paths to new repo name (#27) 2020-11-11 09:59:12 -08:00
endpoint_labels.go Update the Go import paths to new repo name (#27) 2020-11-11 09:59:12 -08:00
endpoint_middleware_test.go Update the Go import paths to new repo name (#27) 2020-11-11 09:59:12 -08:00
endpoint_middleware.go Update the Go import paths to new repo name (#27) 2020-11-11 09:59:12 -08:00
endpoint_osquery_options.go Update the Go import paths to new repo name (#27) 2020-11-11 09:59:12 -08:00
endpoint_osquery.go Expose live query error messages via API (#205) 2021-01-19 14:52:29 -08:00
endpoint_packs.go Update the Go import paths to new repo name (#27) 2020-11-11 09:59:12 -08:00
endpoint_queries.go Update the Go import paths to new repo name (#27) 2020-11-11 09:59:12 -08:00
endpoint_scheduled_queries.go Update the Go import paths to new repo name (#27) 2020-11-11 09:59:12 -08:00
endpoint_sessions.go Update the Go import paths to new repo name (#27) 2020-11-11 09:59:12 -08:00
endpoint_setup.go Update the Go import paths to new repo name (#27) 2020-11-11 09:59:12 -08:00
endpoint_status.go Update the Go import paths to new repo name (#27) 2020-11-11 09:59:12 -08:00
endpoint_targets.go Update the Go import paths to new repo name (#27) 2020-11-11 09:59:12 -08:00
endpoint_test.go Update the Go import paths to new repo name (#27) 2020-11-11 09:59:12 -08:00
endpoint_users_test.go Update go-kit to 0.4.0 (#1411) 2017-03-15 08:55:30 -07:00
endpoint_users.go Update the Go import paths to new repo name (#27) 2020-11-11 09:59:12 -08:00
frontend.go Update the Go import paths to new repo name (#27) 2020-11-11 09:59:12 -08:00
handler_test.go Update the Go import paths to new repo name (#27) 2020-11-11 09:59:12 -08:00
handler.go Minor code/comment cleanups (#47) 2020-11-18 11:10:55 -08:00
http_auth_test.go Update the Go import paths to new repo name (#27) 2020-11-11 09:59:12 -08:00
http_auth.go Update the Go import paths to new repo name (#27) 2020-11-11 09:59:12 -08:00
logging_appconfig.go Update the Go import paths to new repo name (#27) 2020-11-11 09:59:12 -08:00
logging_campaigns.go Update the Go import paths to new repo name (#27) 2020-11-11 09:59:12 -08:00
logging_email_change.go Reduce verbosity of default logging (#2225) 2020-04-22 14:01:34 -07:00
logging_hosts.go Add host details in API responses (#223) 2021-01-25 13:05:02 -08:00
logging_invites.go Update the Go import paths to new repo name (#27) 2020-11-11 09:59:12 -08:00
logging_labels.go Update the Go import paths to new repo name (#27) 2020-11-11 09:59:12 -08:00
logging_osquery_options.go Update the Go import paths to new repo name (#27) 2020-11-11 09:59:12 -08:00
logging_osquery.go Expose live query error messages via API (#205) 2021-01-19 14:52:29 -08:00
logging_packs.go Update the Go import paths to new repo name (#27) 2020-11-11 09:59:12 -08:00
logging_queries.go Fix logging for query creation on error (#132) 2020-12-14 18:45:03 -08:00
logging_scheduled_queries.go Update the Go import paths to new repo name (#27) 2020-11-11 09:59:12 -08:00
logging_sessions.go Update the Go import paths to new repo name (#27) 2020-11-11 09:59:12 -08:00
logging_users.go Update the Go import paths to new repo name (#27) 2020-11-11 09:59:12 -08:00
logging.go Update the Go import paths to new repo name (#27) 2020-11-11 09:59:12 -08:00
metrics_appconfig.go Update the Go import paths to new repo name (#27) 2020-11-11 09:59:12 -08:00
metrics_change_email.go Update go-kit to 0.4.0 (#1411) 2017-03-15 08:55:30 -07:00
metrics_invites.go Update the Go import paths to new repo name (#27) 2020-11-11 09:59:12 -08:00
metrics_labels.go Update the Go import paths to new repo name (#27) 2020-11-11 09:59:12 -08:00
metrics_sessions.go Update the Go import paths to new repo name (#27) 2020-11-11 09:59:12 -08:00
metrics_users.go Update the Go import paths to new repo name (#27) 2020-11-11 09:59:12 -08:00
metrics.go Update the Go import paths to new repo name (#27) 2020-11-11 09:59:12 -08:00
service_appconfig_test.go Make name and secret required for enroll secrets (#207) 2021-01-19 14:49:53 -08:00
service_appconfig.go Make name and secret required for enroll secrets (#207) 2021-01-19 14:49:53 -08:00
service_campaigns.go Prevent SQLite ATTACH from being used in queries (#129) 2020-12-14 18:13:34 -08:00
service_carves_test.go Add AWS S3 as file carving backend (#126) 2020-12-16 09:16:55 -08:00
service_carves.go Add AWS S3 as file carving backend (#126) 2020-12-16 09:16:55 -08:00
service_certificate_test.go add endpoint to serve the kolide certificate back to the user (#1025) 2017-01-20 14:32:10 -05:00
service_certificate.go Update go-kit to 0.4.0 (#1411) 2017-03-15 08:55:30 -07:00
service_errors.go removing license code (#1551) 2017-09-01 10:42:46 -06:00
service_hosts_test.go Add host details in API responses (#223) 2021-01-25 13:05:02 -08:00
service_hosts.go Add host details in API responses (#223) 2021-01-25 13:05:02 -08:00
service_invites_test.go Update the Go import paths to new repo name (#27) 2020-11-11 09:59:12 -08:00
service_invites.go Update the Go import paths to new repo name (#27) 2020-11-11 09:59:12 -08:00
service_labels_test.go Update the Go import paths to new repo name (#27) 2020-11-11 09:59:12 -08:00
service_labels.go Update the Go import paths to new repo name (#27) 2020-11-11 09:59:12 -08:00
service_osquery_options.go Update the Go import paths to new repo name (#27) 2020-11-11 09:59:12 -08:00
service_osquery_test.go Expose live query error messages via API (#205) 2021-01-19 14:52:29 -08:00
service_osquery.go Expose live query error messages via API (#205) 2021-01-19 14:52:29 -08:00
service_packs_test.go Update the Go import paths to new repo name (#27) 2020-11-11 09:59:12 -08:00
service_packs.go Update the Go import paths to new repo name (#27) 2020-11-11 09:59:12 -08:00
service_queries_test.go Prevent SQLite ATTACH from being used in queries (#129) 2020-12-14 18:13:34 -08:00
service_queries.go Prevent SQLite ATTACH from being used in queries (#129) 2020-12-14 18:13:34 -08:00
service_scheduled_queries_test.go Allow scheduling same query more than once in UI (#96) 2020-12-04 09:50:39 -08:00
service_scheduled_queries.go Allow scheduling same query more than once in UI (#96) 2020-12-04 09:50:39 -08:00
service_sessions_test.go Update the Go import paths to new repo name (#27) 2020-11-11 09:59:12 -08:00
service_sessions.go Update the Go import paths to new repo name (#27) 2020-11-11 09:59:12 -08:00
service_status.go Add ability to disable live queries (#2167) 2020-01-13 16:53:04 -08:00
service_targets_test.go Update the Go import paths to new repo name (#27) 2020-11-11 09:59:12 -08:00
service_targets.go Update the Go import paths to new repo name (#27) 2020-11-11 09:59:12 -08:00
service_test.go Update the Go import paths to new repo name (#27) 2020-11-11 09:59:12 -08:00
service_users_test.go Allow @ character in usernames (#37) 2020-11-13 15:52:20 -08:00
service_users.go Update the Go import paths to new repo name (#27) 2020-11-11 09:59:12 -08:00
service.go Add AWS S3 as file carving backend (#126) 2020-12-16 09:16:55 -08:00
transport_appconfig.go Update the Go import paths to new repo name (#27) 2020-11-11 09:59:12 -08:00
transport_campaigns.go Add fleetctl query command (#1784) 2018-05-17 15:54:34 -07:00
transport_carves.go Update the Go import paths to new repo name (#27) 2020-11-11 09:59:12 -08:00
transport_change_email.go Update go-kit to 0.4.0 (#1411) 2017-03-15 08:55:30 -07:00
transport_error.go Update the Go import paths to new repo name (#27) 2020-11-11 09:59:12 -08:00
transport_hosts.go Add host additional info filters (#28) 2020-11-13 16:33:25 -08:00
transport_invites_test.go Update go-kit to 0.4.0 (#1411) 2017-03-15 08:55:30 -07:00
transport_invites.go Update go-kit to 0.4.0 (#1411) 2017-03-15 08:55:30 -07:00
transport_labels_test.go Fix labels UI issues in Fleet 2.0 (#1830) 2018-06-18 10:09:08 -07:00
transport_labels.go Implement pagination of hosts in the web UI 2020-07-21 14:05:46 -07:00
transport_osquery_options.go Add endpoints for apply/get of each spec type (#1752) 2018-05-03 18:01:57 -07:00
transport_osquery_test.go Update the Go import paths to new repo name (#27) 2020-11-11 09:59:12 -08:00
transport_osquery.go Expose live query error messages via API (#205) 2021-01-19 14:52:29 -08:00
transport_packs_test.go Fix pack and query UI issues in Fleet 2.0 (#1829) 2018-06-15 10:13:11 -04:00
transport_packs.go Fix pack and query UI issues in Fleet 2.0 (#1829) 2018-06-15 10:13:11 -04:00
transport_queries_test.go Delete spec entities by name instead of ID (#1755) 2018-05-04 11:05:55 -07:00
transport_queries.go Fix pack and query UI issues in Fleet 2.0 (#1829) 2018-06-15 10:13:11 -04:00
transport_scheduled_queries_test.go Allow scheduled query shard to be set to empty in frontend (#2093) 2019-08-13 09:42:02 -07:00
transport_scheduled_queries.go Fix pack and query UI issues in Fleet 2.0 (#1829) 2018-06-15 10:13:11 -04:00
transport_sessions_test.go Update go-kit to 0.4.0 (#1411) 2017-03-15 08:55:30 -07:00
transport_sessions.go Update the Go import paths to new repo name (#27) 2020-11-11 09:59:12 -08:00
transport_setup.go Update go-kit to 0.4.0 (#1411) 2017-03-15 08:55:30 -07:00
transport_targets_test.go Update go-kit to 0.4.0 (#1411) 2017-03-15 08:55:30 -07:00
transport_targets.go Update go-kit to 0.4.0 (#1411) 2017-03-15 08:55:30 -07:00
transport_test.go Update the Go import paths to new repo name (#27) 2020-11-11 09:59:12 -08:00
transport_users_test.go Update go-kit to 0.4.0 (#1411) 2017-03-15 08:55:30 -07:00
transport_users.go Update go-kit to 0.4.0 (#1411) 2017-03-15 08:55:30 -07:00
transport.go Update the Go import paths to new repo name (#27) 2020-11-11 09:59:12 -08:00
util_test.go Add AWS S3 as file carving backend (#126) 2020-12-16 09:16:55 -08:00
validation_app_config_test.go Update the Go import paths to new repo name (#27) 2020-11-11 09:59:12 -08:00
validation_app_config.go Update the Go import paths to new repo name (#27) 2020-11-11 09:59:12 -08:00
validation_invites.go Update the Go import paths to new repo name (#27) 2020-11-11 09:59:12 -08:00
validation_sessions.go Update the Go import paths to new repo name (#27) 2020-11-11 09:59:12 -08:00
validation_setup.go Update the Go import paths to new repo name (#27) 2020-11-11 09:59:12 -08:00
validation_users.go Allow @ character in usernames (#37) 2020-11-13 15:52:20 -08:00