@lap v0.3
# Machine-readable API spec. Each @endpoint block is one API call.
@api The Mercure protocol
@version 1.0.0
@auth Bearer bearer | ApiKey mercure_access_token in cookie
@endpoints 6
@toc .well-known(6)

@endpoint GET /.well-known/mercure
@optional {match: [str], match_urlpattern: [str], last_event_id: str, Last-Event-ID: str}
@returns(200)
@errors {400, 401}

@endpoint POST /.well-known/mercure
@returns(200)
@errors {400, 401, 403}

@endpoint GET /.well-known/oauth-protected-resource/.well-known/mercure
@returns(200) {resource: str(uri), bearer_methods_supported: [str], authorization_servers: [str], authorization_details_types_supported: [str], mercure_cookie: str, mercure_subscriptions: bool}

@endpoint GET /.well-known/mercure/subscriptions
@returns(200) {id: str(iri-reference), type: str, last_event_id: str, subscriptions: [map]}
@errors {401, 403}

@endpoint GET /.well-known/mercure/subscriptions/{match_type}/{match}
@required {match_type: str, match: str}
@returns(200) {id: str(iri-reference), type: str, last_event_id: str, subscriptions: [map]}
@errors {401, 403}

@endpoint GET /.well-known/mercure/subscriptions/{match_type}/{match}/{subscriber}
@required {match_type: str, match: str, subscriber: str}
@returns(200) {id: str(iri-reference), type: str, last_event_id: str, subscriptions: [map]}
@errors {401, 403}

@end
