Skip to content

Approve a captured source

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

JSON fields: installationId, expectedRevision.

realmName
required
string

Name of the captured realm installed in the signed-in owner’s world; non-blank, at most 256 UTF-8 bytes, no control characters and not all * (400 otherwise). 409 when its live installation is not the one named by the body’s installationId and expectedRevision

sourceName
required
string

Declared source to approve; same text rules as the realm name. 400 when the admitted capture does not declare it, 409 when it is already approved

OK

Media type*/*
Array<object>

One event source a captured realm declares, and whether the owner approved it; answered by the /channels/sources/{realmName} list, grant and revoke routes

object
digest
required

Digest of the realm snapshot the installation admitted, 64 lowercase hex characters

string
installationId
required

The live installation of that realm this was read from; send it back as installationId on a change

string
name
required

Name of the source: the stem of its sources/.yml file

string
realmName
required

Name of the realm that declares the source

string
revision
required

That installation’s revision; send it back as expectedRevision on a change

integer format: int64
sourceRevision

Revision of the source’s approval, which moves independently of the installation’s revision and is what a consumer grant names as sourceRevision; null while the source is not approved

integer format: int64
stream
required

Journal stream the source’s events are appended to; the same as name

string
type
required

Event type, the source name qualified by its realm: .

string