SCIM
SCIM 2.0 端點讓您的身分提供者(Entra ID、Okta 等)自動開通、更新與停用組織成員。基底網址是 https://api.maiagent.ai/api/v1/scim/{orgUuid},路徑不以 / 結尾;認證用 Authorization: Bearer <SCIM Token>(在後台身分同步設定取得,不是 API Key),Content-Type: application/scim+json,每個組織每分鐘 100 次請求。欄位對應與停用語意見技術手冊成員開通。
取得服務提供者設定(IdP 探索用)
GET /api/v1/scim/{orgUuid}/ServiceProviderConfig
參數
orgUuid
✅
string
程式碼範例
# 呼叫 API 示例 (Shell)
curl -X GET "https://api.maiagent.ai/api/v1/scim/550e8400-e29b-41d4-a716-446655440000/ServiceProviderConfig" \
-H "Authorization: Bearer YOUR_SCIM_TOKEN"
# 請確認在執行前替換 YOUR_API_KEY 並核對請求資料。const axios = require('axios');
// 設定請求標頭
const config = {
headers: {
'Authorization': 'Bearer YOUR_SCIM_TOKEN'
}
};
axios.get("https://api.maiagent.ai/api/v1/scim/550e8400-e29b-41d4-a716-446655440000/ServiceProviderConfig", config)
.then(response => {
console.log('成功取得回應:');
console.log(response.data);
})
.catch(error => {
console.error('請求發生錯誤:');
console.error(error.response?.data || error.message);
});回應內容
200
No response body
列出或查詢成員(支援 `filter`、`startIndex`、`count`)
GET /api/v1/scim/{orgUuid}/Users
參數
orgUuid
✅
string
程式碼範例
回應內容
200
No response body
建立成員
POST /api/v1/scim/{orgUuid}/Users
參數
orgUuid
✅
string
程式碼範例
回應內容
200
No response body
取得特定成員
GET /api/v1/scim/{orgUuid}/Users/{userId}
參數
orgUuid
✅
string
userId
✅
string
程式碼範例
回應內容
200
No response body
整筆取代成員
PUT /api/v1/scim/{orgUuid}/Users/{userId}
參數
orgUuid
✅
string
userId
✅
string
程式碼範例
回應內容
200
No response body
局部更新成員(停用、改名、改 externalId)
PATCH /api/v1/scim/{orgUuid}/Users/{userId}
參數
orgUuid
✅
string
userId
✅
string
程式碼範例
回應內容
200
No response body
停用成員
DELETE /api/v1/scim/{orgUuid}/Users/{userId}
參數
orgUuid
✅
string
userId
✅
string
程式碼範例
回應內容
204
No response body
列出群組(對應 MaiAgent 角色)
GET /api/v1/scim/{orgUuid}/Groups
參數
orgUuid
✅
string
程式碼範例
回應內容
200
No response body
建立群組
POST /api/v1/scim/{orgUuid}/Groups
參數
orgUuid
✅
string
程式碼範例
回應內容
200
No response body
取得特定群組
GET /api/v1/scim/{orgUuid}/Groups/{groupId}
參數
groupId
✅
string
orgUuid
✅
string
程式碼範例
回應內容
200
No response body
整筆取代群組
PUT /api/v1/scim/{orgUuid}/Groups/{groupId}
參數
groupId
✅
string
orgUuid
✅
string
程式碼範例
回應內容
200
No response body
局部更新群組(改名、增減成員)
PATCH /api/v1/scim/{orgUuid}/Groups/{groupId}
參數
groupId
✅
string
orgUuid
✅
string
程式碼範例
回應內容
200
No response body
刪除群組
DELETE /api/v1/scim/{orgUuid}/Groups/{groupId}
參數
groupId
✅
string
orgUuid
✅
string
程式碼範例
回應內容
204
No response body
最後更新於
這有幫助嗎?