curl --request DELETE \
--url https://app.trustivan.com/api/v1/members/{userId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.trustivan.com/api/v1/members/{userId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.trustivan.com/api/v1/members/{userId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.trustivan.com/api/v1/members/{userId}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"error": "<string>",
"code": "validation_failed",
"required_scope": "<string>",
"principal": "user"
}Remove a member
Their sessions go with the membership. A removal that left a live refresh token would mean the person keeps working until it lapses, which for “somebody left today” is the entire point of the operation.
Their machine access goes too. Every API key they created in this
organization is revoked (and listed as revoked by
GET /api-keys), and the workloads and agents they delegated are
revoked. The authenticator independently refuses any key whose
creator is no longer an active member, and any workload whose
delegator is suspended, so the same holds when a person leaves by
another path. There is no implicit transfer: create a replacement key
under your own name before removing someone whose key a pipeline
uses.
The last owner cannot be removed.
curl --request DELETE \
--url https://app.trustivan.com/api/v1/members/{userId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.trustivan.com/api/v1/members/{userId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.trustivan.com/api/v1/members/{userId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.trustivan.com/api/v1/members/{userId}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"error": "<string>",
"code": "validation_failed",
"required_scope": "<string>",
"principal": "user"
}Authorizations
Response
The member was removed.