Change a Model API collaborator's role
Set an existing collaborator to Owner, Editor, Operator, or Viewer. Path collaboratorId must equal body.id. isOrganization must match whether the stored principal is an organization. You cannot demote the last Owner. Public vs private visibility is not managed here. Only current Owners can change roles.
Related:
- GET /api/modelServing/beta/modelApis//collaborators/ (read the current role)
- POST /api/modelServing/beta/modelApis//collaborators (grant access if not assigned)
- DELETE /api/modelServing/beta/modelApis//collaborators/ (remove)
curl --request PUT \
--url https://mycluster.domino.tech/api/modelServing/beta/modelApis/{modelApiId}/collaborators/{collaboratorId} \
--header 'Content-Type: application/json' \
--header 'X-Domino-Api-Key: <api-key>' \
--data '
{
"id": "507f1f77bcf86cd799439011",
"isOrganization": false,
"role": "Operator"
}
'import requests
url = "https://mycluster.domino.tech/api/modelServing/beta/modelApis/{modelApiId}/collaborators/{collaboratorId}"
payload = {
"id": "507f1f77bcf86cd799439011",
"isOrganization": False,
"role": "Operator"
}
headers = {
"X-Domino-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-Domino-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({id: '507f1f77bcf86cd799439011', isOrganization: false, role: 'Operator'})
};
fetch('https://mycluster.domino.tech/api/modelServing/beta/modelApis/{modelApiId}/collaborators/{collaboratorId}', 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://mycluster.domino.tech/api/modelServing/beta/modelApis/{modelApiId}/collaborators/{collaboratorId}",
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([
'id' => '507f1f77bcf86cd799439011',
'isOrganization' => false,
'role' => 'Operator'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Domino-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://mycluster.domino.tech/api/modelServing/beta/modelApis/{modelApiId}/collaborators/{collaboratorId}"
payload := strings.NewReader("{\n \"id\": \"507f1f77bcf86cd799439011\",\n \"isOrganization\": false,\n \"role\": \"Operator\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("X-Domino-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://mycluster.domino.tech/api/modelServing/beta/modelApis/{modelApiId}/collaborators/{collaboratorId}")
.header("X-Domino-Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"507f1f77bcf86cd799439011\",\n \"isOrganization\": false,\n \"role\": \"Operator\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://mycluster.domino.tech/api/modelServing/beta/modelApis/{modelApiId}/collaborators/{collaboratorId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["X-Domino-Api-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"id\": \"507f1f77bcf86cd799439011\",\n \"isOrganization\": false,\n \"role\": \"Operator\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"isOrganization": true,
"role": "Owner"
}Authorizations
Path Parameters
Model API id (24-character hex). Obtain from GET /api/modelServing/v1/modelApis or the Model API details URL.
Domino user or organization id (24-character hex). Must match body.id. Copy
id from GET /api/modelServing/beta/modelApis/{modelApiId}/collaborators.
Body
Domino user or organization id (24-character hex ObjectId). This pattern applies
to GET, POST, and PUT because they share this schema. Responses use the same
shape: stored collaborator refs are Mongo ObjectIds, so non-hex ids are not
returned. Copy id from GET /api/modelServing/beta/modelApis/{modelApiId}/collaborators,
or use a user or organization id from the Domino UI. Set isOrganization to match
the type; Domino does not look up the id to confirm it exists.
^[0-9a-fA-F]{24}$Whether id identifies an organization.
Collaborator role. Management APIs accept Owner, Editor, Operator, and Viewer.
Owner, Editor, Operator, Viewer Response
The updated collaborator.
Domino user or organization id (24-character hex ObjectId). This pattern applies
to GET, POST, and PUT because they share this schema. Responses use the same
shape: stored collaborator refs are Mongo ObjectIds, so non-hex ids are not
returned. Copy id from GET /api/modelServing/beta/modelApis/{modelApiId}/collaborators,
or use a user or organization id from the Domino UI. Set isOrganization to match
the type; Domino does not look up the id to confirm it exists.
^[0-9a-fA-F]{24}$Whether id identifies an organization.
Collaborator role. Management APIs accept Owner, Editor, Operator, and Viewer.
Owner, Editor, Operator, Viewer Was this page helpful?
curl --request PUT \
--url https://mycluster.domino.tech/api/modelServing/beta/modelApis/{modelApiId}/collaborators/{collaboratorId} \
--header 'Content-Type: application/json' \
--header 'X-Domino-Api-Key: <api-key>' \
--data '
{
"id": "507f1f77bcf86cd799439011",
"isOrganization": false,
"role": "Operator"
}
'import requests
url = "https://mycluster.domino.tech/api/modelServing/beta/modelApis/{modelApiId}/collaborators/{collaboratorId}"
payload = {
"id": "507f1f77bcf86cd799439011",
"isOrganization": False,
"role": "Operator"
}
headers = {
"X-Domino-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-Domino-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({id: '507f1f77bcf86cd799439011', isOrganization: false, role: 'Operator'})
};
fetch('https://mycluster.domino.tech/api/modelServing/beta/modelApis/{modelApiId}/collaborators/{collaboratorId}', 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://mycluster.domino.tech/api/modelServing/beta/modelApis/{modelApiId}/collaborators/{collaboratorId}",
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([
'id' => '507f1f77bcf86cd799439011',
'isOrganization' => false,
'role' => 'Operator'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Domino-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://mycluster.domino.tech/api/modelServing/beta/modelApis/{modelApiId}/collaborators/{collaboratorId}"
payload := strings.NewReader("{\n \"id\": \"507f1f77bcf86cd799439011\",\n \"isOrganization\": false,\n \"role\": \"Operator\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("X-Domino-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://mycluster.domino.tech/api/modelServing/beta/modelApis/{modelApiId}/collaborators/{collaboratorId}")
.header("X-Domino-Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"507f1f77bcf86cd799439011\",\n \"isOrganization\": false,\n \"role\": \"Operator\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://mycluster.domino.tech/api/modelServing/beta/modelApis/{modelApiId}/collaborators/{collaboratorId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["X-Domino-Api-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"id\": \"507f1f77bcf86cd799439011\",\n \"isOrganization\": false,\n \"role\": \"Operator\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"isOrganization": true,
"role": "Owner"
}