Mercure

The Mercure protocol

[Mercure](https://mercure.rocks) is a protocol allowing to push data updates to web browsers and other HTTP clients in a convenient, fast, reliable and…

Communication#openapi#messaging

Fork copies the collection into your workspace, without the publisher's secrets, so you can add your own key and send requests. Star saves it to your starred APIs (Account › Marketplace) and helps others find it.

Overview

Mercure is a protocol allowing to push data updates to web browsers and other HTTP clients in a convenient, fast, reliable and battery-efficient way.

Endpoints 5

  • GETSubscribe to updates/.well-known/mercure?topic=string&Last-Event-ID=string
  • POSTPublish an update/.well-known/mercure
  • GETActive subscriptions/.well-known/mercure/subscriptions
  • GETActive subscriptions for the given topic/.well-known/mercure/subscriptions/:topic
  • GETActive subscription for the given topic and subscriber/.well-known/mercure/subscriptions/:topic/:subscriber

API details

Base URL
http://mercure.local
Authentication
A bearer token in the Authorization header
An API key in the mercureAuthorization cookie
Operations
5 operations on 4 pathsGET 4POST 1
Response formats
application/ld+json text/event-stream text/plain
Description format
OpenAPI 3.0.2, API version 0.3.2
Listed from
APIs.guru OpenAPI Directory (CC0-1.0)
Source updated

How to test the The Mercure protocol in Swastik Codes

  1. Open the APISelect “Fork & run in Swastik Codes” on this page. Sign in or create a free account if asked.
  2. Fork it into your workspaceChoose a workspace. You get your own copy of the The Mercure protocol collection, without the publisher's secrets.
  3. Add your credentialsThis API uses A bearer token in the Authorization header. Add yours in the collection's variables or an environment; the requests already reference it.
  4. Send a requestPick an endpoint, for example “Subscribe to updates” (GET /.well-known/mercure?topic=string&Last-Event-ID=string), and press Send. Check the response, add tests and run the whole collection with the runner.

Frequently asked questions

What is the The Mercure protocol?

[Mercure](https://mercure.rocks) is a protocol allowing to push data updates to web browsers and other HTTP clients in a convenient, fast, reliable and… It is listed under Communication and has 5 endpoints.

Who publishes the The Mercure protocol?

It is listed from Mercure's public API description (an OpenAPI document), not published by Mercure on Swastik Codes. Anyone who controls mercure.rocks can claim the profile by adding a DNS TXT record.

What is the base URL of the The Mercure protocol?

Requests go to http://mercure.local. Endpoint paths are added to this base URL.

How do I authenticate with the The Mercure protocol?

It accepts 2 methods: A bearer token in the Authorization header; an API key in the mercureAuthorization cookie.

How many endpoints does the The Mercure protocol have?

5 operations on 4 paths (4 GET, 1 POST).

Is forking the The Mercure protocol free?

Yes. Forking copies the collection into your workspace for free. It has been starred 0 times and forked 0 times.

Suggest an API

Tell us which public API is missing. We check it, then add it here with its endpoints when it has an OpenAPI (Swagger) description.