Remove a builder
DELETE
/spaces/builders/{uuid}
const url = 'https://spaces.work.optidata.cloud/api/spaces/builders/5b1c7e22-9d40-4f6a-b3c8-1e2f3a4b5c6d';const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request DELETE \ --url https://spaces.work.optidata.cloud/api/spaces/builders/5b1c7e22-9d40-4f6a-b3c8-1e2f3a4b5c6d \ --header 'Authorization: Bearer <token>'Takes the builder permission away from a user. Removing someone who is not
a builder is not an error: revoked is then false. Company
super-administrators only.
Authorizations
Section titled “Authorizations”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters”uuid
required
string
The user’s uuid.
Responses
Section titled “ Responses ”The permission is gone.
Media typeapplication/json
object
uuid
required
string
revoked
required
false when the user was not a builder.
boolean
Examples
{ "uuid": "5b1c7e22-9d40-4f6a-b3c8-1e2f3a4b5c6d", "revoked": true}{ "uuid": "5b1c7e22-9d40-4f6a-b3c8-1e2f3a4b5c6d", "revoked": false}No authentication key was sent.
Media typeapplication/json
Authentication failures use an error key rather than message.
object
error
required
string
Examples
Examplemissing
No bearer token sent
{ "error": "JWT passport exception: Missing bearer token in request"}The caller is not allowed to do this (see “Who may do what”), or the authentication key is not recognised (empty message).
Media typeapplication/json
object
message
required
string
Examples
Not the space's owner
{ "message": "You do not have permission to update this space."}Not a builder
{ "message": "You do not have permission to view this map."}Not a super-administrator
{ "message": "You do not have permission to activate this map."}The authentication key is expired or not recognised. Get a fresh one and retry.
Media typeapplication/json
Authentication failures use an error key rather than message.
object
error
required
string
Examples
Exampleexpired
{ "error": "JWT passport expired: Passport expired"}