Agent Terminals
Atomically replace workspace grants using the expected device revision
Atomically replace workspace grants using the expected device revision. The request requires an authenticated caller and enforces terminal ownership, access grants, and activity visibility.
POST
/
api
/
v1
/
agents
/
terminals
/
{agentTerminalId}
/
workspaces
Atomically replace workspace grants using the expected device revision
curl --request POST \
--url https://api.revoengine.com/api/v1/agents/terminals/{agentTerminalId}/workspaces \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"expectedRevision": 2,
"workspaces": [
{
"agentTerminalWorkspaceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"path": "<string>",
"restricted": true,
"users": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"groups": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"inheritDevicePermissions": true
}
]
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
expectedRevision: 2,
workspaces: [
{
agentTerminalWorkspaceId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
name: '<string>',
path: '<string>',
restricted: true,
users: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
groups: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
inheritDevicePermissions: true
}
]
})
};
fetch('https://api.revoengine.com/api/v1/agents/terminals/{agentTerminalId}/workspaces', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.revoengine.com/api/v1/agents/terminals/{agentTerminalId}/workspaces"
payload = {
"expectedRevision": 2,
"workspaces": [
{
"agentTerminalWorkspaceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"path": "<string>",
"restricted": True,
"users": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"groups": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"inheritDevicePermissions": True
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"agentTerminalId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"ownerUserId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"workspace": "<string>",
"workspaces": [
{
"agentTerminalWorkspaceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"path": "<string>",
"status": "pending",
"mode": "review",
"networkMode": "restricted",
"restricted": true,
"users": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"groups": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"browserSettingsRevision": 1,
"browserSettings": {
"fps": 32.5,
"width": 2080,
"height": 1320,
"alwaysRecord": true,
"recordingMode": "local",
"defaultBrowserProfileId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"inheritDevicePermissions": true
}
],
"status": "pending",
"mode": "review",
"networkMode": "restricted",
"revision": 123,
"connectionRevision": 123,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"restricted": true,
"users": [
"<string>"
],
"groups": [
"<string>"
],
"refToken": "<string>",
"lastOnlineAt": "2023-11-07T05:31:56Z",
"online": true,
"connectionIp": "<string>",
"canManage": true,
"createdBy": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"lastUpdateAt": "2023-11-07T05:31:56Z",
"lastUpdateBy": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"version": 123
}Body
application/json
Response
201 - application/json
⌘I
Atomically replace workspace grants using the expected device revision
curl --request POST \
--url https://api.revoengine.com/api/v1/agents/terminals/{agentTerminalId}/workspaces \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"expectedRevision": 2,
"workspaces": [
{
"agentTerminalWorkspaceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"path": "<string>",
"restricted": true,
"users": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"groups": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"inheritDevicePermissions": true
}
]
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
expectedRevision: 2,
workspaces: [
{
agentTerminalWorkspaceId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
name: '<string>',
path: '<string>',
restricted: true,
users: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
groups: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
inheritDevicePermissions: true
}
]
})
};
fetch('https://api.revoengine.com/api/v1/agents/terminals/{agentTerminalId}/workspaces', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.revoengine.com/api/v1/agents/terminals/{agentTerminalId}/workspaces"
payload = {
"expectedRevision": 2,
"workspaces": [
{
"agentTerminalWorkspaceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"path": "<string>",
"restricted": True,
"users": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"groups": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"inheritDevicePermissions": True
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"agentTerminalId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"ownerUserId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"workspace": "<string>",
"workspaces": [
{
"agentTerminalWorkspaceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"path": "<string>",
"status": "pending",
"mode": "review",
"networkMode": "restricted",
"restricted": true,
"users": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"groups": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"browserSettingsRevision": 1,
"browserSettings": {
"fps": 32.5,
"width": 2080,
"height": 1320,
"alwaysRecord": true,
"recordingMode": "local",
"defaultBrowserProfileId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"inheritDevicePermissions": true
}
],
"status": "pending",
"mode": "review",
"networkMode": "restricted",
"revision": 123,
"connectionRevision": 123,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"restricted": true,
"users": [
"<string>"
],
"groups": [
"<string>"
],
"refToken": "<string>",
"lastOnlineAt": "2023-11-07T05:31:56Z",
"online": true,
"connectionIp": "<string>",
"canManage": true,
"createdBy": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"lastUpdateAt": "2023-11-07T05:31:56Z",
"lastUpdateBy": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"version": 123
}
