sessions.json 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. {
  2. "Sessions": {
  3. "type": "object",
  4. "required": ["start", "end", "intervals", "groups"],
  5. "properties": {
  6. "start": {
  7. "type": "string",
  8. "format": "date-time",
  9. "description": "The start time of the data being returned."
  10. },
  11. "end": {
  12. "type": "string",
  13. "format": "date-time",
  14. "description": "The exclusive end time of the data being returned."
  15. },
  16. "intervals": {
  17. "type": "array",
  18. "items": {
  19. "type": "string",
  20. "format": "date-time"
  21. },
  22. "description": "The time slices of the timeseries data given in the `groups[].series` field."
  23. },
  24. "groups": {
  25. "type": "array",
  26. "items": {
  27. "$ref": "#/Group"
  28. }
  29. }
  30. }
  31. },
  32. "Group": {
  33. "type": "object",
  34. "description": "A grouped result, as requested by the `groupBy` request parameter.",
  35. "required": ["by", "totals", "series"],
  36. "properties": {
  37. "by": {
  38. "type": "object",
  39. "description": "These are key/value pairs, the key being the requested `groupBy` property with its corresponding value."
  40. },
  41. "totals": {
  42. "type": "object",
  43. "description": "These are key/value pairs, the key being the requested `field`, and the value the corresponding total over the requested time frame."
  44. },
  45. "series": {
  46. "type": "object",
  47. "description": "These are key/value pairs, the key being the requested `field`, and the value is an array of aggregated values. The array corresponds to the times given in the `intervals` array.",
  48. "additionalProperties": {"type": "array", "items": {"type": "integer"}}
  49. }
  50. }
  51. }
  52. }