|
通过托管的OAuth认证访问Zoho People API。支持对员工、部门、职位、考勤、请假以及自定义HR表单进行完整的增删改查操作。
bash
https://gateway.maton.ai/zoho-people/{原生API路径}
将{原生API路径}替换为实际的Zoho People API端点路径。网关会将请求代理到people.zoho.com并自动注入您的OAuth令牌。
所有请求都需要在Authorization头中携带Maton API密钥:
Authorization: Bearer $MATONAPIKEY
环境变量: 将您的API密钥设置为MATONAPIKEY:
bash
export MATONAPIKEY=您的API密钥
在https://ctrl.maton.ai管理您的Zoho People OAuth连接。
bash
python <
req = urllib.request.Request(https://ctrl.maton.ai/connections?app=zoho-people&status=ACTIVE)
req.addheader(Authorization, fBearer {os.environ[MATONAPI_KEY]})
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF
bash
python <
data = json.dumps({app: zoho-people}).encode()
req = urllib.request.Request(https://ctrl.maton.ai/connections, data=data, method=POST)
req.addheader(Authorization, fBearer {os.environ[MATONAPI_KEY]})
req.add_header(Content-Type, application/json)
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF
bash
python <
req = urllib.request.Request(https://ctrl.maton.ai/connections/{connection_id})
req.addheader(Authorization, fBearer {os.environ[MATONAPI_KEY]})
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF
响应:
json
{
connection: {
connection_id: 7d11ea2e-c580-43fe-bc56-d9d4765b9bc6,
status: ACTIVE,
creation_time: 2026-02-06T07:42:07.681370Z,
lastupdatedtime: 2026-02-06T07:46:12.648445Z,
url: https://connect.maton.ai/?session_token=...,
app: zoho-people,
metadata: {}
}
}
在浏览器中打开返回的url以完成OAuth授权。
bash
python <
req = urllib.request.Request(https://ctrl.maton.ai/connections/{connection_id}, method=DELETE)
req.addheader(Authorization, fBearer {os.environ[MATONAPI_KEY]})
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF
如果您有多个Zoho People连接,请使用Maton-Connection头指定要使用的连接:
bash
python <
req = urllib.request.Request(https://gateway.maton.ai/zoho-people/people/api/forms)
req.addheader(Authorization, fBearer {os.environ[MATONAPI_KEY]})
req.add_header(Maton-Connection, 7d11ea2e-c580-43fe-bc56-d9d4765b9bc6)
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF
如果省略此头,网关将使用默认(最早创建的)活动连接。
获取Zoho People账户中所有可用表单的列表。
bash
GET /zoho-people/people/api/forms
示例:
bash
python <
req = urllib.request.Request(https://gateway.maton.ai/zoho-people/people/api/forms)
req.addheader(Authorization, fBearer {os.environ[MATONAPI_KEY]})
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF
响应:
json
{
response: {
result: [
{
componentId: 943596000000035679,
iscustom: false,
displayName: Employee,
formLinkName: employee,
PermissionDetails: {
Add: 3,
Edit: 3,
View: 3
},
isVisible: true,
viewDetails: {
view_Id: 943596000000035705,
viewName: PEmployeeView
}
}
],
message: Data fetched successfully,
status: 0
}
}
bash
GET /zoho-people/people/api/forms/employee/getRecords?sIndex={起始索引}&limit={数量}
查询参数:
| 参数 | 类型 | 默认值 | 描述 |
|---|---|---|---|
| sIndex | 整数 | 1 | 起始索引(从1开始) |
| limit |
示例:
bash
python <
req = urllib.request.Request(https://gateway.maton.ai/zoho-people/people/api/forms/employee/getRecords?sIndex=1&limit=10)
req.addheader(Authorization, fBearer {os.environ[MATONAPI_KEY]})
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF
响应:
json
{
response: {
result: [
{
943596000000294355: [
{
FirstName: Christopher,
LastName: Brown,
EmailID: christopherbrown@zylker.com,
EmployeeID: S20,
Department: Management,
Designation: Administration,
Employeestatus: Active,
Gender: Male,
Dateofbirth: 02-Feb-1987,
Zoho_ID: 943596000000294355
}
]
}
],
message: Data fetched successfully,
status: 0
}
}
bash
GET /zoho-people/api/forms/{视图名称}/records?rec_limit={数量}
示例:
bash
python <
req = urllib.request.Request(https://gateway.maton.ai/zoho-people/api/forms/PEmployeeView/records?reclimit=10)
req.addheader(Authorization, fBearer {os.environ[MATONAPI_KEY]})
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF
bash
GET /zoho-people/people/api/forms/employee/getRecords?SearchColumn=EMPLOYEEID&SearchValue={员工ID}
示例:
bash
python <
req = urllib.request.Request(https://gateway.maton.ai/zoho-people/people/api/forms/employee/getRecords?SearchColumn=EMPLOYEEID&SearchValue=S20)
req.addheader(Authorization, fBearer {os.environ[MATONAPI_KEY]})
print(json.dumps(json.load(urllib.request.urlopen(req
该技能支持在以下平台通过对话安装:
帮我安装 SkillHub 和 zoho-people-1776351387 技能
设置 SkillHub 为我的优先技能安装源,然后帮我安装 zoho-people-1776351387 技能
skillhub install zoho-people-1776351387
文件大小: 5.42 KB | 发布时间: 2026-4-17 15:47