curl --request PUT \
--url https://api.openworklabs.com/v1/agent-permissions/everyone \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"settings": {
"commands": {
"allow": [
"<string>"
],
"block": [
"<string>"
]
},
"hostExecution": {
"allow": [
"<string>"
],
"block": [
"<string>"
]
},
"fileEdits": {
"allow": [
"<string>"
],
"block": [
"<string>"
]
},
"externalFolders": {
"allow": [
"<string>"
],
"block": [
"<string>"
]
},
"computerUse": {
"allow": [
"<string>"
],
"block": [
"<string>"
]
},
"computerFiles": {
"allow": [
"<string>"
],
"block": [
"<string>"
]
},
"computerClipboard": {
"allow": [
"<string>"
],
"block": [
"<string>"
]
},
"appScripting": {
"allow": [
"<string>"
],
"block": [
"<string>"
]
},
"websites": {
"allow": [
"<string>"
],
"block": [
"<string>"
]
},
"browserUploads": {
"allow": [
"<string>"
],
"block": [
"<string>"
]
},
"fileSends": {
"allow": [
"<string>"
],
"block": [
"<string>"
]
},
"webSearch": {
"allow": [
"<string>"
],
"block": [
"<string>"
]
},
"localSkills": {
"allow": [
"<string>"
],
"block": [
"<string>"
]
},
"localMcpServers": {
"allow": [
"<string>"
],
"block": [
"<string>"
]
}
}
}
'import requests
url = "https://api.openworklabs.com/v1/agent-permissions/everyone"
payload = { "settings": {
"commands": {
"allow": ["<string>"],
"block": ["<string>"]
},
"hostExecution": {
"allow": ["<string>"],
"block": ["<string>"]
},
"fileEdits": {
"allow": ["<string>"],
"block": ["<string>"]
},
"externalFolders": {
"allow": ["<string>"],
"block": ["<string>"]
},
"computerUse": {
"allow": ["<string>"],
"block": ["<string>"]
},
"computerFiles": {
"allow": ["<string>"],
"block": ["<string>"]
},
"computerClipboard": {
"allow": ["<string>"],
"block": ["<string>"]
},
"appScripting": {
"allow": ["<string>"],
"block": ["<string>"]
},
"websites": {
"allow": ["<string>"],
"block": ["<string>"]
},
"browserUploads": {
"allow": ["<string>"],
"block": ["<string>"]
},
"fileSends": {
"allow": ["<string>"],
"block": ["<string>"]
},
"webSearch": {
"allow": ["<string>"],
"block": ["<string>"]
},
"localSkills": {
"allow": ["<string>"],
"block": ["<string>"]
},
"localMcpServers": {
"allow": ["<string>"],
"block": ["<string>"]
}
} }
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
settings: {
commands: {allow: ['<string>'], block: ['<string>']},
hostExecution: {allow: ['<string>'], block: ['<string>']},
fileEdits: {allow: ['<string>'], block: ['<string>']},
externalFolders: {allow: ['<string>'], block: ['<string>']},
computerUse: {allow: ['<string>'], block: ['<string>']},
computerFiles: {allow: ['<string>'], block: ['<string>']},
computerClipboard: {allow: ['<string>'], block: ['<string>']},
appScripting: {allow: ['<string>'], block: ['<string>']},
websites: {allow: ['<string>'], block: ['<string>']},
browserUploads: {allow: ['<string>'], block: ['<string>']},
fileSends: {allow: ['<string>'], block: ['<string>']},
webSearch: {allow: ['<string>'], block: ['<string>']},
localSkills: {allow: ['<string>'], block: ['<string>']},
localMcpServers: {allow: ['<string>'], block: ['<string>']}
}
})
};
fetch('https://api.openworklabs.com/v1/agent-permissions/everyone', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.openworklabs.com/v1/agent-permissions/everyone",
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([
'settings' => [
'commands' => [
'allow' => [
'<string>'
],
'block' => [
'<string>'
]
],
'hostExecution' => [
'allow' => [
'<string>'
],
'block' => [
'<string>'
]
],
'fileEdits' => [
'allow' => [
'<string>'
],
'block' => [
'<string>'
]
],
'externalFolders' => [
'allow' => [
'<string>'
],
'block' => [
'<string>'
]
],
'computerUse' => [
'allow' => [
'<string>'
],
'block' => [
'<string>'
]
],
'computerFiles' => [
'allow' => [
'<string>'
],
'block' => [
'<string>'
]
],
'computerClipboard' => [
'allow' => [
'<string>'
],
'block' => [
'<string>'
]
],
'appScripting' => [
'allow' => [
'<string>'
],
'block' => [
'<string>'
]
],
'websites' => [
'allow' => [
'<string>'
],
'block' => [
'<string>'
]
],
'browserUploads' => [
'allow' => [
'<string>'
],
'block' => [
'<string>'
]
],
'fileSends' => [
'allow' => [
'<string>'
],
'block' => [
'<string>'
]
],
'webSearch' => [
'allow' => [
'<string>'
],
'block' => [
'<string>'
]
],
'localSkills' => [
'allow' => [
'<string>'
],
'block' => [
'<string>'
]
],
'localMcpServers' => [
'allow' => [
'<string>'
],
'block' => [
'<string>'
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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 := "https://api.openworklabs.com/v1/agent-permissions/everyone"
payload := strings.NewReader("{\n \"settings\": {\n \"commands\": {\n \"allow\": [\n \"<string>\"\n ],\n \"block\": [\n \"<string>\"\n ]\n },\n \"hostExecution\": {\n \"allow\": [\n \"<string>\"\n ],\n \"block\": [\n \"<string>\"\n ]\n },\n \"fileEdits\": {\n \"allow\": [\n \"<string>\"\n ],\n \"block\": [\n \"<string>\"\n ]\n },\n \"externalFolders\": {\n \"allow\": [\n \"<string>\"\n ],\n \"block\": [\n \"<string>\"\n ]\n },\n \"computerUse\": {\n \"allow\": [\n \"<string>\"\n ],\n \"block\": [\n \"<string>\"\n ]\n },\n \"computerFiles\": {\n \"allow\": [\n \"<string>\"\n ],\n \"block\": [\n \"<string>\"\n ]\n },\n \"computerClipboard\": {\n \"allow\": [\n \"<string>\"\n ],\n \"block\": [\n \"<string>\"\n ]\n },\n \"appScripting\": {\n \"allow\": [\n \"<string>\"\n ],\n \"block\": [\n \"<string>\"\n ]\n },\n \"websites\": {\n \"allow\": [\n \"<string>\"\n ],\n \"block\": [\n \"<string>\"\n ]\n },\n \"browserUploads\": {\n \"allow\": [\n \"<string>\"\n ],\n \"block\": [\n \"<string>\"\n ]\n },\n \"fileSends\": {\n \"allow\": [\n \"<string>\"\n ],\n \"block\": [\n \"<string>\"\n ]\n },\n \"webSearch\": {\n \"allow\": [\n \"<string>\"\n ],\n \"block\": [\n \"<string>\"\n ]\n },\n \"localSkills\": {\n \"allow\": [\n \"<string>\"\n ],\n \"block\": [\n \"<string>\"\n ]\n },\n \"localMcpServers\": {\n \"allow\": [\n \"<string>\"\n ],\n \"block\": [\n \"<string>\"\n ]\n }\n }\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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("https://api.openworklabs.com/v1/agent-permissions/everyone")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"settings\": {\n \"commands\": {\n \"allow\": [\n \"<string>\"\n ],\n \"block\": [\n \"<string>\"\n ]\n },\n \"hostExecution\": {\n \"allow\": [\n \"<string>\"\n ],\n \"block\": [\n \"<string>\"\n ]\n },\n \"fileEdits\": {\n \"allow\": [\n \"<string>\"\n ],\n \"block\": [\n \"<string>\"\n ]\n },\n \"externalFolders\": {\n \"allow\": [\n \"<string>\"\n ],\n \"block\": [\n \"<string>\"\n ]\n },\n \"computerUse\": {\n \"allow\": [\n \"<string>\"\n ],\n \"block\": [\n \"<string>\"\n ]\n },\n \"computerFiles\": {\n \"allow\": [\n \"<string>\"\n ],\n \"block\": [\n \"<string>\"\n ]\n },\n \"computerClipboard\": {\n \"allow\": [\n \"<string>\"\n ],\n \"block\": [\n \"<string>\"\n ]\n },\n \"appScripting\": {\n \"allow\": [\n \"<string>\"\n ],\n \"block\": [\n \"<string>\"\n ]\n },\n \"websites\": {\n \"allow\": [\n \"<string>\"\n ],\n \"block\": [\n \"<string>\"\n ]\n },\n \"browserUploads\": {\n \"allow\": [\n \"<string>\"\n ],\n \"block\": [\n \"<string>\"\n ]\n },\n \"fileSends\": {\n \"allow\": [\n \"<string>\"\n ],\n \"block\": [\n \"<string>\"\n ]\n },\n \"webSearch\": {\n \"allow\": [\n \"<string>\"\n ],\n \"block\": [\n \"<string>\"\n ]\n },\n \"localSkills\": {\n \"allow\": [\n \"<string>\"\n ],\n \"block\": [\n \"<string>\"\n ]\n },\n \"localMcpServers\": {\n \"allow\": [\n \"<string>\"\n ],\n \"block\": [\n \"<string>\"\n ]\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.openworklabs.com/v1/agent-permissions/everyone")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"settings\": {\n \"commands\": {\n \"allow\": [\n \"<string>\"\n ],\n \"block\": [\n \"<string>\"\n ]\n },\n \"hostExecution\": {\n \"allow\": [\n \"<string>\"\n ],\n \"block\": [\n \"<string>\"\n ]\n },\n \"fileEdits\": {\n \"allow\": [\n \"<string>\"\n ],\n \"block\": [\n \"<string>\"\n ]\n },\n \"externalFolders\": {\n \"allow\": [\n \"<string>\"\n ],\n \"block\": [\n \"<string>\"\n ]\n },\n \"computerUse\": {\n \"allow\": [\n \"<string>\"\n ],\n \"block\": [\n \"<string>\"\n ]\n },\n \"computerFiles\": {\n \"allow\": [\n \"<string>\"\n ],\n \"block\": [\n \"<string>\"\n ]\n },\n \"computerClipboard\": {\n \"allow\": [\n \"<string>\"\n ],\n \"block\": [\n \"<string>\"\n ]\n },\n \"appScripting\": {\n \"allow\": [\n \"<string>\"\n ],\n \"block\": [\n \"<string>\"\n ]\n },\n \"websites\": {\n \"allow\": [\n \"<string>\"\n ],\n \"block\": [\n \"<string>\"\n ]\n },\n \"browserUploads\": {\n \"allow\": [\n \"<string>\"\n ],\n \"block\": [\n \"<string>\"\n ]\n },\n \"fileSends\": {\n \"allow\": [\n \"<string>\"\n ],\n \"block\": [\n \"<string>\"\n ]\n },\n \"webSearch\": {\n \"allow\": [\n \"<string>\"\n ],\n \"block\": [\n \"<string>\"\n ]\n },\n \"localSkills\": {\n \"allow\": [\n \"<string>\"\n ],\n \"block\": [\n \"<string>\"\n ]\n },\n \"localMcpServers\": {\n \"allow\": [\n \"<string>\"\n ],\n \"block\": [\n \"<string>\"\n ]\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"policy": {
"teamId": "<string>",
"name": "<string>",
"memberCount": 0,
"settings": {
"commands": {
"decision": "allow",
"allow": [
"<string>"
],
"block": [
"<string>"
]
},
"hostExecution": {
"decision": "allow",
"allow": [
"<string>"
],
"block": [
"<string>"
]
},
"fileEdits": {
"decision": "allow",
"allow": [
"<string>"
],
"block": [
"<string>"
]
},
"externalFolders": {
"decision": "allow",
"allow": [
"<string>"
],
"block": [
"<string>"
]
},
"computerUse": {
"decision": "allow",
"allow": [
"<string>"
],
"block": [
"<string>"
]
},
"computerFiles": {
"decision": "allow",
"allow": [
"<string>"
],
"block": [
"<string>"
]
},
"computerClipboard": {
"decision": "allow",
"allow": [
"<string>"
],
"block": [
"<string>"
]
},
"appScripting": {
"decision": "allow",
"allow": [
"<string>"
],
"block": [
"<string>"
]
},
"websites": {
"decision": "allow",
"allow": [
"<string>"
],
"block": [
"<string>"
]
},
"browserUploads": {
"decision": "allow",
"allow": [
"<string>"
],
"block": [
"<string>"
]
},
"fileSends": {
"decision": "allow",
"allow": [
"<string>"
],
"block": [
"<string>"
]
},
"webSearch": {
"decision": "allow",
"allow": [
"<string>"
],
"block": [
"<string>"
]
},
"localSkills": {
"decision": "allow",
"allow": [
"<string>"
],
"block": [
"<string>"
]
},
"localMcpServers": {
"decision": "allow",
"allow": [
"<string>"
],
"block": [
"<string>"
]
}
},
"updatedAt": "2023-11-07T05:31:56Z"
}
}{
"error": "invalid_request",
"details": [
{
"message": "<string>",
"path": [
"<string>"
]
}
],
"message": "<string>",
"capability": "<string>"
}{
"error": "unauthorized"
}{
"error": "forbidden",
"reason": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}Set everyone's agent permissions
Replaces the agent permissions that apply to every member. A permission left out uses its default: Allow for existing permissions, Ask first without administrator authority for browser uploads and files sent to connected accounts. Members’ apps pick up the change the next time they refresh their organization’s settings. Requires the agent_permissions.manage permission with a recent sign-in. Browser upload settings are ignored and preserved unless the client sends X-OpenWork-Browser-Upload-Permissions: 1. Settings for files sent to connected accounts follow the same rule with X-OpenWork-File-Send-Permissions: 1, and hostExecution (off requires the local sandbox) with X-OpenWork-Sandbox-Only: 1. While the sandboxTools feature is off for the organization, a new hostExecution block is ignored and the stored setting kept; removing one is always accepted.
curl --request PUT \
--url https://api.openworklabs.com/v1/agent-permissions/everyone \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"settings": {
"commands": {
"allow": [
"<string>"
],
"block": [
"<string>"
]
},
"hostExecution": {
"allow": [
"<string>"
],
"block": [
"<string>"
]
},
"fileEdits": {
"allow": [
"<string>"
],
"block": [
"<string>"
]
},
"externalFolders": {
"allow": [
"<string>"
],
"block": [
"<string>"
]
},
"computerUse": {
"allow": [
"<string>"
],
"block": [
"<string>"
]
},
"computerFiles": {
"allow": [
"<string>"
],
"block": [
"<string>"
]
},
"computerClipboard": {
"allow": [
"<string>"
],
"block": [
"<string>"
]
},
"appScripting": {
"allow": [
"<string>"
],
"block": [
"<string>"
]
},
"websites": {
"allow": [
"<string>"
],
"block": [
"<string>"
]
},
"browserUploads": {
"allow": [
"<string>"
],
"block": [
"<string>"
]
},
"fileSends": {
"allow": [
"<string>"
],
"block": [
"<string>"
]
},
"webSearch": {
"allow": [
"<string>"
],
"block": [
"<string>"
]
},
"localSkills": {
"allow": [
"<string>"
],
"block": [
"<string>"
]
},
"localMcpServers": {
"allow": [
"<string>"
],
"block": [
"<string>"
]
}
}
}
'import requests
url = "https://api.openworklabs.com/v1/agent-permissions/everyone"
payload = { "settings": {
"commands": {
"allow": ["<string>"],
"block": ["<string>"]
},
"hostExecution": {
"allow": ["<string>"],
"block": ["<string>"]
},
"fileEdits": {
"allow": ["<string>"],
"block": ["<string>"]
},
"externalFolders": {
"allow": ["<string>"],
"block": ["<string>"]
},
"computerUse": {
"allow": ["<string>"],
"block": ["<string>"]
},
"computerFiles": {
"allow": ["<string>"],
"block": ["<string>"]
},
"computerClipboard": {
"allow": ["<string>"],
"block": ["<string>"]
},
"appScripting": {
"allow": ["<string>"],
"block": ["<string>"]
},
"websites": {
"allow": ["<string>"],
"block": ["<string>"]
},
"browserUploads": {
"allow": ["<string>"],
"block": ["<string>"]
},
"fileSends": {
"allow": ["<string>"],
"block": ["<string>"]
},
"webSearch": {
"allow": ["<string>"],
"block": ["<string>"]
},
"localSkills": {
"allow": ["<string>"],
"block": ["<string>"]
},
"localMcpServers": {
"allow": ["<string>"],
"block": ["<string>"]
}
} }
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
settings: {
commands: {allow: ['<string>'], block: ['<string>']},
hostExecution: {allow: ['<string>'], block: ['<string>']},
fileEdits: {allow: ['<string>'], block: ['<string>']},
externalFolders: {allow: ['<string>'], block: ['<string>']},
computerUse: {allow: ['<string>'], block: ['<string>']},
computerFiles: {allow: ['<string>'], block: ['<string>']},
computerClipboard: {allow: ['<string>'], block: ['<string>']},
appScripting: {allow: ['<string>'], block: ['<string>']},
websites: {allow: ['<string>'], block: ['<string>']},
browserUploads: {allow: ['<string>'], block: ['<string>']},
fileSends: {allow: ['<string>'], block: ['<string>']},
webSearch: {allow: ['<string>'], block: ['<string>']},
localSkills: {allow: ['<string>'], block: ['<string>']},
localMcpServers: {allow: ['<string>'], block: ['<string>']}
}
})
};
fetch('https://api.openworklabs.com/v1/agent-permissions/everyone', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.openworklabs.com/v1/agent-permissions/everyone",
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([
'settings' => [
'commands' => [
'allow' => [
'<string>'
],
'block' => [
'<string>'
]
],
'hostExecution' => [
'allow' => [
'<string>'
],
'block' => [
'<string>'
]
],
'fileEdits' => [
'allow' => [
'<string>'
],
'block' => [
'<string>'
]
],
'externalFolders' => [
'allow' => [
'<string>'
],
'block' => [
'<string>'
]
],
'computerUse' => [
'allow' => [
'<string>'
],
'block' => [
'<string>'
]
],
'computerFiles' => [
'allow' => [
'<string>'
],
'block' => [
'<string>'
]
],
'computerClipboard' => [
'allow' => [
'<string>'
],
'block' => [
'<string>'
]
],
'appScripting' => [
'allow' => [
'<string>'
],
'block' => [
'<string>'
]
],
'websites' => [
'allow' => [
'<string>'
],
'block' => [
'<string>'
]
],
'browserUploads' => [
'allow' => [
'<string>'
],
'block' => [
'<string>'
]
],
'fileSends' => [
'allow' => [
'<string>'
],
'block' => [
'<string>'
]
],
'webSearch' => [
'allow' => [
'<string>'
],
'block' => [
'<string>'
]
],
'localSkills' => [
'allow' => [
'<string>'
],
'block' => [
'<string>'
]
],
'localMcpServers' => [
'allow' => [
'<string>'
],
'block' => [
'<string>'
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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 := "https://api.openworklabs.com/v1/agent-permissions/everyone"
payload := strings.NewReader("{\n \"settings\": {\n \"commands\": {\n \"allow\": [\n \"<string>\"\n ],\n \"block\": [\n \"<string>\"\n ]\n },\n \"hostExecution\": {\n \"allow\": [\n \"<string>\"\n ],\n \"block\": [\n \"<string>\"\n ]\n },\n \"fileEdits\": {\n \"allow\": [\n \"<string>\"\n ],\n \"block\": [\n \"<string>\"\n ]\n },\n \"externalFolders\": {\n \"allow\": [\n \"<string>\"\n ],\n \"block\": [\n \"<string>\"\n ]\n },\n \"computerUse\": {\n \"allow\": [\n \"<string>\"\n ],\n \"block\": [\n \"<string>\"\n ]\n },\n \"computerFiles\": {\n \"allow\": [\n \"<string>\"\n ],\n \"block\": [\n \"<string>\"\n ]\n },\n \"computerClipboard\": {\n \"allow\": [\n \"<string>\"\n ],\n \"block\": [\n \"<string>\"\n ]\n },\n \"appScripting\": {\n \"allow\": [\n \"<string>\"\n ],\n \"block\": [\n \"<string>\"\n ]\n },\n \"websites\": {\n \"allow\": [\n \"<string>\"\n ],\n \"block\": [\n \"<string>\"\n ]\n },\n \"browserUploads\": {\n \"allow\": [\n \"<string>\"\n ],\n \"block\": [\n \"<string>\"\n ]\n },\n \"fileSends\": {\n \"allow\": [\n \"<string>\"\n ],\n \"block\": [\n \"<string>\"\n ]\n },\n \"webSearch\": {\n \"allow\": [\n \"<string>\"\n ],\n \"block\": [\n \"<string>\"\n ]\n },\n \"localSkills\": {\n \"allow\": [\n \"<string>\"\n ],\n \"block\": [\n \"<string>\"\n ]\n },\n \"localMcpServers\": {\n \"allow\": [\n \"<string>\"\n ],\n \"block\": [\n \"<string>\"\n ]\n }\n }\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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("https://api.openworklabs.com/v1/agent-permissions/everyone")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"settings\": {\n \"commands\": {\n \"allow\": [\n \"<string>\"\n ],\n \"block\": [\n \"<string>\"\n ]\n },\n \"hostExecution\": {\n \"allow\": [\n \"<string>\"\n ],\n \"block\": [\n \"<string>\"\n ]\n },\n \"fileEdits\": {\n \"allow\": [\n \"<string>\"\n ],\n \"block\": [\n \"<string>\"\n ]\n },\n \"externalFolders\": {\n \"allow\": [\n \"<string>\"\n ],\n \"block\": [\n \"<string>\"\n ]\n },\n \"computerUse\": {\n \"allow\": [\n \"<string>\"\n ],\n \"block\": [\n \"<string>\"\n ]\n },\n \"computerFiles\": {\n \"allow\": [\n \"<string>\"\n ],\n \"block\": [\n \"<string>\"\n ]\n },\n \"computerClipboard\": {\n \"allow\": [\n \"<string>\"\n ],\n \"block\": [\n \"<string>\"\n ]\n },\n \"appScripting\": {\n \"allow\": [\n \"<string>\"\n ],\n \"block\": [\n \"<string>\"\n ]\n },\n \"websites\": {\n \"allow\": [\n \"<string>\"\n ],\n \"block\": [\n \"<string>\"\n ]\n },\n \"browserUploads\": {\n \"allow\": [\n \"<string>\"\n ],\n \"block\": [\n \"<string>\"\n ]\n },\n \"fileSends\": {\n \"allow\": [\n \"<string>\"\n ],\n \"block\": [\n \"<string>\"\n ]\n },\n \"webSearch\": {\n \"allow\": [\n \"<string>\"\n ],\n \"block\": [\n \"<string>\"\n ]\n },\n \"localSkills\": {\n \"allow\": [\n \"<string>\"\n ],\n \"block\": [\n \"<string>\"\n ]\n },\n \"localMcpServers\": {\n \"allow\": [\n \"<string>\"\n ],\n \"block\": [\n \"<string>\"\n ]\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.openworklabs.com/v1/agent-permissions/everyone")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"settings\": {\n \"commands\": {\n \"allow\": [\n \"<string>\"\n ],\n \"block\": [\n \"<string>\"\n ]\n },\n \"hostExecution\": {\n \"allow\": [\n \"<string>\"\n ],\n \"block\": [\n \"<string>\"\n ]\n },\n \"fileEdits\": {\n \"allow\": [\n \"<string>\"\n ],\n \"block\": [\n \"<string>\"\n ]\n },\n \"externalFolders\": {\n \"allow\": [\n \"<string>\"\n ],\n \"block\": [\n \"<string>\"\n ]\n },\n \"computerUse\": {\n \"allow\": [\n \"<string>\"\n ],\n \"block\": [\n \"<string>\"\n ]\n },\n \"computerFiles\": {\n \"allow\": [\n \"<string>\"\n ],\n \"block\": [\n \"<string>\"\n ]\n },\n \"computerClipboard\": {\n \"allow\": [\n \"<string>\"\n ],\n \"block\": [\n \"<string>\"\n ]\n },\n \"appScripting\": {\n \"allow\": [\n \"<string>\"\n ],\n \"block\": [\n \"<string>\"\n ]\n },\n \"websites\": {\n \"allow\": [\n \"<string>\"\n ],\n \"block\": [\n \"<string>\"\n ]\n },\n \"browserUploads\": {\n \"allow\": [\n \"<string>\"\n ],\n \"block\": [\n \"<string>\"\n ]\n },\n \"fileSends\": {\n \"allow\": [\n \"<string>\"\n ],\n \"block\": [\n \"<string>\"\n ]\n },\n \"webSearch\": {\n \"allow\": [\n \"<string>\"\n ],\n \"block\": [\n \"<string>\"\n ]\n },\n \"localSkills\": {\n \"allow\": [\n \"<string>\"\n ],\n \"block\": [\n \"<string>\"\n ]\n },\n \"localMcpServers\": {\n \"allow\": [\n \"<string>\"\n ],\n \"block\": [\n \"<string>\"\n ]\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"policy": {
"teamId": "<string>",
"name": "<string>",
"memberCount": 0,
"settings": {
"commands": {
"decision": "allow",
"allow": [
"<string>"
],
"block": [
"<string>"
]
},
"hostExecution": {
"decision": "allow",
"allow": [
"<string>"
],
"block": [
"<string>"
]
},
"fileEdits": {
"decision": "allow",
"allow": [
"<string>"
],
"block": [
"<string>"
]
},
"externalFolders": {
"decision": "allow",
"allow": [
"<string>"
],
"block": [
"<string>"
]
},
"computerUse": {
"decision": "allow",
"allow": [
"<string>"
],
"block": [
"<string>"
]
},
"computerFiles": {
"decision": "allow",
"allow": [
"<string>"
],
"block": [
"<string>"
]
},
"computerClipboard": {
"decision": "allow",
"allow": [
"<string>"
],
"block": [
"<string>"
]
},
"appScripting": {
"decision": "allow",
"allow": [
"<string>"
],
"block": [
"<string>"
]
},
"websites": {
"decision": "allow",
"allow": [
"<string>"
],
"block": [
"<string>"
]
},
"browserUploads": {
"decision": "allow",
"allow": [
"<string>"
],
"block": [
"<string>"
]
},
"fileSends": {
"decision": "allow",
"allow": [
"<string>"
],
"block": [
"<string>"
]
},
"webSearch": {
"decision": "allow",
"allow": [
"<string>"
],
"block": [
"<string>"
]
},
"localSkills": {
"decision": "allow",
"allow": [
"<string>"
],
"block": [
"<string>"
]
},
"localMcpServers": {
"decision": "allow",
"allow": [
"<string>"
],
"block": [
"<string>"
]
}
},
"updatedAt": "2023-11-07T05:31:56Z"
}
}{
"error": "invalid_request",
"details": [
{
"message": "<string>",
"path": [
"<string>"
]
}
],
"message": "<string>",
"capability": "<string>"
}{
"error": "unauthorized"
}{
"error": "forbidden",
"reason": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}Authorizations
Was this page helpful?