Skip to content

Replace a host channel approval

POST
/api/v1/channels/{name}/upgrade
curl --request POST \
--url http://localhost:11044/api/v1/channels/example/upgrade \
--header 'X-Embabel-Api-Key: <X-Embabel-Api-Key>'

JSON fields: sourceId, expectedRevision, provider, autoStart, botCredential, and appCredential for Slack. The running channel is stopped.

name
required
string

Name of the live host channel whose approval is replaced, as the list gives it; a lower-case letter followed by up to 63 lower-case letters, digits or - (400 otherwise). 409 when no live approval of that name matches the body’s sourceId and expectedRevision

OK

Media type*/*

One built-in channel’s approval in the signed-in owner’s world, and whether it is running; holds no wallet key and no secret. Answered by GET /channels and the /channels/{name} adopt, upgrade, start, stop and revoke routes

object
autoStart
required

Whether the channel starts by itself when the owner’s world activates

boolean
lifecycle
required

Runtime state, lowercase: running or stopped, or unavailable when nothing on this host can run a host channel

string
name
required

Name of the channel, as named in the route path

string
provider
required

Messaging provider, lowercase: discord, slack or telegram

string
revision
required

This approval’s revision; send it back as expectedRevision on start, stop, upgrade or revoke

integer format: int64
revoked
required

Whether the approval has been revoked; a revoked channel can still be stopped

boolean
sourceId
required

Id of this approval; send it back as sourceId on start, stop, upgrade or revoke

string