Change Workflow Permissions
curl --request POST \
--url https://{instance}.domo.com/models/{modelId}/permissions \
--header 'Content-Type: application/json' \
--header 'X-DOMO-Developer-Token: <api-key>' \
--data '
[
{
"id": "123456",
"permissions": [
"ADMIN",
"SHARE",
"DELETE",
"WRITE",
"READ",
"EXPORT",
"EXECUTE",
"UPDATE_CONTENT"
],
"name": "John Doe",
"type": "USER"
},
{
"id": "98765",
"name": "John Smith",
"type": "USER",
"permissions": [
"READ"
]
}
]
'import requests
url = "https://{instance}.domo.com/models/{modelId}/permissions"
payload = [
{
"id": "123456",
"permissions": ["ADMIN", "SHARE", "DELETE", "WRITE", "READ", "EXPORT", "EXECUTE", "UPDATE_CONTENT"],
"name": "John Doe",
"type": "USER"
},
{
"id": "98765",
"name": "John Smith",
"type": "USER",
"permissions": ["READ"]
}
]
headers = {
"X-DOMO-Developer-Token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-DOMO-Developer-Token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify([
{
id: '123456',
permissions: [
'ADMIN',
'SHARE',
'DELETE',
'WRITE',
'READ',
'EXPORT',
'EXECUTE',
'UPDATE_CONTENT'
],
name: 'John Doe',
type: 'USER'
},
{id: '98765', name: 'John Smith', type: 'USER', permissions: ['READ']}
])
};
fetch('https://{instance}.domo.com/models/{modelId}/permissions', 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://{instance}.domo.com/models/{modelId}/permissions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
[
'id' => '123456',
'permissions' => [
'ADMIN',
'SHARE',
'DELETE',
'WRITE',
'READ',
'EXPORT',
'EXECUTE',
'UPDATE_CONTENT'
],
'name' => 'John Doe',
'type' => 'USER'
],
[
'id' => '98765',
'name' => 'John Smith',
'type' => 'USER',
'permissions' => [
'READ'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-DOMO-Developer-Token: <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://{instance}.domo.com/models/{modelId}/permissions"
payload := strings.NewReader("[\n {\n \"id\": \"123456\",\n \"permissions\": [\n \"ADMIN\",\n \"SHARE\",\n \"DELETE\",\n \"WRITE\",\n \"READ\",\n \"EXPORT\",\n \"EXECUTE\",\n \"UPDATE_CONTENT\"\n ],\n \"name\": \"John Doe\",\n \"type\": \"USER\"\n },\n {\n \"id\": \"98765\",\n \"name\": \"John Smith\",\n \"type\": \"USER\",\n \"permissions\": [\n \"READ\"\n ]\n }\n]")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-DOMO-Developer-Token", "<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.post("https://{instance}.domo.com/models/{modelId}/permissions")
.header("X-DOMO-Developer-Token", "<api-key>")
.header("Content-Type", "application/json")
.body("[\n {\n \"id\": \"123456\",\n \"permissions\": [\n \"ADMIN\",\n \"SHARE\",\n \"DELETE\",\n \"WRITE\",\n \"READ\",\n \"EXPORT\",\n \"EXECUTE\",\n \"UPDATE_CONTENT\"\n ],\n \"name\": \"John Doe\",\n \"type\": \"USER\"\n },\n {\n \"id\": \"98765\",\n \"name\": \"John Smith\",\n \"type\": \"USER\",\n \"permissions\": [\n \"READ\"\n ]\n }\n]")
.asString();require 'uri'
require 'net/http'
url = URI("https://{instance}.domo.com/models/{modelId}/permissions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-DOMO-Developer-Token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "[\n {\n \"id\": \"123456\",\n \"permissions\": [\n \"ADMIN\",\n \"SHARE\",\n \"DELETE\",\n \"WRITE\",\n \"READ\",\n \"EXPORT\",\n \"EXECUTE\",\n \"UPDATE_CONTENT\"\n ],\n \"name\": \"John Doe\",\n \"type\": \"USER\"\n },\n {\n \"id\": \"98765\",\n \"name\": \"John Smith\",\n \"type\": \"USER\",\n \"permissions\": [\n \"READ\"\n ]\n }\n]"
response = http.request(request)
puts response.read_bodyWorkflows API
Change Workflow Permissions
Updates the permissions for a workflow model
POST
/
models
/
{modelId}
/
permissions
Change Workflow Permissions
curl --request POST \
--url https://{instance}.domo.com/models/{modelId}/permissions \
--header 'Content-Type: application/json' \
--header 'X-DOMO-Developer-Token: <api-key>' \
--data '
[
{
"id": "123456",
"permissions": [
"ADMIN",
"SHARE",
"DELETE",
"WRITE",
"READ",
"EXPORT",
"EXECUTE",
"UPDATE_CONTENT"
],
"name": "John Doe",
"type": "USER"
},
{
"id": "98765",
"name": "John Smith",
"type": "USER",
"permissions": [
"READ"
]
}
]
'import requests
url = "https://{instance}.domo.com/models/{modelId}/permissions"
payload = [
{
"id": "123456",
"permissions": ["ADMIN", "SHARE", "DELETE", "WRITE", "READ", "EXPORT", "EXECUTE", "UPDATE_CONTENT"],
"name": "John Doe",
"type": "USER"
},
{
"id": "98765",
"name": "John Smith",
"type": "USER",
"permissions": ["READ"]
}
]
headers = {
"X-DOMO-Developer-Token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-DOMO-Developer-Token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify([
{
id: '123456',
permissions: [
'ADMIN',
'SHARE',
'DELETE',
'WRITE',
'READ',
'EXPORT',
'EXECUTE',
'UPDATE_CONTENT'
],
name: 'John Doe',
type: 'USER'
},
{id: '98765', name: 'John Smith', type: 'USER', permissions: ['READ']}
])
};
fetch('https://{instance}.domo.com/models/{modelId}/permissions', 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://{instance}.domo.com/models/{modelId}/permissions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
[
'id' => '123456',
'permissions' => [
'ADMIN',
'SHARE',
'DELETE',
'WRITE',
'READ',
'EXPORT',
'EXECUTE',
'UPDATE_CONTENT'
],
'name' => 'John Doe',
'type' => 'USER'
],
[
'id' => '98765',
'name' => 'John Smith',
'type' => 'USER',
'permissions' => [
'READ'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-DOMO-Developer-Token: <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://{instance}.domo.com/models/{modelId}/permissions"
payload := strings.NewReader("[\n {\n \"id\": \"123456\",\n \"permissions\": [\n \"ADMIN\",\n \"SHARE\",\n \"DELETE\",\n \"WRITE\",\n \"READ\",\n \"EXPORT\",\n \"EXECUTE\",\n \"UPDATE_CONTENT\"\n ],\n \"name\": \"John Doe\",\n \"type\": \"USER\"\n },\n {\n \"id\": \"98765\",\n \"name\": \"John Smith\",\n \"type\": \"USER\",\n \"permissions\": [\n \"READ\"\n ]\n }\n]")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-DOMO-Developer-Token", "<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.post("https://{instance}.domo.com/models/{modelId}/permissions")
.header("X-DOMO-Developer-Token", "<api-key>")
.header("Content-Type", "application/json")
.body("[\n {\n \"id\": \"123456\",\n \"permissions\": [\n \"ADMIN\",\n \"SHARE\",\n \"DELETE\",\n \"WRITE\",\n \"READ\",\n \"EXPORT\",\n \"EXECUTE\",\n \"UPDATE_CONTENT\"\n ],\n \"name\": \"John Doe\",\n \"type\": \"USER\"\n },\n {\n \"id\": \"98765\",\n \"name\": \"John Smith\",\n \"type\": \"USER\",\n \"permissions\": [\n \"READ\"\n ]\n }\n]")
.asString();require 'uri'
require 'net/http'
url = URI("https://{instance}.domo.com/models/{modelId}/permissions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-DOMO-Developer-Token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "[\n {\n \"id\": \"123456\",\n \"permissions\": [\n \"ADMIN\",\n \"SHARE\",\n \"DELETE\",\n \"WRITE\",\n \"READ\",\n \"EXPORT\",\n \"EXECUTE\",\n \"UPDATE_CONTENT\"\n ],\n \"name\": \"John Doe\",\n \"type\": \"USER\"\n },\n {\n \"id\": \"98765\",\n \"name\": \"John Smith\",\n \"type\": \"USER\",\n \"permissions\": [\n \"READ\"\n ]\n }\n]"
response = http.request(request)
puts response.read_bodyAuthorizations
Domo Developer Token for authentication
Path Parameters
The ID of the workflow model
Body
application/json
User or group ID
Example:
"123456"
Type of entity
Available options:
USER, GROUP Example:
"USER"
Array of permissions to grant
Available options:
ADMIN, SHARE, DELETE, WRITE, READ, EXPORT, EXECUTE, UPDATE_CONTENT Example:
["ADMIN", "READ", "EXECUTE"]
Name of the user or group
Example:
"John Doe"
Response
Permissions updated successfully
⌘I