Organization
Substituir acesso ao modelo do membro
Somente um proprietário/administrador da organização atual pode gerenciar esta política. null herda; uma lista vazia nega tudo. As substituições do usuário têm precedência sobre a união das equipes configuradas. O registro de modelos ativos da organização permanece como limite superior. Use IDs canônicos de modelos servidos, não aliases automáticos ou de benchmark. As alterações são aplicadas em até 30 segundos na próxima distribuição do modelo.
PUT
/
api
/
v1
/
authentication
/
orgs
/
{orgId}
/
members
/
{memberId}
/
model-access
CSharp (SDK)
using MeetKai.MKA1;
using MeetKai.MKA1.Types.Requests;
using System.Collections.Generic;
var sdk = new SDK();
var res = await sdk.Auth.ModelAccess.SetMemberModelAccessAsync(
security: new SetMemberModelAccessSecurity() {
BearerAuth = "<YOUR_BEARER_TOKEN_HERE>",
},
orgId: "<id>",
memberId: "<id>",
body: new SetMemberModelAccessRequestBody() {
ModelIds = new List<string>() {},
}
);
// handle responsefrom meetkai_mka1 import SDK, models
with SDK() as sdk:
res = sdk.auth.model_access.set_member_model_access(security=models.SetMemberModelAccessSecurity(
bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
), org_id="<id>", member_id="<id>", model_ids=[])
# Handle response
print(res)import { SDK } from "@meetkai/mka1";
const sdk = new SDK();
async function run() {
const result = await sdk.auth.modelAccess.setMemberModelAccess({
bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
}, {
orgId: "<id>",
memberId: "<id>",
requestBody: {
modelIds: [],
},
});
console.log(result);
}
run();package main
import(
"context"
mka1 "github.com/MeetKai/mka1-sdks/go"
"github.com/MeetKai/mka1-sdks/go/models/operations"
"log"
)
func main() {
ctx := context.Background()
s := mka1.New()
res, err := s.Auth.ModelAccess.SetMemberModelAccess(ctx, operations.SetMemberModelAccessSecurity{
BearerAuth: mka1.Pointer("<YOUR_BEARER_TOKEN_HERE>"),
}, "<id>", "<id>", operations.SetMemberModelAccessRequestBody{
ModelIds: []string{},
})
if err != nil {
log.Fatal(err)
}
if res.Object != nil {
// handle response
}
}curl --request PUT \
--url https://apigw.mka1.com/api/v1/authentication/orgs/{orgId}/members/{memberId}/model-access \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model_ids": [
"<string>"
]
}
'const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({model_ids: ['<string>']})
};
fetch('https://apigw.mka1.com/api/v1/authentication/orgs/{orgId}/members/{memberId}/model-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://apigw.mka1.com/api/v1/authentication/orgs/{orgId}/members/{memberId}/model-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([
'model_ids' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.put("https://apigw.mka1.com/api/v1/authentication/orgs/{orgId}/members/{memberId}/model-access")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model_ids\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://apigw.mka1.com/api/v1/authentication/orgs/{orgId}/members/{memberId}/model-access")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"model_ids\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"model_ids": [
"<string>"
]
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}Autorizações
bearerAuthsessionCookie
Parâmetros de caminho
Corpo
application/json
Esta página foi útil?
⌘I
CSharp (SDK)
using MeetKai.MKA1;
using MeetKai.MKA1.Types.Requests;
using System.Collections.Generic;
var sdk = new SDK();
var res = await sdk.Auth.ModelAccess.SetMemberModelAccessAsync(
security: new SetMemberModelAccessSecurity() {
BearerAuth = "<YOUR_BEARER_TOKEN_HERE>",
},
orgId: "<id>",
memberId: "<id>",
body: new SetMemberModelAccessRequestBody() {
ModelIds = new List<string>() {},
}
);
// handle responsefrom meetkai_mka1 import SDK, models
with SDK() as sdk:
res = sdk.auth.model_access.set_member_model_access(security=models.SetMemberModelAccessSecurity(
bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
), org_id="<id>", member_id="<id>", model_ids=[])
# Handle response
print(res)import { SDK } from "@meetkai/mka1";
const sdk = new SDK();
async function run() {
const result = await sdk.auth.modelAccess.setMemberModelAccess({
bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
}, {
orgId: "<id>",
memberId: "<id>",
requestBody: {
modelIds: [],
},
});
console.log(result);
}
run();package main
import(
"context"
mka1 "github.com/MeetKai/mka1-sdks/go"
"github.com/MeetKai/mka1-sdks/go/models/operations"
"log"
)
func main() {
ctx := context.Background()
s := mka1.New()
res, err := s.Auth.ModelAccess.SetMemberModelAccess(ctx, operations.SetMemberModelAccessSecurity{
BearerAuth: mka1.Pointer("<YOUR_BEARER_TOKEN_HERE>"),
}, "<id>", "<id>", operations.SetMemberModelAccessRequestBody{
ModelIds: []string{},
})
if err != nil {
log.Fatal(err)
}
if res.Object != nil {
// handle response
}
}curl --request PUT \
--url https://apigw.mka1.com/api/v1/authentication/orgs/{orgId}/members/{memberId}/model-access \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model_ids": [
"<string>"
]
}
'const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({model_ids: ['<string>']})
};
fetch('https://apigw.mka1.com/api/v1/authentication/orgs/{orgId}/members/{memberId}/model-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://apigw.mka1.com/api/v1/authentication/orgs/{orgId}/members/{memberId}/model-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([
'model_ids' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.put("https://apigw.mka1.com/api/v1/authentication/orgs/{orgId}/members/{memberId}/model-access")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model_ids\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://apigw.mka1.com/api/v1/authentication/orgs/{orgId}/members/{memberId}/model-access")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"model_ids\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"model_ids": [
"<string>"
]
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}