{"action":"created","issue":{"url":"https://api.github.com/repos/rancherio/cattle/issues/137","labels_url":"https://api.github.com/repos/rancherio/cattle/issues/137/labels{/name}","comments_url":"https://api.github.com/repos/rancherio/cattle/issues/137/comments","events_url":"https://api.github.com/repos/rancherio/cattle/issues/137/events","html_url":"https://github.com/rancherio/cattle/issues/137","id":54627258,"number":137,"title":"Add hosts summary API","user":{"login":"vincent99","id":753917,"avatar_url":"https://avatars.githubusercontent.com/u/753917?v=3","gravatar_id":"","url":"https://api.github.com/users/vincent99","html_url":"https://github.com/vincent99","followers_url":"https://api.github.com/users/vincent99/followers","following_url":"https://api.github.com/users/vincent99/following{/other_user}","gists_url":"https://api.github.com/users/vincent99/gists{/gist_id}","starred_url":"https://api.github.com/users/vincent99/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vincent99/subscriptions","organizations_url":"https://api.github.com/users/vincent99/orgs","repos_url":"https://api.github.com/users/vincent99/repos","events_url":"https://api.github.com/users/vincent99/events{/privacy}","received_events_url":"https://api.github.com/users/vincent99/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/rancherio/cattle/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-01-16T21:29:33Z","updated_at":"2015-01-28T22:40:50Z","closed_at":null,"body":"Add a `/v1/hostsSummary` API to return aggregated data that the UI needs to efficiently display the new Hosts screen:\r\n\r\n```javascript\r\n{\r\n  type: 'collection',\r\n  resourceType: 'hostSummary',\r\n\r\n  data: [\r\n    {\r\n      id: '1h1',\r\n      type: 'hostSummary'\r\n\r\n      name: 'nyc3-node/docker',\r\n      description: 'blah',\r\n      zoneId: '1z1',\r\n\r\n      // If there are multiple, the first/primary IP?\r\n      ipAddress: '123.123.123.123',\r\n\r\n      // Combination of host state + agent state? (host.state == 'active' ? agent.state : host.state)\r\n      state: 'active',\r\n\r\n      // For hosts that are a swarm cluster, the number of hosts in the swarm.  This will always be null until swarm support is added.\r\n      clusterSize: null,\r\n      \r\n      // The actions available to the host\r\n      actions: {\r\n        deactivate: '...?action=deactivate',\r\n        ...\r\n      },\r\n\r\n      // Count of instances on the host, grouped by instance state\r\n      instanceStates: {\r\n        running: 101,\r\n        stopped: 20,\r\n        stopping: 2,\r\n        starting: 3,\r\n        ...\r\n      },\r\n\r\n      links: {\r\n        self: '...',\r\n        agent: '.../agent',\r\n        host: '.../host',\r\n        instances: '.../instances',\r\n        zone: '.../zone',\r\n      }\r\n    },\r\n\r\n    ... more host summaries ...\r\n  ]\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/rancherio/cattle/issues/comments/71932266","html_url":"https://github.com/rancherio/cattle/issues/137#issuecomment-71932266","issue_url":"https://api.github.com/repos/rancherio/cattle/issues/137","id":71932266,"user":{"login":"ibuildthecloud","id":1754002,"avatar_url":"https://avatars.githubusercontent.com/u/1754002?v=3","gravatar_id":"","url":"https://api.github.com/users/ibuildthecloud","html_url":"https://github.com/ibuildthecloud","followers_url":"https://api.github.com/users/ibuildthecloud/followers","following_url":"https://api.github.com/users/ibuildthecloud/following{/other_user}","gists_url":"https://api.github.com/users/ibuildthecloud/gists{/gist_id}","starred_url":"https://api.github.com/users/ibuildthecloud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ibuildthecloud/subscriptions","organizations_url":"https://api.github.com/users/ibuildthecloud/orgs","repos_url":"https://api.github.com/users/ibuildthecloud/repos","events_url":"https://api.github.com/users/ibuildthecloud/events{/privacy}","received_events_url":"https://api.github.com/users/ibuildthecloud/received_events","type":"User","site_admin":false},"created_at":"2015-01-28T22:40:49Z","updated_at":"2015-01-28T22:40:49Z","body":"- [ ] Support get host summary by id"}}