Grant TRUSTIVAN support time-boxed, read-only access
curl --request POST \
--url https://app.trustivan.com/api/v1/support-access \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"hours": 84,
"reason": "<string>"
}
'import requests
url = "https://app.trustivan.com/api/v1/support-access"
payload = {
"hours": 84,
"reason": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({hours: 84, reason: '<string>'})
};
fetch('https://app.trustivan.com/api/v1/support-access', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.trustivan.com/api/v1/support-access"
payload := strings.NewReader("{\n \"hours\": 84,\n \"reason\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", 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))
}{
"support_access": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"org_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"granted_by": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"reason": "<string>",
"expires_at": "2023-11-07T05:31:56Z",
"revoked_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z"
}
}{
"error": "<string>",
"code": "validation_failed",
"required_scope": "<string>",
"principal": "user"
}Grant TRUSTIVAN support time-boxed, read-only access
Between 1 and 168 hours. Expiry is enforced on every staff request rather than by a sweep, so a window that has run out is closed even if nothing has run.
Requires members:manage, which is ungrantable to a machine:
consenting to vendor access is a decision a person makes, and an API
key that could make it would be a way to grant it without anybody
noticing. Audited in the organization’s own trail.
POST
/
support-access
Grant TRUSTIVAN support time-boxed, read-only access
curl --request POST \
--url https://app.trustivan.com/api/v1/support-access \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"hours": 84,
"reason": "<string>"
}
'import requests
url = "https://app.trustivan.com/api/v1/support-access"
payload = {
"hours": 84,
"reason": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({hours: 84, reason: '<string>'})
};
fetch('https://app.trustivan.com/api/v1/support-access', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.trustivan.com/api/v1/support-access"
payload := strings.NewReader("{\n \"hours\": 84,\n \"reason\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", 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))
}{
"support_access": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"org_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"granted_by": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"reason": "<string>",
"expires_at": "2023-11-07T05:31:56Z",
"revoked_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z"
}
}{
"error": "<string>",
"code": "validation_failed",
"required_scope": "<string>",
"principal": "user"
}