sessions.json 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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. "properties": {
  41. "session.status": {
  42. "type": "string",
  43. "description": "Example `groupBy` property"
  44. }
  45. }
  46. },
  47. "totals": {
  48. "type": "object",
  49. "description": "These are key/value pairs, the key being the requested `field`, and the value the corresponding total over the requested time frame.",
  50. "properties": {
  51. "sum(session)": {
  52. "type": "integer",
  53. "description": "Example `field` value"
  54. }
  55. }
  56. },
  57. "series": {
  58. "type": "object",
  59. "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.",
  60. "additionalProperties": {
  61. "type": "array",
  62. "items": { "type": "integer" }
  63. }
  64. }
  65. }
  66. }
  67. }