openapi: 3.0.0
info:
title: Macrometa API Reference Activity Metrics API
version: 0.17.17
description: API reference for the Macrometa Global Data Network.
license:
name: Macrometa License, Version 2.0
servers:
- url: https://api-play.paas.macrometa.io
description: GDN API
host: api-play.paas.macrometa.io
security:
- ApiKeyAuth: []
- BearerAuth: []
tags:
- name: Activity Metrics
description: All the PhotonIQ EST activity metrics endpoints.
paths:
/api/est/v1/activity/hourly:
get:
tags:
- Activity Metrics
description: Get hourly activity metrics based on start and end date-time parameters.
parameters:
- in: header
name: X-PhotonIQ-CustomerID
schema:
type: string
required: true
description: PhotonIQ EST customer ID.
- in: query
name: from
schema:
type: string
format: date-time
required: true
description: The UTC start date and time for which activity information is retrieved (e.g. 2022-01-01T00:00:00Z).
- in: query
name: to
schema:
type: string
format: date-time
description: The UTC end date and time for which activity information is retrieved (e.g. 2022-01-01T00:00:00Z).
required: true
responses:
'200':
description: Activity metrics retrieved successfully.
content:
application/json:
schema:
$ref: '#/components/schemas/MetricsResponse'
'400':
description: Invalid date parameters.
'500':
description: Internal server error.
/api/est/v1/activity/daily:
get:
tags:
- Activity Metrics
description: Get daily activity metrics based on start and end date-time parameters.
parameters:
- in: header
name: X-PhotonIQ-CustomerID
schema:
type: string
required: true
description: PhotonIQ EST customer ID.
- in: query
name: from
schema:
type: string
format: date-time
required: true
description: The UTC start date and time for which activity information is retrieved (e.g. 2022-01-01T00:00:00Z).
- in: query
name: to
schema:
type: string
format: date-time
description: The UTC end date and time for which activity information is retrieved (e.g. 2022-01-01T00:00:00Z).
required: true
responses:
'200':
description: Activity metrics retrieved successfully.
content:
application/json:
schema:
$ref: '#/components/schemas/MetricsResponse'
'400':
description: Invalid date parameters
'500':
description: Internal server error
/api/est/v1/activity/monthly:
get:
tags:
- Activity Metrics
description: Get monthly activity metrics based on start and end date-time parameters.
parameters:
- in: header
name: X-PhotonIQ-CustomerID
schema:
type: string
required: true
description: PhotonIQ EST customer ID.
- in: query
name: from
schema:
type: string
format: date-time
required: true
description: The UTC start date and time for which activity information is retrieved (e.g. 2022-01-01T00:00:00Z).
- in: query
name: to
schema:
type: string
format: date-time
description: The UTC end date and time for which activity information is retrieved (e.g. 2022-01-01T00:00:00Z).
required: true
responses:
'200':
description: Activity metrics retrieved successfully.
content:
application/json:
schema:
$ref: '#/components/schemas/MetricsResponse'
'400':
description: Invalid date parameters
'500':
description: Internal server error
components:
schemas:
MetricsResponse:
type: object
properties:
activityMetrics:
type: array
items:
$ref: '#/components/schemas/ActivityMetrics'
type:
type: array
items:
$ref: '#/components/schemas/TotalMetrics'
TotalMetrics:
type: object
properties:
totalRequests:
type: number
description: Number of total requests between from and to time.
totalBytes:
type: number
description: Number of total bytes used between from and to time.
ActivityMetrics:
type: object
properties:
customerId:
type: string
description: ID of the customer.
componentName:
type: string
description: Name of the component, example google-analytics.
eventType:
type: string
description: 'Type of event. Options: pageView or client.'
eventName:
type: string
description: 'Name of event. Options: click | scroll | mousedown'
count:
type: number
description: Number of events.
securitySchemes:
ApiKeyAuth:
type: apiKey
in: header
name: Authorization
description: 'Provide an API Key to the `Authorization` header, prefixed with "apikey".
Example: `Authorization: apikey <key>`'
BearerAuth:
type: http
scheme: bearer
bearerFormat: JWT
description: 'Provide a JSON Web Token (JWT) to the `Authorization` header, prefixed with "bearer".
Example: `Authorization: bearer <jwt>`'