群組
創建群組
POST /api/organizations/{organizationPk}/groups/
參數
organizationPk
是
string
A UUID string identifying this 組織 ID
請求內容
{
"name": "群組名稱",
"organization": "550e8400-e29b-41d4-a716-446655440000",
"permissions": [
"550e8400-e29b-41d4-a716-446655440000"
]
}
程式碼範例
# 呼叫 API 示例 (Shell)
curl -X POST "https://api.maiagent.ai/api/organizations/{organizationPk}/groups/" \
-H "Authorization: Api-Key YOUR_API_KEY" \
# 請確認在執行前替換 YOUR_API_KEY 並核對請求資料。
const axios = require('axios');
// 請求內容 (payload):
const data = {};
// 設定請求標頭
const config = {
headers: {
'Authorization': 'Api-Key YOUR_API_KEY',
'Content-Type': 'application/json'
}
};
axios.post("https://api.maiagent.ai/api/organizations/{organizationPk}/groups/", data, config)
.then(response => {
console.log('成功取得回應,以下是數據:');
console.log(response.data);
})
.catch(error => {
console.error('請求發生錯誤,請檢查請求內容與 API Key:');
console.error(error.response?.data || error.message);
});
import requests
import json
url = "https://api.maiagent.ai/api/organizations/{organizationPk}/groups/"
headers = {
"Authorization": "Api-Key YOUR_API_KEY",
"Content-Type": "application/json"
}
# 請求內容 (payload)
data = {}
response = requests.post(url, json=data, headers=headers)
try:
print("成功取得回應,以下是返回數據:")
print(response.json())
except Exception as e:
print("請求出現錯誤,請檢查輸入參數與 API Key:", e)
<?php
require 'vendor/autoload.php';
$client = new GuzzleHttpClient();
try {
$response = $client->post("https://api.maiagent.ai/api/organizations/{organizationPk}/groups/", [
'headers' => [
'Authorization' => 'Api-Key YOUR_API_KEY',
'Content-Type' => 'application/json'
],
// 請求內容 (payload) 已包含在請求中
'json' => {}
]);
$data = json_decode($response->getBody(), true);
echo "成功取得回應:
";
print_r($data);
} catch (Exception $e) {
echo '發生錯誤, 請檢查請求細節及 API Key: ' . $e->getMessage();
}
?>
回應內容
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "群組名稱",
"organization": "550e8400-e29b-41d4-a716-446655440000",
"permissions": [
"550e8400-e29b-41d4-a716-446655440000"
],
"createdAt": "pattern_example"
}
獲取群組列表
GET /api/organizations/{organizationPk}/groups/
參數
organizationPk
是
string
A UUID string identifying this 組織 ID
page
否
integer
A page number within the paginated result set.
pageSize
否
integer
Number of results to return per page.
程式碼範例
# 呼叫 API 示例 (Shell)
curl -X GET "https://api.maiagent.ai/api/organizations/{organizationPk}/groups/" \
-H "Authorization: Api-Key YOUR_API_KEY" \
# 請確認在執行前替換 YOUR_API_KEY 並核對請求資料。
const axios = require('axios');
// 設定請求標頭 (請替換 YOUR_API_KEY)
const config = {
headers: {
'Authorization': 'Api-Key YOUR_API_KEY'
}
};
axios.get("https://api.maiagent.ai/api/organizations/{organizationPk}/groups/", config)
.then(response => {
console.log('成功取得回應:');
console.log(response.data);
})
.catch(error => {
console.error('發生錯誤,請檢查 API Key 與請求參數:');
console.error(error.response?.data || error.message);
});
import requests
url = "https://api.maiagent.ai/api/organizations/{organizationPk}/groups/"
headers = {
"Authorization": "Api-Key YOUR_API_KEY"
}
response = requests.get(url, headers=headers)
try:
print("成功取得回應,數據如下:")
print(response.json())
except Exception as e:
print("發生錯誤,請檢查 API 請求:", e)
<?php
require 'vendor/autoload.php';
$client = new GuzzleHttpClient();
try {
$response = $client->get("https://api.maiagent.ai/api/organizations/{organizationPk}/groups/", [
'headers' => [
'Authorization' => 'Api-Key YOUR_API_KEY'
]
]);
$data = json_decode($response->getBody(), true);
echo "成功取得回應:
";
print_r($data);
} catch (Exception $e) {
echo '錯誤, 請確認 API Key 與請求配置: ' . $e->getMessage();
}
?>
回應內容
{
"count": 0,
"next": "example_string",
"previous": "example_string",
"results": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "群組名稱",
"permissions": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "群組名稱",
"description": "群組描述"
}
],
"createdAt": "pattern_example"
}
]
}
查看特定群組
GET /api/organizations/{organizationPk}/groups/{id}/
參數
id
是
string
A UUID string identifying this 群組.
organizationPk
是
string
A UUID string identifying this 組織 ID
程式碼範例
# 呼叫 API 示例 (Shell)
curl -X GET "https://api.maiagent.ai/api/organizations/{organizationPk}/groups/550e8400-e29b-41d4-a716-446655440000/" \
-H "Authorization: Api-Key YOUR_API_KEY" \
# 請確認在執行前替換 YOUR_API_KEY 並核對請求資料。
const axios = require('axios');
// 設定請求標頭 (請替換 YOUR_API_KEY)
const config = {
headers: {
'Authorization': 'Api-Key YOUR_API_KEY'
}
};
axios.get("https://api.maiagent.ai/api/organizations/{organizationPk}/groups/550e8400-e29b-41d4-a716-446655440000/", config)
.then(response => {
console.log('成功取得回應:');
console.log(response.data);
})
.catch(error => {
console.error('發生錯誤,請檢查 API Key 與請求參數:');
console.error(error.response?.data || error.message);
});
import requests
url = "https://api.maiagent.ai/api/organizations/{organizationPk}/groups/550e8400-e29b-41d4-a716-446655440000/"
headers = {
"Authorization": "Api-Key YOUR_API_KEY"
}
response = requests.get(url, headers=headers)
try:
print("成功取得回應,數據如下:")
print(response.json())
except Exception as e:
print("發生錯誤,請檢查 API 請求:", e)
<?php
require 'vendor/autoload.php';
$client = new GuzzleHttpClient();
try {
$response = $client->get("https://api.maiagent.ai/api/organizations/{organizationPk}/groups/550e8400-e29b-41d4-a716-446655440000/", [
'headers' => [
'Authorization' => 'Api-Key YOUR_API_KEY'
]
]);
$data = json_decode($response->getBody(), true);
echo "成功取得回應:
";
print_r($data);
} catch (Exception $e) {
echo '錯誤, 請確認 API Key 與請求配置: ' . $e->getMessage();
}
?>
回應內容
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "群組名稱",
"permissions": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "群組名稱",
"description": "群組描述"
}
],
"createdAt": "pattern_example"
}
更新群組權限
PUT /api/organizations/{organizationPk}/groups/{id}/
參數
id
是
string
A UUID string identifying this 群組.
organizationPk
是
string
A UUID string identifying this 組織 ID
請求內容
{
"name": "群組名稱",
"organization": "550e8400-e29b-41d4-a716-446655440000",
"permissions": [
"550e8400-e29b-41d4-a716-446655440000"
]
}
程式碼範例
# 呼叫 API 示例 (Shell)
curl -X PUT "https://api.maiagent.ai/api/organizations/{organizationPk}/groups/550e8400-e29b-41d4-a716-446655440000/" \
-H "Authorization: Api-Key YOUR_API_KEY" \
# 請確認在執行前替換 YOUR_API_KEY 並核對請求資料。
const axios = require('axios');
// 請求內容 (payload):
const data = {};
// 設定請求標頭
const config = {
headers: {
'Authorization': 'Api-Key YOUR_API_KEY',
'Content-Type': 'application/json'
}
};
axios.put("https://api.maiagent.ai/api/organizations/{organizationPk}/groups/550e8400-e29b-41d4-a716-446655440000/", data, config)
.then(response => {
console.log('成功取得回應,以下是數據:');
console.log(response.data);
})
.catch(error => {
console.error('請求發生錯誤,請檢查請求內容與 API Key:');
console.error(error.response?.data || error.message);
});
import requests
import json
url = "https://api.maiagent.ai/api/organizations/{organizationPk}/groups/550e8400-e29b-41d4-a716-446655440000/"
headers = {
"Authorization": "Api-Key YOUR_API_KEY",
"Content-Type": "application/json"
}
# 請求內容 (payload)
data = {}
response = requests.put(url, json=data, headers=headers)
try:
print("成功取得回應,以下是返回數據:")
print(response.json())
except Exception as e:
print("請求出現錯誤,請檢查輸入參數與 API Key:", e)
<?php
require 'vendor/autoload.php';
$client = new GuzzleHttpClient();
try {
$response = $client->put("https://api.maiagent.ai/api/organizations/{organizationPk}/groups/550e8400-e29b-41d4-a716-446655440000/", [
'headers' => [
'Authorization' => 'Api-Key YOUR_API_KEY',
'Content-Type' => 'application/json'
],
// 請求內容 (payload) 已包含在請求中
'json' => {}
]);
$data = json_decode($response->getBody(), true);
echo "成功取得回應:
";
print_r($data);
} catch (Exception $e) {
echo '發生錯誤, 請檢查請求細節及 API Key: ' . $e->getMessage();
}
?>
回應內容
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "群組名稱",
"organization": "550e8400-e29b-41d4-a716-446655440000",
"permissions": [
"550e8400-e29b-41d4-a716-446655440000"
],
"createdAt": "pattern_example"
}
部分更新群組權限
PATCH /api/organizations/{organizationPk}/groups/{id}/
參數
id
是
string
A UUID string identifying this 群組.
organizationPk
是
string
A UUID string identifying this 組織 ID
請求內容
{
"name": "群組名稱",
"organization": "550e8400-e29b-41d4-a716-446655440000",
"permissions": [
"550e8400-e29b-41d4-a716-446655440000"
]
}
程式碼範例
# 呼叫 API 示例 (Shell)
curl -X PATCH "https://api.maiagent.ai/api/organizations/{organizationPk}/groups/550e8400-e29b-41d4-a716-446655440000/" \
-H "Authorization: Api-Key YOUR_API_KEY" \
# 請確認在執行前替換 YOUR_API_KEY 並核對請求資料。
const axios = require('axios');
// 請求內容 (payload):
const data = {};
// 設定請求標頭
const config = {
headers: {
'Authorization': 'Api-Key YOUR_API_KEY',
'Content-Type': 'application/json'
}
};
axios.patch("https://api.maiagent.ai/api/organizations/{organizationPk}/groups/550e8400-e29b-41d4-a716-446655440000/", data, config)
.then(response => {
console.log('成功取得回應,以下是數據:');
console.log(response.data);
})
.catch(error => {
console.error('請求發生錯誤,請檢查請求內容與 API Key:');
console.error(error.response?.data || error.message);
});
import requests
import json
url = "https://api.maiagent.ai/api/organizations/{organizationPk}/groups/550e8400-e29b-41d4-a716-446655440000/"
headers = {
"Authorization": "Api-Key YOUR_API_KEY",
"Content-Type": "application/json"
}
# 請求內容 (payload)
data = {}
response = requests.patch(url, json=data, headers=headers)
try:
print("成功取得回應,以下是返回數據:")
print(response.json())
except Exception as e:
print("請求出現錯誤,請檢查輸入參數與 API Key:", e)
<?php
require 'vendor/autoload.php';
$client = new GuzzleHttpClient();
try {
$response = $client->patch("https://api.maiagent.ai/api/organizations/{organizationPk}/groups/550e8400-e29b-41d4-a716-446655440000/", [
'headers' => [
'Authorization' => 'Api-Key YOUR_API_KEY',
'Content-Type' => 'application/json'
],
// 請求內容 (payload) 已包含在請求中
'json' => {}
]);
$data = json_decode($response->getBody(), true);
echo "成功取得回應:
";
print_r($data);
} catch (Exception $e) {
echo '發生錯誤, 請檢查請求細節及 API Key: ' . $e->getMessage();
}
?>
回應內容
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "群組名稱",
"organization": "550e8400-e29b-41d4-a716-446655440000",
"permissions": [
"550e8400-e29b-41d4-a716-446655440000"
],
"createdAt": "pattern_example"
}
刪除群組
DELETE /api/organizations/{organizationPk}/groups/{id}/
參數
id
是
string
A UUID string identifying this 群組.
organizationPk
是
string
A UUID string identifying this 組織 ID
程式碼範例
# 呼叫 API 示例 (Shell)
curl -X DELETE "https://api.maiagent.ai/api/organizations/{organizationPk}/groups/550e8400-e29b-41d4-a716-446655440000/" \
-H "Authorization: Api-Key YOUR_API_KEY" \
# 請確認在執行前替換 YOUR_API_KEY 並核對請求資料。
const axios = require('axios');
// 請求內容 (payload):
const data = {};
// 設定請求標頭
const config = {
headers: {
'Authorization': 'Api-Key YOUR_API_KEY',
'Content-Type': 'application/json'
}
};
axios.delete("https://api.maiagent.ai/api/organizations/{organizationPk}/groups/550e8400-e29b-41d4-a716-446655440000/", data, config)
.then(response => {
console.log('成功取得回應,以下是數據:');
console.log(response.data);
})
.catch(error => {
console.error('請求發生錯誤,請檢查請求內容與 API Key:');
console.error(error.response?.data || error.message);
});
import requests
import json
url = "https://api.maiagent.ai/api/organizations/{organizationPk}/groups/550e8400-e29b-41d4-a716-446655440000/"
headers = {
"Authorization": "Api-Key YOUR_API_KEY",
"Content-Type": "application/json"
}
# 請求內容 (payload)
data = {}
response = requests.delete(url, json=data, headers=headers)
try:
print("成功取得回應,以下是返回數據:")
print(response.json())
except Exception as e:
print("請求出現錯誤,請檢查輸入參數與 API Key:", e)
<?php
require 'vendor/autoload.php';
$client = new GuzzleHttpClient();
try {
$response = $client->delete("https://api.maiagent.ai/api/organizations/{organizationPk}/groups/550e8400-e29b-41d4-a716-446655440000/", [
'headers' => [
'Authorization' => 'Api-Key YOUR_API_KEY',
'Content-Type' => 'application/json'
],
// 請求內容 (payload) 已包含在請求中
'json' => {}
]);
$data = json_decode($response->getBody(), true);
echo "成功取得回應:
";
print_r($data);
} catch (Exception $e) {
echo '發生錯誤, 請檢查請求細節及 API Key: ' . $e->getMessage();
}
?>
狀態碼
204
No response body
新增群組成員
POST /api/organizations/{organizationPk}/groups/{groupPk}/group-members/
參數
groupPk
是
string
organizationPk
是
string
A UUID string identifying this 組織 ID
請求內容
{
"group": "550e8400-e29b-41d4-a716-446655440000",
"member": "550e8400-e29b-41d4-a716-446655440000"
}
程式碼範例
# 呼叫 API 示例 (Shell)
curl -X POST "https://api.maiagent.ai/api/organizations/{organizationPk}/groups/{groupPk}/group-members/" \
-H "Authorization: Api-Key YOUR_API_KEY" \
# 請確認在執行前替換 YOUR_API_KEY 並核對請求資料。
const axios = require('axios');
// 請求內容 (payload):
const data = {};
// 設定請求標頭
const config = {
headers: {
'Authorization': 'Api-Key YOUR_API_KEY',
'Content-Type': 'application/json'
}
};
axios.post("https://api.maiagent.ai/api/organizations/{organizationPk}/groups/{groupPk}/group-members/", data, config)
.then(response => {
console.log('成功取得回應,以下是數據:');
console.log(response.data);
})
.catch(error => {
console.error('請求發生錯誤,請檢查請求內容與 API Key:');
console.error(error.response?.data || error.message);
});
import requests
import json
url = "https://api.maiagent.ai/api/organizations/{organizationPk}/groups/{groupPk}/group-members/"
headers = {
"Authorization": "Api-Key YOUR_API_KEY",
"Content-Type": "application/json"
}
# 請求內容 (payload)
data = {}
response = requests.post(url, json=data, headers=headers)
try:
print("成功取得回應,以下是返回數據:")
print(response.json())
except Exception as e:
print("請求出現錯誤,請檢查輸入參數與 API Key:", e)
<?php
require 'vendor/autoload.php';
$client = new GuzzleHttpClient();
try {
$response = $client->post("https://api.maiagent.ai/api/organizations/{organizationPk}/groups/{groupPk}/group-members/", [
'headers' => [
'Authorization' => 'Api-Key YOUR_API_KEY',
'Content-Type' => 'application/json'
],
// 請求內容 (payload) 已包含在請求中
'json' => {}
]);
$data = json_decode($response->getBody(), true);
echo "成功取得回應:
";
print_r($data);
} catch (Exception $e) {
echo '發生錯誤, 請檢查請求細節及 API Key: ' . $e->getMessage();
}
?>
回應內容
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"group": "550e8400-e29b-41d4-a716-446655440000",
"member": "550e8400-e29b-41d4-a716-446655440000",
"createdAt": "pattern_example"
}
批量新增群組成員
POST /api/organizations/{organizationPk}/groups/{groupPk}/group-members/bulk-create/
參數
groupPk
是
string
organizationPk
是
string
A UUID string identifying this 組織 ID
程式碼範例
# 呼叫 API 示例 (Shell)
curl -X POST "https://api.maiagent.ai/api/organizations/{organizationPk}/groups/{groupPk}/group-members/bulk-create/" \
-H "Authorization: Api-Key YOUR_API_KEY" \
# 請確認在執行前替換 YOUR_API_KEY 並核對請求資料。
const axios = require('axios');
// 請求內容 (payload):
const data = {};
// 設定請求標頭
const config = {
headers: {
'Authorization': 'Api-Key YOUR_API_KEY',
'Content-Type': 'application/json'
}
};
axios.post("https://api.maiagent.ai/api/organizations/{organizationPk}/groups/{groupPk}/group-members/bulk-create/", data, config)
.then(response => {
console.log('成功取得回應,以下是數據:');
console.log(response.data);
})
.catch(error => {
console.error('請求發生錯誤,請檢查請求內容與 API Key:');
console.error(error.response?.data || error.message);
});
import requests
import json
url = "https://api.maiagent.ai/api/organizations/{organizationPk}/groups/{groupPk}/group-members/bulk-create/"
headers = {
"Authorization": "Api-Key YOUR_API_KEY",
"Content-Type": "application/json"
}
# 請求內容 (payload)
data = {}
response = requests.post(url, json=data, headers=headers)
try:
print("成功取得回應,以下是返回數據:")
print(response.json())
except Exception as e:
print("請求出現錯誤,請檢查輸入參數與 API Key:", e)
<?php
require 'vendor/autoload.php';
$client = new GuzzleHttpClient();
try {
$response = $client->post("https://api.maiagent.ai/api/organizations/{organizationPk}/groups/{groupPk}/group-members/bulk-create/", [
'headers' => [
'Authorization' => 'Api-Key YOUR_API_KEY',
'Content-Type' => 'application/json'
],
// 請求內容 (payload) 已包含在請求中
'json' => {}
]);
$data = json_decode($response->getBody(), true);
echo "成功取得回應:
";
print_r($data);
} catch (Exception $e) {
echo '發生錯誤, 請檢查請求細節及 API Key: ' . $e->getMessage();
}
?>
狀態碼
200
No response body
獲取群組成員列表
GET /api/organizations/{organizationPk}/groups/{groupPk}/group-members/
參數
groupPk
是
string
organizationPk
是
string
A UUID string identifying this 組織 ID
page
否
integer
A page number within the paginated result set.
pageSize
否
integer
Number of results to return per page.
程式碼範例
# 呼叫 API 示例 (Shell)
curl -X GET "https://api.maiagent.ai/api/organizations/{organizationPk}/groups/{groupPk}/group-members/" \
-H "Authorization: Api-Key YOUR_API_KEY" \
# 請確認在執行前替換 YOUR_API_KEY 並核對請求資料。
const axios = require('axios');
// 設定請求標頭 (請替換 YOUR_API_KEY)
const config = {
headers: {
'Authorization': 'Api-Key YOUR_API_KEY'
}
};
axios.get("https://api.maiagent.ai/api/organizations/{organizationPk}/groups/{groupPk}/group-members/", config)
.then(response => {
console.log('成功取得回應:');
console.log(response.data);
})
.catch(error => {
console.error('發生錯誤,請檢查 API Key 與請求參數:');
console.error(error.response?.data || error.message);
});
import requests
url = "https://api.maiagent.ai/api/organizations/{organizationPk}/groups/{groupPk}/group-members/"
headers = {
"Authorization": "Api-Key YOUR_API_KEY"
}
response = requests.get(url, headers=headers)
try:
print("成功取得回應,數據如下:")
print(response.json())
except Exception as e:
print("發生錯誤,請檢查 API 請求:", e)
<?php
require 'vendor/autoload.php';
$client = new GuzzleHttpClient();
try {
$response = $client->get("https://api.maiagent.ai/api/organizations/{organizationPk}/groups/{groupPk}/group-members/", [
'headers' => [
'Authorization' => 'Api-Key YOUR_API_KEY'
]
]);
$data = json_decode($response->getBody(), true);
echo "成功取得回應:
";
print_r($data);
} catch (Exception $e) {
echo '錯誤, 請確認 API Key 與請求配置: ' . $e->getMessage();
}
?>
回應內容
{
"count": 0,
"next": "example_string",
"previous": "example_string",
"results": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"member": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "群組名稱",
"email": "example_string",
"organization": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "群組名稱",
"owner": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "群組名稱"
},
"createdAt": "pattern_example",
"usageStatistics": "example_string",
"organizationPlan": "example_string"
},
"isOwner": "example_string",
"permissions": "example_string",
"createdAt": "pattern_example"
},
"createdAt": "pattern_example"
}
]
}
查看特定群組成員
GET /api/organizations/{organizationPk}/groups/{groupPk}/group-members/{id}/
參數
groupPk
是
string
id
是
string
A UUID string identifying this 群組成員.
organizationPk
是
string
A UUID string identifying this 組織 ID
程式碼範例
# 呼叫 API 示例 (Shell)
curl -X GET "https://api.maiagent.ai/api/organizations/{organizationPk}/groups/{groupPk}/group-members/550e8400-e29b-41d4-a716-446655440000/" \
-H "Authorization: Api-Key YOUR_API_KEY" \
# 請確認在執行前替換 YOUR_API_KEY 並核對請求資料。
const axios = require('axios');
// 設定請求標頭 (請替換 YOUR_API_KEY)
const config = {
headers: {
'Authorization': 'Api-Key YOUR_API_KEY'
}
};
axios.get("https://api.maiagent.ai/api/organizations/{organizationPk}/groups/{groupPk}/group-members/550e8400-e29b-41d4-a716-446655440000/", config)
.then(response => {
console.log('成功取得回應:');
console.log(response.data);
})
.catch(error => {
console.error('發生錯誤,請檢查 API Key 與請求參數:');
console.error(error.response?.data || error.message);
});
import requests
url = "https://api.maiagent.ai/api/organizations/{organizationPk}/groups/{groupPk}/group-members/550e8400-e29b-41d4-a716-446655440000/"
headers = {
"Authorization": "Api-Key YOUR_API_KEY"
}
response = requests.get(url, headers=headers)
try:
print("成功取得回應,數據如下:")
print(response.json())
except Exception as e:
print("發生錯誤,請檢查 API 請求:", e)
<?php
require 'vendor/autoload.php';
$client = new GuzzleHttpClient();
try {
$response = $client->get("https://api.maiagent.ai/api/organizations/{organizationPk}/groups/{groupPk}/group-members/550e8400-e29b-41d4-a716-446655440000/", [
'headers' => [
'Authorization' => 'Api-Key YOUR_API_KEY'
]
]);
$data = json_decode($response->getBody(), true);
echo "成功取得回應:
";
print_r($data);
} catch (Exception $e) {
echo '錯誤, 請確認 API Key 與請求配置: ' . $e->getMessage();
}
?>
回應內容
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"member": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "群組名稱",
"email": "example_string",
"organization": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "群組名稱",
"owner": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "群組名稱"
},
"createdAt": "pattern_example",
"usageStatistics": "example_string",
"organizationPlan": "example_string"
},
"isOwner": "example_string",
"permissions": "example_string",
"createdAt": "pattern_example"
},
"createdAt": "pattern_example"
}
移除群組成員
DELETE /api/organizations/{organizationPk}/groups/{groupPk}/group-members/{id}/
參數
groupPk
是
string
id
是
string
A UUID string identifying this 群組成員.
organizationPk
是
string
A UUID string identifying this 組織 ID
程式碼範例
# 呼叫 API 示例 (Shell)
curl -X DELETE "https://api.maiagent.ai/api/organizations/{organizationPk}/groups/{groupPk}/group-members/550e8400-e29b-41d4-a716-446655440000/" \
-H "Authorization: Api-Key YOUR_API_KEY" \
# 請確認在執行前替換 YOUR_API_KEY 並核對請求資料。
const axios = require('axios');
// 請求內容 (payload):
const data = {};
// 設定請求標頭
const config = {
headers: {
'Authorization': 'Api-Key YOUR_API_KEY',
'Content-Type': 'application/json'
}
};
axios.delete("https://api.maiagent.ai/api/organizations/{organizationPk}/groups/{groupPk}/group-members/550e8400-e29b-41d4-a716-446655440000/", data, config)
.then(response => {
console.log('成功取得回應,以下是數據:');
console.log(response.data);
})
.catch(error => {
console.error('請求發生錯誤,請檢查請求內容與 API Key:');
console.error(error.response?.data || error.message);
});
import requests
import json
url = "https://api.maiagent.ai/api/organizations/{organizationPk}/groups/{groupPk}/group-members/550e8400-e29b-41d4-a716-446655440000/"
headers = {
"Authorization": "Api-Key YOUR_API_KEY",
"Content-Type": "application/json"
}
# 請求內容 (payload)
data = {}
response = requests.delete(url, json=data, headers=headers)
try:
print("成功取得回應,以下是返回數據:")
print(response.json())
except Exception as e:
print("請求出現錯誤,請檢查輸入參數與 API Key:", e)
<?php
require 'vendor/autoload.php';
$client = new GuzzleHttpClient();
try {
$response = $client->delete("https://api.maiagent.ai/api/organizations/{organizationPk}/groups/{groupPk}/group-members/550e8400-e29b-41d4-a716-446655440000/", [
'headers' => [
'Authorization' => 'Api-Key YOUR_API_KEY',
'Content-Type' => 'application/json'
],
// 請求內容 (payload) 已包含在請求中
'json' => {}
]);
$data = json_decode($response->getBody(), true);
echo "成功取得回應:
";
print_r($data);
} catch (Exception $e) {
echo '發生錯誤, 請檢查請求細節及 API Key: ' . $e->getMessage();
}
?>
狀態碼
204
No response body
將聊天機器人分配給群組
POST /api/organizations/{organizationPk}/groups/{groupPk}/group-chatbots/
參數
groupPk
是
string
organizationPk
是
string
A UUID string identifying this 組織 ID
請求內容
{
"group": "550e8400-e29b-41d4-a716-446655440000",
"chatbot": "550e8400-e29b-41d4-a716-446655440000"
}
程式碼範例
# 呼叫 API 示例 (Shell)
curl -X POST "https://api.maiagent.ai/api/organizations/{organizationPk}/groups/{groupPk}/group-chatbots/" \
-H "Authorization: Api-Key YOUR_API_KEY" \
# 請確認在執行前替換 YOUR_API_KEY 並核對請求資料。
const axios = require('axios');
// 請求內容 (payload):
const data = {};
// 設定請求標頭
const config = {
headers: {
'Authorization': 'Api-Key YOUR_API_KEY',
'Content-Type': 'application/json'
}
};
axios.post("https://api.maiagent.ai/api/organizations/{organizationPk}/groups/{groupPk}/group-chatbots/", data, config)
.then(response => {
console.log('成功取得回應,以下是數據:');
console.log(response.data);
})
.catch(error => {
console.error('請求發生錯誤,請檢查請求內容與 API Key:');
console.error(error.response?.data || error.message);
});
import requests
import json
url = "https://api.maiagent.ai/api/organizations/{organizationPk}/groups/{groupPk}/group-chatbots/"
headers = {
"Authorization": "Api-Key YOUR_API_KEY",
"Content-Type": "application/json"
}
# 請求內容 (payload)
data = {}
response = requests.post(url, json=data, headers=headers)
try:
print("成功取得回應,以下是返回數據:")
print(response.json())
except Exception as e:
print("請求出現錯誤,請檢查輸入參數與 API Key:", e)
<?php
require 'vendor/autoload.php';
$client = new GuzzleHttpClient();
try {
$response = $client->post("https://api.maiagent.ai/api/organizations/{organizationPk}/groups/{groupPk}/group-chatbots/", [
'headers' => [
'Authorization' => 'Api-Key YOUR_API_KEY',
'Content-Type' => 'application/json'
],
// 請求內容 (payload) 已包含在請求中
'json' => {}
]);
$data = json_decode($response->getBody(), true);
echo "成功取得回應:
";
print_r($data);
} catch (Exception $e) {
echo '發生錯誤, 請檢查請求細節及 API Key: ' . $e->getMessage();
}
?>
回應內容
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"group": "550e8400-e29b-41d4-a716-446655440000",
"chatbot": "550e8400-e29b-41d4-a716-446655440000",
"createdAt": "pattern_example"
}
批量分配聊天機器人給群組
POST /api/organizations/{organizationPk}/groups/{groupPk}/group-chatbots/bulk-create/
參數
groupPk
是
string
organizationPk
是
string
A UUID string identifying this 組織 ID
程式碼範例
# 呼叫 API 示例 (Shell)
curl -X POST "https://api.maiagent.ai/api/organizations/{organizationPk}/groups/{groupPk}/group-chatbots/bulk-create/" \
-H "Authorization: Api-Key YOUR_API_KEY" \
# 請確認在執行前替換 YOUR_API_KEY 並核對請求資料。
const axios = require('axios');
// 請求內容 (payload):
const data = {};
// 設定請求標頭
const config = {
headers: {
'Authorization': 'Api-Key YOUR_API_KEY',
'Content-Type': 'application/json'
}
};
axios.post("https://api.maiagent.ai/api/organizations/{organizationPk}/groups/{groupPk}/group-chatbots/bulk-create/", data, config)
.then(response => {
console.log('成功取得回應,以下是數據:');
console.log(response.data);
})
.catch(error => {
console.error('請求發生錯誤,請檢查請求內容與 API Key:');
console.error(error.response?.data || error.message);
});
import requests
import json
url = "https://api.maiagent.ai/api/organizations/{organizationPk}/groups/{groupPk}/group-chatbots/bulk-create/"
headers = {
"Authorization": "Api-Key YOUR_API_KEY",
"Content-Type": "application/json"
}
# 請求內容 (payload)
data = {}
response = requests.post(url, json=data, headers=headers)
try:
print("成功取得回應,以下是返回數據:")
print(response.json())
except Exception as e:
print("請求出現錯誤,請檢查輸入參數與 API Key:", e)
<?php
require 'vendor/autoload.php';
$client = new GuzzleHttpClient();
try {
$response = $client->post("https://api.maiagent.ai/api/organizations/{organizationPk}/groups/{groupPk}/group-chatbots/bulk-create/", [
'headers' => [
'Authorization' => 'Api-Key YOUR_API_KEY',
'Content-Type' => 'application/json'
],
// 請求內容 (payload) 已包含在請求中
'json' => {}
]);
$data = json_decode($response->getBody(), true);
echo "成功取得回應:
";
print_r($data);
} catch (Exception $e) {
echo '發生錯誤, 請檢查請求細節及 API Key: ' . $e->getMessage();
}
?>
狀態碼
200
No response body
獲取群組聊天機器人列表
GET /api/organizations/{organizationPk}/groups/{groupPk}/group-chatbots/
參數
groupPk
是
string
organizationPk
是
string
A UUID string identifying this 組織 ID
page
否
integer
A page number within the paginated result set.
pageSize
否
integer
Number of results to return per page.
程式碼範例
# 呼叫 API 示例 (Shell)
curl -X GET "https://api.maiagent.ai/api/organizations/{organizationPk}/groups/{groupPk}/group-chatbots/" \
-H "Authorization: Api-Key YOUR_API_KEY" \
# 請確認在執行前替換 YOUR_API_KEY 並核對請求資料。
const axios = require('axios');
// 設定請求標頭 (請替換 YOUR_API_KEY)
const config = {
headers: {
'Authorization': 'Api-Key YOUR_API_KEY'
}
};
axios.get("https://api.maiagent.ai/api/organizations/{organizationPk}/groups/{groupPk}/group-chatbots/", config)
.then(response => {
console.log('成功取得回應:');
console.log(response.data);
})
.catch(error => {
console.error('發生錯誤,請檢查 API Key 與請求參數:');
console.error(error.response?.data || error.message);
});
import requests
url = "https://api.maiagent.ai/api/organizations/{organizationPk}/groups/{groupPk}/group-chatbots/"
headers = {
"Authorization": "Api-Key YOUR_API_KEY"
}
response = requests.get(url, headers=headers)
try:
print("成功取得回應,數據如下:")
print(response.json())
except Exception as e:
print("發生錯誤,請檢查 API 請求:", e)
<?php
require 'vendor/autoload.php';
$client = new GuzzleHttpClient();
try {
$response = $client->get("https://api.maiagent.ai/api/organizations/{organizationPk}/groups/{groupPk}/group-chatbots/", [
'headers' => [
'Authorization' => 'Api-Key YOUR_API_KEY'
]
]);
$data = json_decode($response->getBody(), true);
echo "成功取得回應:
";
print_r($data);
} catch (Exception $e) {
echo '錯誤, 請確認 API Key 與請求配置: ' . $e->getMessage();
}
?>
回應內容
{
"count": 0,
"next": "example_string",
"previous": "example_string",
"results": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"group": "550e8400-e29b-41d4-a716-446655440000",
"chatbot": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"workflow": "550e8400-e29b-41d4-a716-446655440000",
"name": "群組名稱",
"largeLanguageModel": "550e8400-e29b-41d4-a716-446655440000",
"rag": "550e8400-e29b-41d4-a716-446655440000",
"embeddingModel": "550e8400-e29b-41d4-a716-446655440000",
"rerankerModel": "550e8400-e29b-41d4-a716-446655440000",
"instructions": "example_string",
"webhookUrl": "example_string",
"apiWebChatId": "example_string",
"updatedAt": "pattern_example",
"organization": "550e8400-e29b-41d4-a716-446655440000",
"builtInWorkflow": "550e8400-e29b-41d4-a716-446655440000",
"replyMode": {},
"template": "example_string",
"unanswerableTemplate": "example_string",
"totalWordsCount": 0,
"enableChineseConversion": false,
"outputFormat": null,
"databaseUrl": "example_string",
"databaseType": "example_string"
},
"createdAt": "pattern_example"
}
]
}
移除群組聊天機器人
DELETE /api/organizations/{organizationPk}/groups/{groupPk}/group-chatbots/{id}/
參數
groupPk
是
string
id
是
string
A UUID string identifying this 群組 AI 助理.
organizationPk
是
string
A UUID string identifying this 組織 ID
程式碼範例
# 呼叫 API 示例 (Shell)
curl -X DELETE "https://api.maiagent.ai/api/organizations/{organizationPk}/groups/{groupPk}/group-chatbots/550e8400-e29b-41d4-a716-446655440000/" \
-H "Authorization: Api-Key YOUR_API_KEY" \
# 請確認在執行前替換 YOUR_API_KEY 並核對請求資料。
const axios = require('axios');
// 請求內容 (payload):
const data = {};
// 設定請求標頭
const config = {
headers: {
'Authorization': 'Api-Key YOUR_API_KEY',
'Content-Type': 'application/json'
}
};
axios.delete("https://api.maiagent.ai/api/organizations/{organizationPk}/groups/{groupPk}/group-chatbots/550e8400-e29b-41d4-a716-446655440000/", data, config)
.then(response => {
console.log('成功取得回應,以下是數據:');
console.log(response.data);
})
.catch(error => {
console.error('請求發生錯誤,請檢查請求內容與 API Key:');
console.error(error.response?.data || error.message);
});
import requests
import json
url = "https://api.maiagent.ai/api/organizations/{organizationPk}/groups/{groupPk}/group-chatbots/550e8400-e29b-41d4-a716-446655440000/"
headers = {
"Authorization": "Api-Key YOUR_API_KEY",
"Content-Type": "application/json"
}
# 請求內容 (payload)
data = {}
response = requests.delete(url, json=data, headers=headers)
try:
print("成功取得回應,以下是返回數據:")
print(response.json())
except Exception as e:
print("請求出現錯誤,請檢查輸入參數與 API Key:", e)
<?php
require 'vendor/autoload.php';
$client = new GuzzleHttpClient();
try {
$response = $client->delete("https://api.maiagent.ai/api/organizations/{organizationPk}/groups/{groupPk}/group-chatbots/550e8400-e29b-41d4-a716-446655440000/", [
'headers' => [
'Authorization' => 'Api-Key YOUR_API_KEY',
'Content-Type' => 'application/json'
],
// 請求內容 (payload) 已包含在請求中
'json' => {}
]);
$data = json_decode($response->getBody(), true);
echo "成功取得回應:
";
print_r($data);
} catch (Exception $e) {
echo '發生錯誤, 請檢查請求細節及 API Key: ' . $e->getMessage();
}
?>
狀態碼
204
No response body
Last updated
Was this helpful?