Save Model API visibility and named collaborators in one request
Persist Public, Discoverable, or Private together with the full list of user and organization collaborators. Use this for a single Access Save so both halves apply or neither does. Load the current values from the related GET routes, send every collaborator that should remain, and keep at least one Owner. Anyone omitted loses the assigned role, including the caller. Omitting yourself is allowed when another Owner remains; omitting the last Owner is rejected.
This route does not change access.isPublic on
GET /api/modelServing/v1/modelApis/. Public still requires an
authenticated caller. com.cerebro.domino.modelmanager.allowPublicModels blocks
Public only; Discoverable and Private stay available when that setting is false.
PUT /api/modelServing/v1/modelApis/ does not accept these fields.
Incremental writes still work: PUT …/visibility and POST/PUT/DELETE …/collaborators.
Related:
- GET /api/modelServing/beta/modelApis//visibility (read current visibility)
- GET /api/modelServing/beta/modelApis//collaborators (list current collaborators)
- GET /api/modelServing/v1/modelApis/ (confirm the Model API id)
curl --request PUT \
--url https://mycluster.domino.tech/api/modelServing/beta/modelApis/{modelApiId}/access \
--header 'Content-Type: application/json' \
--header 'X-Domino-Api-Key: <api-key>' \
--data '
{
"collaborators": [
{
"id": "507f1f77bcf86cd799439011",
"isOrganization": false,
"role": "Owner"
}
],
"visibility": "Discoverable"
}
'import requests
url = "https://mycluster.domino.tech/api/modelServing/beta/modelApis/{modelApiId}/access"
payload = {
"collaborators": [
{
"id": "507f1f77bcf86cd799439011",
"isOrganization": False,
"role": "Owner"
}
],
"visibility": "Discoverable"
}
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({
collaborators: [{id: '507f1f77bcf86cd799439011', isOrganization: false, role: 'Owner'}],
visibility: 'Discoverable'
})
};
fetch('https://mycluster.domino.tech/api/modelServing/beta/modelApis/{modelApiId}/access', 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}/access",
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([
'collaborators' => [
[
'id' => '507f1f77bcf86cd799439011',
'isOrganization' => false,
'role' => 'Owner'
]
],
'visibility' => 'Discoverable'
]),
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}/access"
payload := strings.NewReader("{\n \"collaborators\": [\n {\n \"id\": \"507f1f77bcf86cd799439011\",\n \"isOrganization\": false,\n \"role\": \"Owner\"\n }\n ],\n \"visibility\": \"Discoverable\"\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}/access")
.header("X-Domino-Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"collaborators\": [\n {\n \"id\": \"507f1f77bcf86cd799439011\",\n \"isOrganization\": false,\n \"role\": \"Owner\"\n }\n ],\n \"visibility\": \"Discoverable\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://mycluster.domino.tech/api/modelServing/beta/modelApis/{modelApiId}/access")
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 \"collaborators\": [\n {\n \"id\": \"507f1f77bcf86cd799439011\",\n \"isOrganization\": false,\n \"role\": \"Owner\"\n }\n ],\n \"visibility\": \"Discoverable\"\n}"
response = http.request(request)
puts response.read_body{
"collaborators": [
{
"id": "507f1f77bcf86cd799439011",
"isOrganization": false,
"role": "Owner"
}
],
"visibility": "Discoverable"
}Authorizations
Path Parameters
Model API id (24-character hex). Copy id from GET /api/modelServing/v1/modelApis
or from the Model API details URL.
Body
Complete replacement list of user and organization collaborators. Must contain at least one Owner and no duplicate ids. Omitting the caller is allowed when another Owner remains.
Show child attributes
Show child attributes
Model API visibility to persist.
Public, Discoverable, Private Response
Visibility and the complete named collaborator list after persist. This matches GET /api/modelServing/beta/modelApis/{modelApiId}/visibility plus GET /api/modelServing/beta/modelApis/{modelApiId}/collaborators.
Complete replacement list of user and organization collaborators. Must contain at least one Owner and no duplicate ids. Omitting the caller is allowed when another Owner remains.
Show child attributes
Show child attributes
Model API visibility to persist.
Public, Discoverable, Private Was this page helpful?
curl --request PUT \
--url https://mycluster.domino.tech/api/modelServing/beta/modelApis/{modelApiId}/access \
--header 'Content-Type: application/json' \
--header 'X-Domino-Api-Key: <api-key>' \
--data '
{
"collaborators": [
{
"id": "507f1f77bcf86cd799439011",
"isOrganization": false,
"role": "Owner"
}
],
"visibility": "Discoverable"
}
'import requests
url = "https://mycluster.domino.tech/api/modelServing/beta/modelApis/{modelApiId}/access"
payload = {
"collaborators": [
{
"id": "507f1f77bcf86cd799439011",
"isOrganization": False,
"role": "Owner"
}
],
"visibility": "Discoverable"
}
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({
collaborators: [{id: '507f1f77bcf86cd799439011', isOrganization: false, role: 'Owner'}],
visibility: 'Discoverable'
})
};
fetch('https://mycluster.domino.tech/api/modelServing/beta/modelApis/{modelApiId}/access', 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}/access",
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([
'collaborators' => [
[
'id' => '507f1f77bcf86cd799439011',
'isOrganization' => false,
'role' => 'Owner'
]
],
'visibility' => 'Discoverable'
]),
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}/access"
payload := strings.NewReader("{\n \"collaborators\": [\n {\n \"id\": \"507f1f77bcf86cd799439011\",\n \"isOrganization\": false,\n \"role\": \"Owner\"\n }\n ],\n \"visibility\": \"Discoverable\"\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}/access")
.header("X-Domino-Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"collaborators\": [\n {\n \"id\": \"507f1f77bcf86cd799439011\",\n \"isOrganization\": false,\n \"role\": \"Owner\"\n }\n ],\n \"visibility\": \"Discoverable\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://mycluster.domino.tech/api/modelServing/beta/modelApis/{modelApiId}/access")
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 \"collaborators\": [\n {\n \"id\": \"507f1f77bcf86cd799439011\",\n \"isOrganization\": false,\n \"role\": \"Owner\"\n }\n ],\n \"visibility\": \"Discoverable\"\n}"
response = http.request(request)
puts response.read_body{
"collaborators": [
{
"id": "507f1f77bcf86cd799439011",
"isOrganization": false,
"role": "Owner"
}
],
"visibility": "Discoverable"
}