Macrometa Manage Subscriptions API
Event subscriptions and streaming
Event subscriptions and streaming
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/macrometa-manage-subscriptions-api"
curl "https://apis.io/api/v1/apis?limit=25"
Discovery needs no key. Ratings and market analysis are Pro.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: Macrometa API Reference Activity Metrics Manage Subscriptions 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: Manage Subscriptions
description: Event subscriptions and streaming
paths:
/api/es/v1/subscribe:
get:
summary: Subscribe to stream via WebSocket
description: "Subscribes to an event stream via WebSocket to recieve live updates. This API keeps the connection live and continuously receives messages from the server based on the specified query filters. \n\nThe endpoint URL for subscribing to a stream via WebSocket follows this format: ```wss://<eds-host>/api/es/v1/subscribe``` \n\nRelated guide: [**Subscribe to events and recieve real time updates**](https://www.macrometa.com/docs/photoniq/event-delivery/getting-started-event-delivery#subscribing-to-the-eds). \n\n**Do not try this API here**."
operationId: subscribe-stream-ws
tags:
- Manage Subscriptions
parameters:
- in: query
name: apikey
required: true
schema:
type: string
description: The API key for authenticating the request
- in: query
name: x-customer-id
required: true
schema:
type: string
example: cust-1
description: ID of the customer to identify the user making the request.
- in: query
name: type
required: true
schema:
type: string
example: collection
description: The type of events to subscribe to. It can be local, global or collection
- in: query
name: filters
required: true
schema:
type: object
example: '{"action": "add", "once": "FALSE", "initialData":"TRUE", "queries": ["select * from collection where attendance=4"]}'
properties:
compress:
type: string
example: 'FALSE'
initialData:
type: boolean
example: 'FALSE'
action:
type: string
example: add
once:
type: boolean
example: 'FALSE'
queries:
type: string
items:
type: string
description: Define the event data to be recieved via the stream based on a specific criteria. Refer to [**Event delivery filters guide**](https://www.macrometa.com/docs/photoniq/event-delivery/event-delivery-filters) for more details.
responses:
'200':
description: Successfully subscribed to the stream via WebSocket
content:
text/event-stream:
schema:
type: string
example: 'data: event1
data: event2'
/api/es/sse/v1/subscribe:
post:
tags:
- Manage Subscriptions
summary: Subscribe to stream via SSE
description: "Subscribes to an event stream via SSE to recieve live updates. This API keeps the connection live and continuously receives messages from the server based on the specified query filters. \n\nRelated guide: [**Subscribe to events and recieve real time updates**](https://www.macrometa.com/docs/photoniq/event-delivery/getting-started-event-delivery#subscribing-to-the-eds)."
operationId: subscribe-stream-sse
parameters:
- name: x-customer-id
in: header
description: ID of the customer to identify the user making the request.
required: true
schema:
type: string
requestBody:
description: The request body
content:
application/json:
schema:
$ref: '#/components/schemas/SubscribeRequest'
examples:
Event delivery service metrics:
value:
type: collection
filters:
once: 'FALSE'
compress: 'FALSE'
initialData: 'TRUE'
queries:
- select * from collection-name where attendance=4
required: true
responses:
'200':
description: Successfully subscribed to the stream via SSE
content:
text/event-stream:
schema:
type: string
example: 'data: event1
data: event2'
security:
- api_key: []
components:
schemas:
SubscribeRequest:
type: object
required:
- type
- filters
properties:
filters:
$ref: '#/components/schemas/FiltersRequest'
type:
type: string
description: The type of events to subscribe to. It can be local, global or collection
FiltersRequest:
type: object
description: Define the event data to be recieved via the stream based on a specific criteria. Refer to [**Event delivery filters guide**](https://www.macrometa.com/docs/photoniq/event-delivery/event-delivery-filters) for more details.
required:
- once
- initialData
- compress
- queries
properties:
compress:
type: string
example: 'FALSE'
initialData:
type: string
example: 'FALSE'
once:
type: string
example: 'FALSE'
queries:
type: string
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>`'