Read one Model API collaborator's role
Return id, role, and isOrganization for one assigned user or organization. Match is by id only (user or organization). Everyone / visibility is not returned. You need permission to view the Model API.
Related:
- GET /api/modelServing/beta/modelApis//collaborators (list all)
- PUT /api/modelServing/beta/modelApis//collaborators/ (change role)
- DELETE /api/modelServing/beta/modelApis//collaborators/ (remove)
curl --request GET \
--url https://mycluster.domino.tech/api/modelServing/beta/modelApis/{modelApiId}/collaborators/{collaboratorId} \
--header 'X-Domino-Api-Key: <api-key>'import requests
url = "https://mycluster.domino.tech/api/modelServing/beta/modelApis/{modelApiId}/collaborators/{collaboratorId}"
headers = {"X-Domino-Api-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Domino-Api-Key': '<api-key>'}};
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 => "GET",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://mycluster.domino.tech/api/modelServing/beta/modelApis/{modelApiId}/collaborators/{collaboratorId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Domino-Api-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://mycluster.domino.tech/api/modelServing/beta/modelApis/{modelApiId}/collaborators/{collaboratorId}")
.header("X-Domino-Api-Key", "<api-key>")
.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::Get.new(url)
request["X-Domino-Api-Key"] = '<api-key>'
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). Copy id from
GET /api/modelServing/beta/modelApis/{modelApiId}/collaborators.
Response
The Model API collaborator with the given id.
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 GET \
--url https://mycluster.domino.tech/api/modelServing/beta/modelApis/{modelApiId}/collaborators/{collaboratorId} \
--header 'X-Domino-Api-Key: <api-key>'import requests
url = "https://mycluster.domino.tech/api/modelServing/beta/modelApis/{modelApiId}/collaborators/{collaboratorId}"
headers = {"X-Domino-Api-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Domino-Api-Key': '<api-key>'}};
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 => "GET",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://mycluster.domino.tech/api/modelServing/beta/modelApis/{modelApiId}/collaborators/{collaboratorId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Domino-Api-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://mycluster.domino.tech/api/modelServing/beta/modelApis/{modelApiId}/collaborators/{collaboratorId}")
.header("X-Domino-Api-Key", "<api-key>")
.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::Get.new(url)
request["X-Domino-Api-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"isOrganization": true,
"role": "Owner"
}