at.happyproto.admin.createSpaces
Create HappyProto's admin and customers spaces under HAPPYPROTO_DID, member-only, keeping either that already exists, and add each of staff to the admin space with write access, skipping existing members. Idempotent: a second call creates nothing and adds no one. Only HappyProto's own account may call it.
Details · procedure
| Kind | procedure |
|---|---|
| Authority | admin.happyproto.at |
| Indexed |
Showing version bafyreicjkubnl4l5jiexh7cculn2hzakxi67lwkiblhjr6jfzt5e5yuffm. Show the latest
Procedure
procedure · POSTInput
application/jsonstaff
arrayDIDs to add to the admin space with write access. A DID listed twice is added once. A DID that is already a member is left at its current access (a read-only member is not upgraded) and is not listed in staffAdded.
maxLength: 50
Output
application/jsonThe DIDs this call added to the admin space; members already present are left out.
Errors
Forbidden
The caller is not HAPPYPROTO_DID, is signed out, or HAPPYPROTO_DID is unset or not a DID.
InvalidRequest
staff is not a list of at most 50 DIDs.
Upstream
A space could not be read, created or changed, or the instance anchors new spaces under its own DID rather than HAPPYPROTO_DID. A failure part-way through staff names, in its message, the DIDs already added. Retrying is safe.
#space
objectProperties
Whether this call created the space; false when it already existed.
The space's at:// uri, at://<HAPPYPROTO_DID>/space/<type>/main. Not format at-uri: that format allows a collection NSID and a record key at most, and a space uri has four path segments and `space` where the NSID would be, so @atproto/lexicon refuses it.
Similar lexicons
semantic matchLexicons whose schemas describe something close to this one. Check them before publishing a new one that overlaps.
-
at.happyproto.admin.addCustomer
procedureMake an account a customer: add it to the customers space with read access. Adding an existing member succeeds and changes nothing. Staff only.
-
dev.cartridge.claims.setupAdmin
procedureBootstrap the claims admin space or add a member to it. Creates the admin space on first call; subsequent calls can add new admin DIDs.
-
fyi.opensocial.createSpace
procedureCreate a space under the group with its access record and, unless index is false, an index entry. Requires space.create.
-
rsvp.atmo.space.admin.createSpace
procedureCreate a new space owned by the JWT issuer. The caller is added as an owner-perm member.
-
town.muni.arbiter.createSpace
procedureCreate a new space on an arbiter.