Update a role
curl --request PATCH \
--url https://api.matrices.com/v1/roles/{roleId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"allow": [
"<string>"
],
"deny": [
"<string>"
],
"description": "<string>",
"name": "<string>"
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
allow: ['<string>'],
deny: ['<string>'],
description: '<string>',
name: '<string>'
})
};
fetch('https://api.matrices.com/v1/roles/{roleId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.matrices.com/v1/roles/{roleId}"
payload = {
"allow": ["<string>"],
"deny": ["<string>"],
"description": "<string>",
"name": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.matrices.com/v1/roles/{roleId}"
payload := strings.NewReader("{\n \"allow\": [\n \"<string>\"\n ],\n \"deny\": [\n \"<string>\"\n ],\n \"description\": \"<string>\",\n \"name\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", 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))
}{
"role": {
"allow": [
"<string>"
],
"createdAt": "2023-11-07T05:31:56Z",
"deny": [
"<string>"
],
"description": "<string>",
"id": "<string>",
"name": "<string>",
"updatedAt": "2023-11-07T05:31:56Z",
"version": 123,
"workspaceId": "<string>"
}
}{
"operation": {
"action": "<string>",
"agentId": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"expiresAt": "2023-11-07T05:31:56Z",
"id": "<string>",
"state": "pending",
"resolvedAt": "2023-11-07T05:31:56Z",
"resolvedBy": {
"id": "<string>",
"type": "user",
"identity": "<string>",
"origin": {
"provider": "slack",
"senderId": "<string>",
"tenantId": "<string>",
"channelId": "<string>",
"messageId": "<string>",
"threadId": "<string>"
}
},
"result": {
"status": 349,
"body": "<unknown>"
}
}
}{
"error": "<string>",
"message": "<string>",
"attemptsRemaining": 123,
"code": "<string>",
"retryAfterSeconds": 123
}{
"error": "<string>",
"message": "<string>",
"attemptsRemaining": 123,
"code": "<string>",
"retryAfterSeconds": 123
}{
"error": "<string>",
"message": "<string>",
"attemptsRemaining": 123,
"code": "<string>",
"retryAfterSeconds": 123
}{
"error": "<string>",
"message": "<string>",
"attemptsRemaining": 123,
"code": "<string>",
"retryAfterSeconds": 123
}Roles
Update a role
PATCH
/
v1
/
roles
/
{roleId}
Update a role
curl --request PATCH \
--url https://api.matrices.com/v1/roles/{roleId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"allow": [
"<string>"
],
"deny": [
"<string>"
],
"description": "<string>",
"name": "<string>"
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
allow: ['<string>'],
deny: ['<string>'],
description: '<string>',
name: '<string>'
})
};
fetch('https://api.matrices.com/v1/roles/{roleId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.matrices.com/v1/roles/{roleId}"
payload = {
"allow": ["<string>"],
"deny": ["<string>"],
"description": "<string>",
"name": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.matrices.com/v1/roles/{roleId}"
payload := strings.NewReader("{\n \"allow\": [\n \"<string>\"\n ],\n \"deny\": [\n \"<string>\"\n ],\n \"description\": \"<string>\",\n \"name\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", 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))
}{
"role": {
"allow": [
"<string>"
],
"createdAt": "2023-11-07T05:31:56Z",
"deny": [
"<string>"
],
"description": "<string>",
"id": "<string>",
"name": "<string>",
"updatedAt": "2023-11-07T05:31:56Z",
"version": 123,
"workspaceId": "<string>"
}
}{
"operation": {
"action": "<string>",
"agentId": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"expiresAt": "2023-11-07T05:31:56Z",
"id": "<string>",
"state": "pending",
"resolvedAt": "2023-11-07T05:31:56Z",
"resolvedBy": {
"id": "<string>",
"type": "user",
"identity": "<string>",
"origin": {
"provider": "slack",
"senderId": "<string>",
"tenantId": "<string>",
"channelId": "<string>",
"messageId": "<string>",
"threadId": "<string>"
}
},
"result": {
"status": 349,
"body": "<unknown>"
}
}
}{
"error": "<string>",
"message": "<string>",
"attemptsRemaining": 123,
"code": "<string>",
"retryAfterSeconds": 123
}{
"error": "<string>",
"message": "<string>",
"attemptsRemaining": 123,
"code": "<string>",
"retryAfterSeconds": 123
}{
"error": "<string>",
"message": "<string>",
"attemptsRemaining": 123,
"code": "<string>",
"retryAfterSeconds": 123
}{
"error": "<string>",
"message": "<string>",
"attemptsRemaining": 123,
"code": "<string>",
"retryAfterSeconds": 123
}Authorizations
APIKeyBearerAgentLeaseBearer
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Body
application/json
Maximum array length:
32Maximum string length:
176Pattern:
^tool:(\*|(builtin|managed|workspace):(\*|[a-z0-9][a-z0-9_-]{0,31}\.\*|[a-z0-9][a-z0-9_-]{0,31}\.[A-Za-z0-9][A-Za-z0-9_.-]{0,127}))$Bare built-in tool patterns removed from broader allows. Each pattern must select at least one current built-in tool; external namespaces are not deniable in v1.
Maximum array length:
32Maximum string length:
176Pattern:
^tool:(\*|(builtin|managed|workspace):(\*|[a-z0-9][a-z0-9_-]{0,31}\.\*|[a-z0-9][a-z0-9_-]{0,31}\.[A-Za-z0-9][A-Za-z0-9_.-]{0,127}))$Maximum string length:
1024Maximum string length:
128Response
Updated role.
Show child attributes
Show child attributes