Python (SDK)
from meetkai_mka1 import SDK
with SDK(
bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
) as sdk:
res = sdk.auth.cluster.accept_invite()
# Handle response
print(res)import { SDK } from "@meetkai/mka1";
const sdk = new SDK({
bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await sdk.auth.cluster.acceptInvite({});
console.log(result);
}
run();using MeetKai.MKA1;
using MeetKai.MKA1.Types.Components;
var sdk = new SDK(bearerAuth: "<YOUR_BEARER_TOKEN_HERE>");
var res = await sdk.Auth.Cluster.AcceptInviteAsync();
// handle responsecurl --request POST \
--url https://apigw.mka1.com/api/v1/authentication/cluster-invite/accept \
--header 'Content-Type: application/json' \
--data '
{
"token": "<string>",
"email": "jsmith@example.com",
"orgName": "<string>",
"name": "<string>",
"password": "<string>",
"orgSlug": "<string>",
"logo": "<string>",
"passwordless": true,
"issueApiKey": true
}
'const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
token: '<string>',
email: 'jsmith@example.com',
orgName: '<string>',
name: '<string>',
password: '<string>',
orgSlug: '<string>',
logo: '<string>',
passwordless: true,
issueApiKey: true
})
};
fetch('https://apigw.mka1.com/api/v1/authentication/cluster-invite/accept', 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/cluster-invite/accept",
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([
'token' => '<string>',
'email' => 'jsmith@example.com',
'orgName' => '<string>',
'name' => '<string>',
'password' => '<string>',
'orgSlug' => '<string>',
'logo' => '<string>',
'passwordless' => true,
'issueApiKey' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$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://apigw.mka1.com/api/v1/authentication/cluster-invite/accept"
payload := strings.NewReader("{\n \"token\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"orgName\": \"<string>\",\n \"name\": \"<string>\",\n \"password\": \"<string>\",\n \"orgSlug\": \"<string>\",\n \"logo\": \"<string>\",\n \"passwordless\": true,\n \"issueApiKey\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
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://apigw.mka1.com/api/v1/authentication/cluster-invite/accept")
.header("Content-Type", "application/json")
.body("{\n \"token\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"orgName\": \"<string>\",\n \"name\": \"<string>\",\n \"password\": \"<string>\",\n \"orgSlug\": \"<string>\",\n \"logo\": \"<string>\",\n \"passwordless\": true,\n \"issueApiKey\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://apigw.mka1.com/api/v1/authentication/cluster-invite/accept")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"token\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"orgName\": \"<string>\",\n \"name\": \"<string>\",\n \"password\": \"<string>\",\n \"orgSlug\": \"<string>\",\n \"logo\": \"<string>\",\n \"passwordless\": true,\n \"issueApiKey\": true\n}"
response = http.request(request)
puts response.read_body{
"message": "<string>",
"user": {
"id": "<string>"
},
"organization": {
"id": "<string>",
"slug": "<string>"
},
"apiKey": {
"id": "<string>",
"userId": "<string>",
"userType": "user",
"orgId": "<string>",
"teamId": "<string>",
"scopes": [
"<string>"
],
"name": "<string>",
"key": "<string>",
"prefix": "<string>",
"start": "<string>",
"expiresAt": "<string>"
}
}{
"message": "<string>",
"code": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}Cluster Admin
Aceitar um convite de cluster (público)
Aceite um convite e crie a organização. Usuário já autenticado, novo proprietário com e-mail/senha, ou proprietário de máquina headless vinculado a e-mail com passwordless: true, issueApiKey: true. Um slug reservado (api, seja fornecido como orgSlug ou derivado de orgName) é recusado com 400 reserved_org_slug; um slug já pertencente a outra organização é recusado com 409. Observe que POST /organization/check-slug não conhece slugs reservados e informará api como disponível.
POST
/
api
/
v1
/
authentication
/
cluster-invite
/
accept
Python (SDK)
from meetkai_mka1 import SDK
with SDK(
bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
) as sdk:
res = sdk.auth.cluster.accept_invite()
# Handle response
print(res)import { SDK } from "@meetkai/mka1";
const sdk = new SDK({
bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await sdk.auth.cluster.acceptInvite({});
console.log(result);
}
run();using MeetKai.MKA1;
using MeetKai.MKA1.Types.Components;
var sdk = new SDK(bearerAuth: "<YOUR_BEARER_TOKEN_HERE>");
var res = await sdk.Auth.Cluster.AcceptInviteAsync();
// handle responsecurl --request POST \
--url https://apigw.mka1.com/api/v1/authentication/cluster-invite/accept \
--header 'Content-Type: application/json' \
--data '
{
"token": "<string>",
"email": "jsmith@example.com",
"orgName": "<string>",
"name": "<string>",
"password": "<string>",
"orgSlug": "<string>",
"logo": "<string>",
"passwordless": true,
"issueApiKey": true
}
'const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
token: '<string>',
email: 'jsmith@example.com',
orgName: '<string>',
name: '<string>',
password: '<string>',
orgSlug: '<string>',
logo: '<string>',
passwordless: true,
issueApiKey: true
})
};
fetch('https://apigw.mka1.com/api/v1/authentication/cluster-invite/accept', 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/cluster-invite/accept",
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([
'token' => '<string>',
'email' => 'jsmith@example.com',
'orgName' => '<string>',
'name' => '<string>',
'password' => '<string>',
'orgSlug' => '<string>',
'logo' => '<string>',
'passwordless' => true,
'issueApiKey' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$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://apigw.mka1.com/api/v1/authentication/cluster-invite/accept"
payload := strings.NewReader("{\n \"token\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"orgName\": \"<string>\",\n \"name\": \"<string>\",\n \"password\": \"<string>\",\n \"orgSlug\": \"<string>\",\n \"logo\": \"<string>\",\n \"passwordless\": true,\n \"issueApiKey\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
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://apigw.mka1.com/api/v1/authentication/cluster-invite/accept")
.header("Content-Type", "application/json")
.body("{\n \"token\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"orgName\": \"<string>\",\n \"name\": \"<string>\",\n \"password\": \"<string>\",\n \"orgSlug\": \"<string>\",\n \"logo\": \"<string>\",\n \"passwordless\": true,\n \"issueApiKey\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://apigw.mka1.com/api/v1/authentication/cluster-invite/accept")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"token\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"orgName\": \"<string>\",\n \"name\": \"<string>\",\n \"password\": \"<string>\",\n \"orgSlug\": \"<string>\",\n \"logo\": \"<string>\",\n \"passwordless\": true,\n \"issueApiKey\": true\n}"
response = http.request(request)
puts response.read_body{
"message": "<string>",
"user": {
"id": "<string>"
},
"organization": {
"id": "<string>",
"slug": "<string>"
},
"apiKey": {
"id": "<string>",
"userId": "<string>",
"userType": "user",
"orgId": "<string>",
"teamId": "<string>",
"scopes": [
"<string>"
],
"name": "<string>",
"key": "<string>",
"prefix": "<string>",
"start": "<string>",
"expiresAt": "<string>"
}
}{
"message": "<string>",
"code": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}Cabeçalhos
Optional external end-user identifier forwarded by the API gateway.
Corpo
application/json
Minimum string length:
1Pattern:
^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$Minimum string length:
1Minimum string length:
8Esta página foi útil?
⌘I