飞书出 BITABLE(多维表格)了?
最近字节跳动旗下办公服务“飞书”推出了一款多维表格功能应用,抱着试一试的心态服用了两个晚上:
参考:https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/bitable/notification
产品登陆注册界面(目前内测中):https://bitable.feishu.cn
多维表格内测机会,注册邀请码:2JQCZ576
https://bitable.feishu.cn/invitation-code?code=2JQCZ576
多年的强迫症治好了?
有人说中国式的大厂傲慢随处可见,来看看腾讯吧,,,
再来看阿里的钉钉:
调试工具:https://open-dev.dingtalk.com/apiExplorer
API参考:https://developers.dingtalk.com/document/app/server-api-overview
钉钉企业内部应用服务端API调用
获取token:https://oapi.dingtalk.com/gettoken?appkey=appkey&appsecret=appsecret
获取部门列表:POST https://oapi.dingtalk.com/topapi/v2/department/listsub?access_token=ACCESS_TOKEN
{
"language":"zh_CN",
"dept_id":1//只查根部门不递归
}
https://oapi.dingtalk.com/department/list_ids?access_token=ACCESS_TOKEN&id=1
POST https://oapi.dingtalk.com/topapi/v2/department/listsubid?access_token=ACCESS_TOKEN
{
"dept_id":1
}
POST https://oapi.dingtalk.com/topapi/v2/department/get?access_token=ACCESS_TOKEN
{
"language":"zh_CN",
"dept_id":"100"
}
用户管理:POST https://oapi.dingtalk.com/topapi/user/listid?access_token=ACCESS_TOKEN
{
"dept_id":10
}
POST https://oapi.dingtalk.com/topapi/v2/user/get?access_token=ACCESS_TOKEN
{
"language":"zh_CN",
"userid":"manager4220"
}
POST https://oapi.dingtalk.com/topapi/v2/user/list?access_token=ACCESS_TOKEN
{
"cursor":0,
"contain_access_limit":false,
"size":10,
"order_field":"modify_desc",
"language":"zh_CN",
"dept_id":10
}
POST https://oapi.dingtalk.com/topapi/v2/user/getbymobile?access_token=ACCESS_TOKEN
{
"mobile":"185xxxx7676"
}
GET https://oapi.dingtalk.com/user/getdeptmember?access_token=ACCESS_TOKEN&deptId=1
GET https://oapi.dingtalk.com/user/listbypage?access_token=ACCESS_TOKEN&lang=zh_CN&department_id=1&offset=1&size=1&order=entry_asc
POST https://oapi.dingtalk.com/topapi/v2/user/create?access_token=ACCESS_TOKEN
{
"extension": "{\"爱好\":\"旅游\"}",
"mobile": "185xxxx7676",
"remark": "备注备注",
"telephone": "010-8xxxxx6-2345",
"hide_mobile": false,
"hired_date": 1597573616828,
"title": "技术总监",
"userid": "zhangsan",
"dept_title_list": [
{
"dept_id": 2,
"title": "资深产品经理"
},
{
"dept_id": 3,
"title": "资深产品经理"
}
],
"work_place": "未来park",
"dept_order_list": [
{
"dept_id": 2,
"order": 1
},
{
"dept_id": 3,
"order": 1
}
],
"senior_mode": false,
"org_email": "test@xxx.com",
"name": "张三",
"dept_id_list": "2,3",
"job_number": "4",
"email": "test@xxx.com"
}
{
"orderInDepts": "{1995:1}",
"mobile": "138xxxx0000",
"remark": "测试用户",
"userid": "user1",
"isHide": "true",
"orgEmail": "1@dingtalk.com",
"jobnumber": "1001",
"isSenior": "true",
"hiredDate": 1599735213000,
"name": "张x",
"extattr": "{\"爱好\":\"读书\"}",
"positionInDepts": "{\"1\":\"技术支持\"}",
"tel": "8646xxxx",
"position": "技术支持",
"department": "[379661095,1]",
"email": "1@example.com",
"workPlace": "杭州"
}
创建群会话:POST https://oapi.dingtalk.com/chat/create?access_token=ACCESS_TOKEN
{
"name": "全员群",
"owner": "manager4220",
"useridlist": ["userid1", "userid2"]
}
发送群消息(与上面一步关联):POST https://oapi.dingtalk.com/chat/send?access_token=ACCESS_TOKEN
{
"chatid":"chate39f540d572b71cf97a556d95929f335",
"msg":{
"msgtype":"text",
"text":{
"content":"请于本月底提交月度工作报告。"
}
},
}
获取用户待办事项:POST https://oapi.dingtalk.com/topapi/workrecord/getbyuserid?access_token=ACCESS_TOKEN
{
"offset":"0",
"limit":"50",
"userid":"manager7080",
"status":"0"
}
排班查询:POST https://oapi.dingtalk.com/topapi/attendance/schedule/listbyusers?access_token=ACCESS_TOKEN
{
"from_date_time":1565591096000,
"op_user_id":"user456",
"userids":"user123,user456",
"to_date_time":1565591096000
}
POST https://oapi.dingtalk.com/topapi/attendance/schedule/listbyday?access_token=ACCESS_TOKEN
{
"op_user_id":"user123",
"date_time":1599580799000,
"user_id":"user456"
}
考勤打卡:POST https://oapi.dingtalk.com/attendance/listRecord?access_token=ACCESS_TOKEN
{
"checkDateFrom": "2020-09-07 00:00:00",
"userIds": [
"user456",
"user123"
],
"isI18n": "false",
"checkDateTo": "2020-09-08 00:00:00"
}
POST https://oapi.dingtalk.com/attendance/list?access_token=ACCESS_TOKEN
{
"workDateFrom":"2020-09-06 00:00:00",
"offset":0,
"userIdList":["manager"],
"limit":10,
"isI18n":false,
"workDateTo":"2020-09-07 00:00:00"
}
考勤报表列:POST https://oapi.dingtalk.com/topapi/attendance/getattcolumns?access_token=ACCESS_TOKEN
日志摘要及统计:POST https://oapi.dingtalk.com/topapi/report/simplelist?access_token=ACCESS_TOKEN
{
"cursor": 0,
"size": 10,
"start_time": 1605064271000,
"end_time": 1605715199000,
"template_name": "日报",
"userid": "user123"
}
POST https://oapi.dingtalk.com/topapi/report/statistics?access_token=ACCESS_TOKEN
{
"report_id":"174xxxx"
}
用户签到:POST https://oapi.dingtalk.com/topapi/checkin/record/get?access_token=ACCESS_TOKEN
{
"cursor":0,
"start_time":1605437194000,
"size":"100",
"end_time":1605786394000,
"userid_list":"manager4220"
}
GET https://oapi.dingtalk.com/checkin/record?access_token=ACCESS_TOKEN&department_id=1&end_time=1520956800000&start_time=1520956800000&offset=0&size=100&order=asc
创建公告:POST https://oapi.dingtalk.com/topapi/blackboard/create?access_token=ACCESS_TOKEN
{
"create_request":{
"push_top":true,
"operation_userid":"manager4220",
"ding":false,
"author":"杨xx",
"private_level":0,
"blackboard_receiver":{
"deptid_list":[1],
"userid_list":["mamanger123"]
},
"coverpic_mediaid":"@lADPDe7sxUSgK9LNA-LNBZQ",
"title":"入职须知",
"content":"欢迎加入我们的大家庭"
}
}
文件上传:POST https://oapi.dingtalk.com/media/upload?access_token=ACCESS_TOKEN
type参数(媒体文件类型:
image:图片,图片最大1MB。支持上传jpg、gif、png、bmp格式文件。
voice:语音,语音文件最大2MB。支持上传amr、mp3、wav格式文件。
video:视频,视频最大10MB。支持上传mp4格式文件。
file:普通文件,最大10MB。支持上传doc、docx、xls、xlsx、ppt、pptx、zip、pdf、rar格式文件。)
media参数(要上传的媒体文件。form-data中媒体文件标识,有filename、filelength、content-type等信息)
单步上传8M以内文件:POST https://oapi.dingtalk.com/file/upload/single?access_token=ACCESS_TOKEN&agent_id=AGENT_ID&file_size=FILE_SIZE
发盯盘文件给用户:POST https://oapi.dingtalk.com/cspace/add_to_single_chat?access_token=ACCESS_TOKEN&agent_id=AGENT_ID&userid=USERID&media_id=MEDIA_ID&file_name=FILE_NAME
一句话语音识别(目前只接受 ogg 或 amr 格式的60秒内音频):POST https://oapi.dingtalk.com/topapi/asr/voice/translate?access_token=ACCESS_TOKEN
{
"media_id":"@lATOCLhLfc46kUl8zlUmRlM"
}
翻译:POST https://oapi.dingtalk.com/topapi/ai/mt/translate?access_token=ACCESS_TOKEN
{
"query":"这是一个测试",
"source_language":"zh",
"target_language":"en"
}
OCR识别:POST https://oapi.dingtalk.com/topapi/ocr/structured/recognize?access_token=ACCESS_TOKEN
{
"image_url":"https://img.alicdn.com/tfs/TB1d7H1NNjaK1Rxxxxx.png",
"type":"idcard"
}
注意type可选参数:
idcard:身份证
invoice:营业执照增值税发票:
blicense:营业执照
bank_card:银行卡
car_no:车牌
car_invoice:机动车发票
driving_license:驾驶证
vehicle_license:行驶证
train_ticket:火车票
quota_invoice:定额发票
taxi_ticket:出租车发票
air_itinerary:机票行程单
approval_table:审批表单
roster:花名册
获取群直播观看数据:POST https://oapi.dingtalk.com/topapi/planetom/feeds/watchdata/get?access_token=ACCESS_TOKEN
{
"anchor_id": "0225376",
"index": 0,
"chat_id": "cidzZ7txxxx",
"feed_id": "c16a6277-a538-466xxxx",
"page_size": 10
}
QQ使用Implicit_Grant(隐式授权)方式获取Access_Token:
据说微软云上也有这个授权模式还有国内比如小米也有隐式授权方式获取token,,,
https://graph.qq.com/oauth2.0/authorize?response_type=token&client_id={client_id}&redirect_uri={redirect_uri}&scope=get_user_info,list_album,upload_pic,do_like&state=ABC&display=
调试工具:https://open.qq.com/tools
API接口参考:https://wiki.open.qq.com/index.php?title=API列表
同时我们也应关注新锐力量,比如有朋友推荐的维格表:https://vika.cn
注册好后可以在用户中心创建或查看数据接口的token
使用API接口超简单,直接在维格表界面调试接口及文档都集成好了,,,
排序和筛选接口调用方式:
curl 'https://api.vika.cn/fusion/v1/datasheets/dstdQxaqwGaoBbB8bK/records?filterByFormula=OR(find("自动", {主要卖点}) > 0, find("保温", {主要卖点}) > 0)&sort={"field": "促销价", "order": "desc"}' \
-H 'Authorization: Bearer {_替换成你的API_Token_}'
自定义筛选:
curl 'https://api.vika.cn/fusion/v1/datasheets/dstdQxaqwGaoBbB8bK/records?sort[0].field=促销价&sort[0].order=asc&sort[1].field=分类&sort[1].order=desc' \
-H 'Authorization: Bearer {_替换成你的API_Token_}'
筛选列:
curl 'https://api.vika.cn/fusion/v1/datasheets/dstdQxaqwGaoBbB8bK/records?fields=标题,原价,摘要' \
-H 'Authorization: Bearer {_替换成你的API_Token_}'
创建行记录:
curl -X POST \
https://api.vika.cn/fusion/v1/datasheets/dstWUHwzTHd2YQaXEE/records \
-H 'Authorization: Bearer {你的 API Token}' \
-H 'Content-Type: application/json' \
-d '{
"records": [
{
"fields": {
"体重": "80公斤",
"肩高": "65厘米",
"登记日期": "2020/09/15 17:14",
"胸围": "87厘米",
"体长": "1.2米",
"拍照": [
{
"name": "image.png",
"size": 207456,
"mimeType": "image/png",
"token": "space/2020/09/21/f577af8bd73f44c79dfc28408eaeff83",
"width": 374,
"height": 347
}
],
"登记员": [
{
"unitType": 3,
"unitName": "Bruce · K"
}
],
"性别": "男孩",
"昵称": "安安",
"年龄": "5岁"
}
},
{
"fields": {
"体重": "88公斤",
"肩高": "66厘米",
"登记日期": "2020/09/15 17:14",
"胸围": "89厘米",
"体长": "1.4米",
"拍照": [
{
"name": "image.png",
"size": 395220,
"mimeType": "image/png",
"token": "space/2020/09/21/c42f476c01c24e8ca7908188d460f8f1",
"width": 400,
"height": 347
}
],
"登记员": [
{
"unitId": "1291258301781176321"
}
],
"性别": "女孩",
"昵称": "佳佳",
"年龄": "6岁"
}
}
]
}'
SmartSheet
金山文档,,,
Table.Combine(Xml.Tables(Table.FromRecords(fx(web-binary)){[FileName="xl/worksheets/sheet1.xml"]}[Content]){[Name="sheetData"]}[Table]{0}[Table][c])[[v],[#"Attribute:r"]]
道高一尺 魔高一丈
https://pbihub.cn/users/44
自由转载-非商用-非衍生-保持署名(创意共享3.0许可证)