workspace
Update a workspace member
Updates a member’s role and access scope within a workspace.
PUT
/
v1
/
workspace
/
{ws}
/
rbac
/
{rbacId}
cURL
curl -X PUT 'http://localhost:8080/v1/workspace/ws_example/rbac/your_rbacId' \
-H 'Authorization: Bearer ek_live_xxxxx' \
-H 'Content-Type: application/json' \
-d '{ // request body fields, see schema }'const response = await fetch('http://localhost:8080/v1/workspace/ws_example/rbac/your_rbacId', {
method: 'PUT',
headers: {
Authorization: 'Bearer ek_live_xxxxx',
'Content-Type': 'application/json',
},
body: JSON.stringify({
// request body fields, see schema
}),
});
const data = await response.json();import requests
response = requests.put(
'http://localhost:8080/v1/workspace/ws_example/rbac/your_rbacId',
headers={
'Authorization': 'Bearer ek_live_xxxxx',
'Content-Type': 'application/json',
},
json={
# request body fields, see schema
},
)
data = response.json()<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "8080",
CURLOPT_URL => "http://localhost:8080/v1/workspace/{ws}/rbac/{rbacId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'scope' => [
'all' => true,
'teams' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'projects' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'environments' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "http://localhost:8080/v1/workspace/{ws}/rbac/{rbacId}"
payload := strings.NewReader("{\n \"scope\": {\n \"all\": true,\n \"teams\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"projects\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"environments\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n }\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("http://localhost:8080/v1/workspace/{ws}/rbac/{rbacId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"scope\": {\n \"all\": true,\n \"teams\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"projects\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"environments\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:8080/v1/workspace/{ws}/rbac/{rbacId}")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"scope\": {\n \"all\": true,\n \"teams\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"projects\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"environments\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n }\n}"
response = http.request(request)
puts response.read_bodyAuthorizations
API key authentication. Pass Authorization: Bearer ek_live_xxxxx on every request.
Path Parameters
Required string length:
2 - 48Pattern:
^[a-z0-9-]+$Pattern:
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$Body
application/json
Response
200
Default Response
Previous
Remove a workspace memberRemoves a member from a workspace. Any sessions and API tokens owned by that member become invalid.
Next
⌘I
cURL
curl -X PUT 'http://localhost:8080/v1/workspace/ws_example/rbac/your_rbacId' \
-H 'Authorization: Bearer ek_live_xxxxx' \
-H 'Content-Type: application/json' \
-d '{ // request body fields, see schema }'const response = await fetch('http://localhost:8080/v1/workspace/ws_example/rbac/your_rbacId', {
method: 'PUT',
headers: {
Authorization: 'Bearer ek_live_xxxxx',
'Content-Type': 'application/json',
},
body: JSON.stringify({
// request body fields, see schema
}),
});
const data = await response.json();import requests
response = requests.put(
'http://localhost:8080/v1/workspace/ws_example/rbac/your_rbacId',
headers={
'Authorization': 'Bearer ek_live_xxxxx',
'Content-Type': 'application/json',
},
json={
# request body fields, see schema
},
)
data = response.json()<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "8080",
CURLOPT_URL => "http://localhost:8080/v1/workspace/{ws}/rbac/{rbacId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'scope' => [
'all' => true,
'teams' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'projects' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'environments' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "http://localhost:8080/v1/workspace/{ws}/rbac/{rbacId}"
payload := strings.NewReader("{\n \"scope\": {\n \"all\": true,\n \"teams\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"projects\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"environments\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n }\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("http://localhost:8080/v1/workspace/{ws}/rbac/{rbacId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"scope\": {\n \"all\": true,\n \"teams\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"projects\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"environments\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:8080/v1/workspace/{ws}/rbac/{rbacId}")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"scope\": {\n \"all\": true,\n \"teams\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"projects\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"environments\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n }\n}"
response = http.request(request)
puts response.read_body