Macrometa Streams API
The Streams API from Macrometa — 13 operation(s) for streams.
The Streams API from Macrometa — 13 operation(s) for streams.
openapi: 3.0.0
info:
title: Macrometa API Reference Activity Metrics Streams 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: Streams
paths:
/_fabric/{fabric}/_api/streams:
get:
description: Fetch the list of all streams.
operationId: ListOfStreams
parameters:
- description: Fabric name of the streams.
in: path
name: fabric
required: true
schema:
type: string
format: string
default: _system
- description: Whether the stream is geo-replicated globally.
in: query
name: global
required: false
schema:
type: boolean
format: string
default: false
responses:
'200':
description: Successfully fetched the list of all streams.
content:
application/json:
schema:
$ref: '#/components/schemas/get_all_streams_examples_rc_200'
headers:
x-gdn-region:
schema:
$ref: '#/components/schemas/headers/x-gdn-region'
x-gdn-requestid:
schema:
$ref: '#/components/schemas/headers/x-gdn-requestid'
'400':
description: Failed due to missing or malformed data. Verify that all parameters are complete.
content:
application/json:
schema:
$ref: '#/components/schemas/error_example_rc_400'
headers:
x-gdn-region:
schema:
$ref: '#/components/schemas/headers/x-gdn-region'
x-gdn-requestid:
schema:
$ref: '#/components/schemas/headers/x-gdn-requestid'
'401':
description: Failed because you do not have administrator permissions.
content:
application/json:
schema:
$ref: '#/components/schemas/error_example_rc_401'
headers:
x-gdn-region:
schema:
$ref: '#/components/schemas/headers/x-gdn-region'
x-gdn-requestid:
schema:
$ref: '#/components/schemas/headers/x-gdn-requestid'
summary: Get list of streams
tags:
- Streams
/_fabric/{fabric}/_api/streams/{stream}:
post:
description: Create a stream.
operationId: CreateStream
parameters:
- description: Fabric name of the streams.
in: path
name: fabric
required: true
schema:
type: string
format: string
default: _system
- description: The name of the stream (up to 230 characters).
in: path
name: stream
required: true
schema:
type: string
format: string
- description: Whether the stream is geo-replicated globally
in: query
name: global
required: true
schema:
type: boolean
format: string
default: false
responses:
'200':
description: Successfully created the stream.
content:
application/json:
schema:
$ref: '#/components/schemas/create_stream_example_rc_202'
headers:
x-gdn-region:
schema:
$ref: '#/components/schemas/headers/x-gdn-region'
x-gdn-requestid:
schema:
$ref: '#/components/schemas/headers/x-gdn-requestid'
'400':
description: Failed due to missing or malformed data. Verify that all parameters are complete.
content:
application/json:
schema:
$ref: '#/components/schemas/error_example_rc_400'
headers:
x-gdn-region:
schema:
$ref: '#/components/schemas/headers/x-gdn-region'
x-gdn-requestid:
schema:
$ref: '#/components/schemas/headers/x-gdn-requestid'
'401':
description: Failed because you do not have administrator permissions.
content:
application/json:
schema:
$ref: '#/components/schemas/error_example_rc_401'
headers:
x-gdn-region:
schema:
$ref: '#/components/schemas/headers/x-gdn-region'
x-gdn-requestid:
schema:
$ref: '#/components/schemas/headers/x-gdn-requestid'
'409':
description: Failed because stream already exists.
content:
application/json:
schema:
$ref: '#/components/schemas/error_example_rc_409'
headers:
x-gdn-region:
schema:
$ref: '#/components/schemas/headers/x-gdn-region'
x-gdn-requestid:
schema:
$ref: '#/components/schemas/headers/x-gdn-requestid'
summary: Create stream
tags:
- Streams
delete:
description: ' Remove a stream.'
operationId: DeleteStream
parameters:
- description: Fabric name of the stream.
in: path
name: fabric
required: true
schema:
type: string
format: string
default: _system
- description: The name of the stream (up to 240 characters). It should start with *c8locals.* or *c8globals.*.
in: path
name: stream
required: true
schema:
type: string
format: string
- description: Stop all producers/consumers and delete the stream forcefully. *deprecated*
in: query
name: force
required: true
schema:
type: boolean
format: string
default: true
responses:
'200':
description: Successfully removed stream.
content:
application/json:
schema:
$ref: '#/components/schemas/delete_stream_example_rc_202'
headers:
x-gdn-region:
schema:
$ref: '#/components/schemas/headers/x-gdn-region'
x-gdn-requestid:
schema:
$ref: '#/components/schemas/headers/x-gdn-requestid'
'400':
description: Failed due to missing or malformed data. Verify that all parameters are complete.
content:
application/json:
schema:
$ref: '#/components/schemas/error_example_rc_400'
headers:
x-gdn-region:
schema:
$ref: '#/components/schemas/headers/x-gdn-region'
x-gdn-requestid:
schema:
$ref: '#/components/schemas/headers/x-gdn-requestid'
'401':
description: Failed because you do not have administrator permissions.
content:
application/json:
schema:
$ref: '#/components/schemas/error_example_rc_401'
headers:
x-gdn-region:
schema:
$ref: '#/components/schemas/headers/x-gdn-region'
x-gdn-requestid:
schema:
$ref: '#/components/schemas/headers/x-gdn-requestid'
'404':
description: Failed to find specified stream.
content:
application/json:
schema:
$ref: '#/components/schemas/error_example_rc_404'
headers:
x-gdn-region:
schema:
$ref: '#/components/schemas/headers/x-gdn-region'
x-gdn-requestid:
schema:
$ref: '#/components/schemas/headers/x-gdn-requestid'
summary: Remove stream
tags:
- Streams
/_fabric/{fabric}/_api/streams/{stream}/publish:
post:
description: Publish message in a stream.
operationId: PublishStreamMessage
parameters:
- description: Fabric name of the stream.
in: path
name: fabric
required: true
schema:
type: string
format: string
default: _system
- description: The name of the stream (up to 240 characters). It should start with *c8locals.* or *c8globals.*.
in: path
name: stream
required: true
schema:
type: string
format: string
requestBody:
content:
application/json:
schema:
type: string
description: Name of the message.
required: true
responses:
'200':
description: Successfully published message to the stream.
content:
application/json:
schema:
$ref: '#/components/schemas/publish_stream_example_rc_200'
headers:
x-gdn-region:
schema:
$ref: '#/components/schemas/headers/x-gdn-region'
x-gdn-requestid:
schema:
$ref: '#/components/schemas/headers/x-gdn-requestid'
'400':
description: Failed due to missing or malformed data. Verify that all parameters are complete.
content:
application/json:
schema:
$ref: '#/components/schemas/error_example_rc_400'
headers:
x-gdn-region:
schema:
$ref: '#/components/schemas/headers/x-gdn-region'
x-gdn-requestid:
schema:
$ref: '#/components/schemas/headers/x-gdn-requestid'
'401':
description: Failed because you do not have administrator permissions.
content:
application/json:
schema:
$ref: '#/components/schemas/error_example_rc_401'
headers:
x-gdn-region:
schema:
$ref: '#/components/schemas/headers/x-gdn-region'
x-gdn-requestid:
schema:
$ref: '#/components/schemas/headers/x-gdn-requestid'
summary: Publish message
tags:
- Streams
/_fabric/{fabric}/_api/streams/{stream}/backlog:
get:
description: Get the estimated backlog for the stream.
operationId: Backlog
parameters:
- description: Fabric name of the streams.
in: path
name: fabric
required: true
schema:
type: string
format: string
default: _system
- description: The name of the stream (up to 240 characters). It should start with *c8locals.* or *c8globals.*.
in: path
name: stream
required: true
schema:
type: string
format: string
responses:
'200':
description: Successfully fetched the stream backlog.
content:
application/json:
schema:
$ref: '#/components/schemas/get_stream_backlog_example_rc_200'
headers:
x-gdn-region:
schema:
$ref: '#/components/schemas/headers/x-gdn-region'
x-gdn-requestid:
schema:
$ref: '#/components/schemas/headers/x-gdn-requestid'
'400':
description: Failed due to missing or malformed data. Verify that all parameters are complete.
content:
application/json:
schema:
$ref: '#/components/schemas/error_example_rc_400'
headers:
x-gdn-region:
schema:
$ref: '#/components/schemas/headers/x-gdn-region'
x-gdn-requestid:
schema:
$ref: '#/components/schemas/headers/x-gdn-requestid'
'401':
description: Failed because you do not have administrator permissions.
content:
application/json:
schema:
$ref: '#/components/schemas/error_example_rc_401'
headers:
x-gdn-region:
schema:
$ref: '#/components/schemas/headers/x-gdn-region'
x-gdn-requestid:
schema:
$ref: '#/components/schemas/headers/x-gdn-requestid'
summary: Get backlog for the stream
tags:
- Streams
/_fabric/{fabric}/_api/streams/{stream}/stats:
get:
description: Get the statistics for a stream.
operationId: Stats
parameters:
- description: Fabric name of the streams.
in: path
name: fabric
required: true
schema:
type: string
format: string
default: _system
- description: The name of the stream (up to 240 characters). It should start with *c8locals.* or *c8globals.*.
in: path
name: stream
required: true
schema:
type: string
format: string
- description: If set to *true*, returns precise backlog
in: query
name: getPreciseBacklog
required: false
schema:
type: boolean
format: string
default: 'false'
- description: 'If set to *true*, returns backlog size for each subscription.
Note: This requires locking the ledger so be careful not to use it when there''s heavy traffic.'
in: query
name: subscriptionBacklogSize
required: false
schema:
type: boolean
format: string
default: 'false'
responses:
'200':
description: Successfully fetched the stream statistics.
content:
application/json:
schema:
$ref: '#/components/schemas/get_stream_stats_example_rc_200'
headers:
x-gdn-region:
schema:
$ref: '#/components/schemas/headers/x-gdn-region'
x-gdn-requestid:
schema:
$ref: '#/components/schemas/headers/x-gdn-requestid'
'400':
description: Failed due to missing or malformed data. Verify that all parameters are complete.
content:
application/json:
schema:
$ref: '#/components/schemas/error_example_rc_400'
headers:
x-gdn-region:
schema:
$ref: '#/components/schemas/headers/x-gdn-region'
x-gdn-requestid:
schema:
$ref: '#/components/schemas/headers/x-gdn-requestid'
'401':
description: Failed because you do not have administrator permissions.
content:
application/json:
schema:
$ref: '#/components/schemas/error_example_rc_401'
headers:
x-gdn-region:
schema:
$ref: '#/components/schemas/headers/x-gdn-region'
x-gdn-requestid:
schema:
$ref: '#/components/schemas/headers/x-gdn-requestid'
summary: Get stats for the stream
tags:
- Streams
/_fabric/{fabric}/_api/streams/{stream}/subscriptions:
get:
description: Get the list of subscriptions for a stream.
operationId: GetSubscriptionsList
parameters:
- description: Fabric name.
in: path
name: fabric
required: true
schema:
type: string
format: string
default: _system
- description: The name of the stream (up to 240 characters). It should start with *c8locals.* or *c8globals.*.
in: path
name: stream
required: true
schema:
type: string
format: string
responses:
'200':
description: Successfully fetched the subscriptions for a stream.
content:
application/json:
schema:
$ref: '#/components/schemas/get_stream_subs_example_rc_200'
headers:
x-gdn-region:
schema:
$ref: '#/components/schemas/headers/x-gdn-region'
x-gdn-requestid:
schema:
$ref: '#/components/schemas/headers/x-gdn-requestid'
'400':
description: Failed due to missing or malformed data. Verify that all parameters are complete.
content:
application/json:
schema:
$ref: '#/components/schemas/error_example_rc_400'
headers:
x-gdn-region:
schema:
$ref: '#/components/schemas/headers/x-gdn-region'
x-gdn-requestid:
schema:
$ref: '#/components/schemas/headers/x-gdn-requestid'
'401':
description: Failed because you do not have administrator permissions.
content:
application/json:
schema:
$ref: '#/components/schemas/error_example_rc_401'
headers:
x-gdn-region:
schema:
$ref: '#/components/schemas/headers/x-gdn-region'
x-gdn-requestid:
schema:
$ref: '#/components/schemas/headers/x-gdn-requestid'
summary: Get stream subscriptions
tags:
- Streams
/_fabric/{fabric}/_api/streams/ttl:
get:
description: Fetch the Time To Live (TTL) in seconds for messages in streams.
operationId: GetStreamsTTL
parameters:
- description: Fabric name of the streams.
in: path
name: fabric
required: true
schema:
type: string
format: string
default: _system
- description: Whether the stream is geo-replicated globally.
in: query
name: global
required: true
schema:
type: boolean
format: string
default: false
responses:
'200':
description: Successfully fetched the message TTL for the stream
content:
application/json:
schema:
$ref: '#/components/schemas/get_stream_ttl_example_rc_200'
headers:
x-gdn-region:
schema:
$ref: '#/components/schemas/headers/x-gdn-region'
x-gdn-requestid:
schema:
$ref: '#/components/schemas/headers/x-gdn-requestid'
'400':
description: Failed due to missing or malformed data. Verify that all parameters are complete.
content:
application/json:
schema:
$ref: '#/components/schemas/error_example_rc_400'
headers:
x-gdn-region:
schema:
$ref: '#/components/schemas/headers/x-gdn-region'
x-gdn-requestid:
schema:
$ref: '#/components/schemas/headers/x-gdn-requestid'
'401':
description: Failed due to missing authentication data.
content:
application/json:
schema:
$ref: '#/components/schemas/error_example_rc_401'
headers:
x-gdn-region:
schema:
$ref: '#/components/schemas/headers/x-gdn-region'
x-gdn-requestid:
schema:
$ref: '#/components/schemas/headers/x-gdn-requestid'
summary: Get message TTL for streams
tags:
- Streams
/_fabric/{fabric}/_api/streams/ttl/{ttl}:
post:
description: ' Set the message Time To Live (TTL) in seconds for all streams.'
operationId: SetStreamsTTL
parameters:
- description: Fabric name of the streams.
in: path
name: fabric
required: true
schema:
type: string
format: string
default: _system
- description: TTL in seconds.
in: path
name: ttl
required: true
schema:
type: integer
format: string
default: 3600
- description: Whether the stream is geo-replicated globally.
in: query
name: global
required: true
schema:
type: boolean
format: string
default: false
responses:
'200':
description: Successfully set the message TTL for streams.
content:
application/json:
schema:
$ref: '#/components/schemas/set_stream_ttl_example_rc_200'
headers:
x-gdn-region:
schema:
$ref: '#/components/schemas/headers/x-gdn-region'
x-gdn-requestid:
schema:
$ref: '#/components/schemas/headers/x-gdn-requestid'
'400':
description: Failed due to missing or malformed data. Verify that all parameters are complete.
content:
application/json:
schema:
$ref: '#/components/schemas/error_example_rc_400'
headers:
x-gdn-region:
schema:
$ref: '#/components/schemas/headers/x-gdn-region'
x-gdn-requestid:
schema:
$ref: '#/components/schemas/headers/x-gdn-requestid'
'401':
description: Failed due to missing authentication data.
content:
application/json:
schema:
$ref: '#/components/schemas/error_example_rc_401'
headers:
x-gdn-region:
schema:
$ref: '#/components/schemas/headers/x-gdn-region'
x-gdn-requestid:
schema:
$ref: '#/components/schemas/headers/x-gdn-requestid'
summary: Set message TTL for streams
tags:
- Streams
/_fabric/{fabric}/_api/streams/clearbacklog:
post:
description: Clear backlog for all streams.
operationId: ClearBacklog
parameters:
- description: Fabric name of the streams.
in: path
name: fabric
required: true
schema:
type: string
format: string
default: _system
- description: Whether the stream is geo-replicated globally.
in: query
name: global
required: true
schema:
type: boolean
format: string
default: false
responses:
'200':
description: Successfully cleared backlog for all streams.
content:
application/json:
schema:
$ref: '#/components/schemas/set_stream_ttl_example_rc_200'
headers:
x-gdn-region:
schema:
$ref: '#/components/schemas/headers/x-gdn-region'
x-gdn-requestid:
schema:
$ref: '#/components/schemas/headers/x-gdn-requestid'
'400':
description: Failed due to missing or malformed data. Verify that all parameters are complete.
content:
application/json:
schema:
$ref: '#/components/schemas/error_example_rc_400'
headers:
x-gdn-region:
schema:
$ref: '#/components/schemas/headers/x-gdn-region'
x-gdn-requestid:
schema:
$ref: '#/components/schemas/headers/x-gdn-requestid'
'401':
description: Failed due to missing authentication data.
content:
application/json:
schema:
$ref: '#/components/schemas/error_example_rc_401'
headers:
x-gdn-region:
schema:
$ref: '#/components/schemas/headers/x-gdn-region'
x-gdn-requestid:
schema:
$ref: '#/components/schemas/headers/x-gdn-requestid'
summary: Clear backlog
tags:
- Streams
/_fabric/{fabric}/_api/streams/clearbacklog/{subscription}:
post:
description: Clear stream backlogs for a specified subscription.
operationId: ClearSubscription'sBacklog
parameters:
- description: Fabric name of the streams.
in: path
name: fabric
required: true
schema:
type: string
format: string
default: _system
- description: Subscription name
in: path
name: subscription
required: true
schema:
type: string
format: string
- description: Whether the stream is geo-replicated globally.
in: query
name: global
required: true
schema:
type: boolean
format: string
default: false
responses:
'200':
description: Successfully cleared backlog for specified subscription.
content:
application/json:
schema:
$ref: '#/components/schemas/set_stream_ttl_example_rc_200'
headers:
x-gdn-region:
schema:
$ref: '#/components/schemas/headers/x-gdn-region'
x-gdn-requestid:
schema:
$ref: '#/components/schemas/headers/x-gdn-requestid'
'400':
description: Failed due to missing or malformed data. Verify that all parameters are complete.
content:
application/json:
schema:
$ref: '#/components/schemas/error_example_rc_400'
headers:
x-gdn-region:
schema:
$ref: '#/components/schemas/headers/x-gdn-region'
x-gdn-requestid:
schema:
$ref: '#/components/schemas/headers/x-gdn-requestid'
'401':
description: Failed due to missing authentication data.
content:
application/json:
schema:
$ref: '#/components/schemas/error_example_rc_401'
headers:
x-gdn-region:
schema:
$ref: '#/components/schemas/headers/x-gdn-region'
x-gdn-requestid:
schema:
$ref: '#/components/schemas/headers/x-gdn-requestid'
summary: Clear subscription's backlog
tags:
- Streams
/_fabric/{fabric}/_api/streams/{stream}/expiry/{seconds}:
post:
description: ' Set the expiration time for all messages on the stream, this applies to all subscriptions.'
operationId: ExpireMessages
parameters:
- description: Fabric name.
in: path
name: fabric
required: true
schema:
type: string
format: string
default: _system
- description: The name of the stream (up to 240 characters). It should start with *c8locals.* or *c8globals.*.
in: path
name: stream
required: true
schema:
type: string
format: string
- description: Expiry time in seconds.
in: path
name: seconds
required: true
schema:
type: integer
format: int
default: 3600
responses:
'200':
description: Successfully set the expiration time.
content:
application/json:
schema:
$ref: '#/components/schemas/set_stream_ttl_example_rc_200'
headers:
x-gdn-region:
schema:
$ref: '#/components/schemas/headers/x-gdn-region'
x-gdn-requestid:
schema:
$ref: '#/components/schemas/headers/x-gdn-requestid'
'400':
description: Failed due to missing or malformed data. Verify that all parameters are complete.
content:
application/json:
schema:
$ref: '#/components/schemas/error_example_rc_400'
headers:
x-gdn-region:
schema:
$ref: '#/components/schemas/headers/x-gdn-region'
x-gdn-requestid:
schema:
$ref: '#/components/schemas/headers/x-gdn-requestid'
'401':
description: Failed because you do not have administrator permissions.
content:
application/json:
schema:
$ref: '#/components/schemas/error_example_rc_401'
headers:
x-gdn-region:
schema:
$ref: '#/components/schemas/headers/x-gdn-region'
x-gdn-requestid:
schema:
$ref: '#/components/schemas/headers/x-gdn-requestid'
'409':
description: Failed due to expiration of message by timestamp not issued on a topic.
content:
application/json:
schema:
$ref: '#/components/schemas/error_example_rc_409'
headers:
x-gdn-region:
schema:
$ref: '#/components/schemas/headers/x-gdn-region'
x-gdn-requestid:
schema:
$ref: '#/components/schemas/headers/x-gdn-requestid'
summary: Expire messages on the stream
tags:
- Streams
/_fabric/{fabric}/_api/streams/subscription/{subscription}:
delete:
description: Remove the specified subscription on all streams.
operationId: DeleteAllSubscriptions
parameters:
- description: Fabric name of the streams.
in: path
name: fabric
required: true
schema:
type: string
format: string
default: _system
- description: Subscription name
in: path
name: subscription
required: true
schema:
type: string
format: string
- description: Whether the stream is geo-replicated globally.
in: query
name: global
required: true
schema:
type: boolean
format: string
default: false
responses:
'200':
description: Successfully removed the specified subscription on all streams.
content:
application/json:
schema:
$ref: '#/components/schemas/set_stream_ttl_example_rc_200'
headers:
x-gdn-region:
schema:
$ref: '#/components/schemas/headers/x-gdn-region'
x-gdn-requestid:
schema:
$ref: '#/components/schemas/headers/x-gdn-requestid'
'400':
description: Failed due to missing or malformed data. Verify that all parameters are complete.
content:
application/json:
schema:
$ref: '#/components/schemas/error_example_rc_400'
headers:
x-gdn-region:
schema:
$ref: '#/components/schemas/headers/x-gdn-region'
x-gdn-requestid:
schema:
$ref: '#/components/schemas/headers/x-gdn-requestid'
'401':
description: Failed due to missing authentication data.
content:
application/json:
schema:
$ref: '#/components/schemas/error_example_rc_401'
headers:
x-gdn-region:
schema:
$ref: '#/components/schemas/headers/x-gdn-region'
x-gdn-requestid:
schema:
$ref: '#/components/schemas/headers/x-gdn-requestid'
summary: Unsubscribe
tags:
- Streams
/_fabric/{fabric}/_api/streams/{stream}/subscriptions/{subscription}:
delete:
description: Removed the specified subscription from a stream. There should not be any active consumers.
operationId: DeleteSubscription
parameters:
- description: Fabric name of the streams.
in: path
name: fabric
required: true
schema:
type: string
format: string
default: _system
- description: The name of the stream (up to 240 characters). It should start with *c8locals.* or *c8globals.*.
in: path
name: stream
required: true
schema:
type: string
format: string
- description: Subscription name
in: path
name: subscription
required: true
schema:
type: string
format: string
responses:
'200':
description: Successfully removed the specified subscription from a stream.
# --- truncated at 32 KB (42 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/macrometa/refs/heads/main/openapi/macrometa-streams-api-openapi.yml