Forge realtime service endpoints for publishing events
Proxies POST requests to Forge realtime services for publishing events.
All clients in the same context as the sender and subscribed to this realtime channel will receive the event.
"Publish" requests only work when the request originated from a UI context invocation. In the forge-proxy-authorization header you must specify the id of the invocation; you can't perform operations on behalf of an installationId.
string
Requiredstring
Event data to be published
string
Requiredstring
Requiredobject
Realtime message published successfully
object
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
curl --request POST \
--url '{FORGE_EGRESS_PROXY_URL}/forge/realtime/v1/publish' \
--header 'Accept: application/json' \
--header 'forge-proxy-authorization: Forge as=app,id=invocation-123' \
--header 'Content-Type: application/json' \
--data '{
"name": "forge-container-realtime-channel",
"payload": "Realtime message sent from the container service, id=1",
"options": {
"token": "example-token",
"contextOverrides": [
"board"
]
}
}'Proxies POST requests to Forge realtime services for publishing events. All clients subscribed to this global realtime channel will receive the event.
string
Requiredstring
string
Requiredstring
Requiredobject
Global realtime message published successfully
object
1
2
3
4
5
6
7
8
9
curl --request POST \
--url '{FORGE_EGRESS_PROXY_URL}/forge/realtime/v1/publish/global' \
--header 'Accept: application/json' \
--header 'forge-proxy-authorization: Forge as=app,id=invocation-123' \
--header 'Content-Type: application/json' \
--data '{
"name": "forge-container-realtime-channel",
"payload": "Realtime message sent from the container service, id=1"
}'Signs a forge realtime token that can be used to securely publish events to realtime channels.
string
Requiredstring
string
Requiredobject
RequiredRealtime token signed successfully
object
1
2
3
4
5
6
7
8
9
10
11
12
13
14
curl --request POST \
--url '{FORGE_EGRESS_PROXY_URL}/forge/realtime/v1/token' \
--header 'Accept: application/json' \
--header 'forge-proxy-authorization: Forge as=app,id=invocation-123' \
--header 'Content-Type: application/json' \
--data '{
"channelName": "forge-container-realtime-channel",
"claims": {
"allowedUsers": [
"user1",
"user2"
]
}
}'Rate this page: