# controller\_websub\_topic

Source: https://zotonic.com/docs/2709/controller_websub_topic

URI: https://zotonic.com/id/2709

Language: en



Serve the complete JSON representation advertised as a resource's WebSub topic.

The `websub_topic` dispatch is `/.zotonic/websub/topic/:id` and supports GET and HEAD. It offers only `application/json`, independently of the representations available through the semantic `/id` URI. The export uses the `x-default` language context, avoiding a language-dependent delivery topic.

Successful responses use the resource-export envelope:

```json
{"status":"ok","result":{"uri":"https://example.com/id/123","resource":{}}}
```

The example abbreviates the result; `m_rsc_export:full/2` supplies the complete export, including connections, media metadata, and discovery links. The resource's `result.uri` remains its language-less semantic identifier. The HTTP Link self points to this JSON topic, and the hub link identifies `controller_websub`.

Only authoritative local resources are served. Export access uses the current request's ACL context; an export error returns 403, while a missing or non-authoritative resource returns 404. Successful responses disable caching and include resource discovery headers. Private exports require authorized access.

`m_websub` uses the same full-export representation for delivery to verified subscribers, including non-Zotonic subscribers. See `mod_websub` for discovery, subscription, and the distinction between resource identity and delivery topic.

License: 

Attribution: 

Related resources: https://zotonic.com/api/agent/related/2709?language=en


## API access

- [API help](<https://zotonic.com/api-help>)
- [OpenAPI specification](<https://zotonic.com/openapi.json>)
- [This resource as JSON](<https://zotonic.com/api/agent/resource/2709?language=en>)
