亿方云开放平台是基于亿方云基础业务和功能向开发者提供二次开发的服务平台,为企业提供丰富的云盘文档协同管理解决方案。企业或第三方合作伙伴可以快速低成本地接入亿方云,实现存储、查看、分享、协作等一站式文件管理。激活企业非结构数据资产价值,助你的企业更快一步。
亿方云开放平台提供UI组件、SDK、API等接入方式,10行代码助你构建企业文件统一管理平台。

亿方云的开放平台,是在云计算背景下,将亿方云已有的能力通过多种形式开放给第三方开发者使用,而产生的一种技术能力输出。开放平台所有功能基于亿方云已有功能,并不断迭代,基于安全角度考虑,所有能力输出将严格依照Oauth2协议进行授权和鉴权。
其中核心能力为接入层的代理服务、Oauth鉴权服务、Open API能力输出。代理服务主要提供访问接入底层服务,以WEB方式实现。Oauth鉴权服务通过Oauth协议对接入者进行授权和鉴权,返回相应的access_token信息,该token具备时效性,可有效保障接入安全和数据安全。Open API即为亿方云能力输出相关API,目前已开放近100个API,涉及文件(夹)管理、分享、协作、日志、消息、第三方同步等大量功能,可有效辅助开发者接入开放平台。
在此基础上,为便于开发者接入亿方云开放平台,还提供了WEB、H5的UI组件,涉及文件选择、文件上传、文件预览等基础能力,开发者无需再去构建文件显示、列表等基本架构。

企业依托亿方云强大的开放能力,将亿方云文件存储与共享的能力接入到企业自身的HR、OA、客户管理、业务管理等系统,实现文件的统一存储和协作。
1.access_token是访问亿方云服务端开放接口的全局唯一凭证。
2.正常情况下access_token有效期为6小时。
client_id是企业接入亿方云开放平台的唯一性标识。开发者在申请开放平台应用时,系统会自动生成。
client_secret和client_id在企业申请开放平台时一同生成,使用client_id和client_secret可获取access_token。
企业在申请亿方云开放平台时,可为应用设置一个URL。一些应用相关的重要事件发生时,亿方云向该URL地址发起http请求,此URL称之为回调地址。
“免登”是指用户免除输入亿方云用户名和密码,应用便可获取用户身份,登录亿方云。
员工在使用企业内部应用的过程中,可将从本地上传或者从亿方云选择的文件保存到应用专属账号。企业内部应用将员工所上传的文件存储在应用专属账号中,可以控制用户预览、保存至亿方云、下载等权限,也可以将员工账号添加为文件夹的协作权限来授予员工相应的访问权限。
目前亿方云开放平台需要申请才能开放,具体的申请可直接拨打我司客服热线:400-993-9050。具体步骤开发者需要在企业控制台(只有企业管理员或联合管理员才能进入)里面申请应用,企业控制台-企业设置-开放平台中设置相关信息提交应用,待应用审核通过后即可进入第二步。
当审核通过后,则会分配一个client_id和client_secret应用审核通过后会获得该应用的client_id和client_secret,拿到这两个信息即可进行接口认证,获取相关的接口认证。
接口认证获取授权后,即可调用亿方云提供的API、SDK、UI组件。
环境要求:本地需要安装 Node.js 运行环境(v16+)。如果未安装,请从Node.js 官网下载安装。
云盘现已兼容MCP协议,提供以下功能:
| 功能名称 | 功能描述 | 功能说明 |
|---|---|---|
| search_files | 查询文件 | 根据文件名称或内容查询文件和文件夹列表 |
| list_personal_items | 获取个人文件列表 | 获取个人空间的文件和文件夹列表 |
| list_folder_contents | 获取文件夹内容 | 获取文件夹内的文件和文件夹列表 |
| get_file_info | 获取文件详情 | 根据文件id,获取文件的详情 |
| get_folder_info | 获取文件夹详情 | 根据文件夹id,获取文件的详情 |
| update_file | 更新文件信息 | 更新文件的名称和文件描述 |
| create_folder | 创建文件夹 | 在指定位置下创建文件夹 |
| upload_file | 上传文件 | 上传本地文件到云盘指定位置 |
| download_file | 下载文件 | 下载云盘的文件到本地指定位置 |
{
"mcpServers": {
"mcp": {
"url": "https://open.fangcloud.com/mcp?API_KEY=09cfebb1-657f-482b-9599-e1493b16e224"
}
}
}
云盘现已兼容MCP协议,提供以下功能:
| 功能名称 | 功能描述 | 功能说明 |
|---|---|---|
| search_files | 查询文件 | 根据文件名称或内容查询文件和文件夹列表 |
| list_personal_items | 获取个人文件列表 | 获取个人空间的文件和文件夹列表 |
| list_folder_contents | 获取文件夹内容 | 获取文件夹内的文件和文件夹列表 |
| get_file_info | 获取文件详情 | 根据文件id,获取文件的详情 |
| get_folder_info | 获取文件夹详情 | 根据文件夹id,获取文件的详情 |
| update_file | 更新文件信息 | 更新文件的名称和文件描述 |
| create_folder | 创建文件夹 | 在指定位置下创建文件夹 |
| download_file | 下载文件 | 生成云盘文件的下载链接 |
{
"mcpServers": {
"kbase-mcp": {
"url": "https://open.fangcloud.com/kbase-mcp?API_KEY=09cfebb1-657f-482b-9599-e1493b16e224"
}
}
}
AI知识库现已兼容MCP协议,提供以下功能:
| 功能名称 | 功能描述 | 功能说明 |
|---|---|---|
| list_library | 查询知识库列表 | 根据名称或者查询全量知识库列表 |
| retrieval | 知识库召回接口 | 根据问题召回指定知识库的片段列表 |
只能请求企业级API(路径中含有admin),示例如下:
{
"access_token":"8afa8c99-4490-4f64-a3ce-ebfda52d893a",
"refresh_token":"70903bbd-9825-4ef2-b967-0c6ae0fb0946",
"scope":"admin",
"token_type":"bearer",
"expires_in":21599
}
只能请求用户级API,示例如下:
{
"access_token":"7e40bd40-080f-4131-ba8b-7f6ce5ac0a83",
"refresh_token":"98db229d-1a76-4491-b2c7-37be7f37dcaf",
"scope":"all",
"token_type":"bearer",
"expires_in":21599
}
向云盘工作人员获取企业id,开放平台的client_id和client_secret参数
该接口使用Basic Auth的方式校验client的信息。具体做法是在header中添加类似于"Authorization: Basic xxxxxxxxx"。其中"xxxxxxxxx"是通过client_id和client_secret算出来的,具体算法为Base64Encode(client_id + ":" + client_secret)
组装map集合,map集合参数如下:
| 参数字段 | 字段类型 | 字段说明 |
|---|---|---|
| yifangyun_sub_type | string | 授权对象类型,只能是enterprise或者user |
| sub | string | 授权对象id。授权对象类型为enterprise,sub为企业id;授权对象类型为user,sub为用户id |
| exp | timestamp | 过期时间戳,不能超过iat(若iat不存在则记请求到达服务器时间)60s |
| iat | timestamp | jwt生成时的时间戳(单位为秒) |
| jti | string | jwt的唯一标识,每个jwt应当都有唯一的jti |
组装完成的map集合示例:
{
"sub": "21791",
"yifangyun_sub_type": "enterprise",
"exp": "1725590139",
"iat": "1725590079",
"jti": "17255900799152711bfbc-435f-45b6-a8d4-6e750e14b005"
}
将组装好的map转成字符串并其进行:Base64Encode,生成assertion参数,转换完成的assertion示例:
ewogICAgInN1YiI6ICIyMTc5MSIsCiAgICAieWlmYW5neXVuX3N1Yl90eXBlIjogImVudGVycHJpc2UiLAogICAgImV4cCI6ICIxNzI1NTkwMTM5IiwKICAgICJpYXQiOiAiMTcyNTU5MDA3OSIsCiAgICAianRpIjogIjE3MjU1OTAwNzk5MTUyNzExYmZiYy00MzVmLTQ1YjYtYThkNC02ZTc1MGUxNGIwMDUiCn0=
HTTP请求方式: POST URL参数:
| 参数字段 | 字段类型 | 字段说明 |
|---|---|---|
| grant_type | string | 必须为jwt_simple |
| assertion | string | 第三步装好的字符串 |
请求示例:
curl --location --request POST 'https://oauth.fangcloud.net/oauth/token?grant_type=jwt_simple&assertion=ewogICAgInN1YiI6ICIyMTc5MSIsCiAgICAieWlmYW5neXVuX3N1Yl90eXBlIjogImVudGVycHJpc2UiLAogICAgImV4cCI6ICIxNzI1NTkwMTM5IiwKICAgICJpYXQiOiAiMTcyNTU5MDA3OSIsCiAgICAianRpIjogIjE3MjU1OTAwNzk5MTUyNzExYmZiYy00MzVmLTQ1YjYtYThkNC02ZTc1MGUxNGIwMDUiCn0='
--header 'Authorization: Basic M2RjMjcyNjQtMGJhNi00ZjQ3LWI3ZGUtNjhiNWFhNWFiZDQxOjA1MmQ4YjAzLWRiNTEtNDM3Ni04ZTA1LTZhNmU1NWNlNGMzMA=='
curl --location 'https://open.fangcloud.com/api/v2/admin/user/get_user_info?identifier=18888888888@test.com&type=simple_phone_or_email' \
--header 'Authorization: Bearer 021ae7ad-a803-49d8-a070-52b84e6c0705'

package com.example.liangxiaoshengdemo.token.simple_jwt;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.util.EntityUtils;
import java.util.*;
public class DemoSimple {
static String clientId = "";
static String clientSecret = "";
// jwt密钥文件中的enterprise_id,生成企业token使用
static long enterpriseId = 0L;
// jwt密钥文件中的platform_id
static long platformId = 0L;
// 用户id,通过接口获取,生成个人token使用
static long userId = 0L;
// 开放平台获取token地址(专有云需要修改)
static String oauthHost = "https://oauth.fangcloud.com";
public static void main(String[] args) throws Exception {
// 生成企业token
JSONObject accessTokenAdmin= getAccessToken(oauthHost, clientId, clientSecret, enterpriseId, false);
System.out.println("accessTokenAdmin" + JSON.toJSONString(accessTokenAdmin));
// 生成个人token
JSONObject accessTokenUser = getAccessToken(oauthHost, clientId, clientSecret, userId, true);
System.out.println("accessTokenUser" + JSON.toJSONString(accessTokenUser));
}
public static JSONObject getAccessToken (String oauthUrl, String appKey, String appSecret, Long id, Boolean isUser) {
try{
Map<String, String> dataMap = new HashMap<>();
String yifangyun_sub_type = "";
if (isUser) {
yifangyun_sub_type = "user";
} else {
yifangyun_sub_type = "enterprise";
}
dataMap.put("yifangyun_sub_type", yifangyun_sub_type); //授权对象类型 enterprise为企业 user为用户
dataMap.put("sub", String.valueOf(id)); //如果授权对象类型为企业 这里输入企业id,如果授权对象类型为user这边输入userid
dataMap.put("exp", String.valueOf(getExpirationTimeSecondsInTheFuture(60).getTime()/1000));//过期时间戳,不能超过iat(若iat不存在则记请求到达服务器时间)60s
dataMap.put("iat", String.valueOf(new Date().getTime()/1000));//当前 时间
dataMap.put("jti", System.currentTimeMillis() + UUID.randomUUID().toString());//随机字符串
String dataJson = JSON.toJSONString(dataMap);
String encodeJson = Base64.getEncoder().encodeToString(dataJson.getBytes());
return getToken(encodeJson, oauthUrl, appKey, appSecret);
}catch (Exception e){
e.printStackTrace();
}
return null;
}
/**
* 获取token
* @param compactJwt jwt字符串
* @param oauthUrl 接口地址
* @param appKey client_id
* @param appSecret client_secret
* @return 返回接口token
*/
private static JSONObject getToken(String compactJwt, String oauthUrl, String appKey, String appSecret){
String res = "";
DefaultHttpClient httpclient;
try {
httpclient = new DefaultHttpClient();//https请求 存在证书问题,通过此方式信任所有证书
String url = oauthUrl + "/oauth/token?grant_type=jwt_simple&assertion=" + compactJwt;
System.out.println(url);
HttpPost httppost = new HttpPost(url);
String client = appKey + ":" + appSecret; //组装client_id和client_secret
byte[] bytes = client.getBytes();
String base64Client = Base64.getEncoder().encodeToString(bytes);//base64加密
System.out.println(base64Client);
httppost.addHeader("Authorization","Basic "+base64Client);
HttpResponse response = httpclient.execute(httppost);
HttpEntity entity = response.getEntity();
res = EntityUtils.toString(entity);
return JSONObject.parseObject(res);
}catch (Exception e){
e.printStackTrace();
return null;
}
}
private static Date getExpirationTimeSecondsInTheFuture(int seconds) {
Calendar calendar = Calendar.getInstance();
calendar.setTime(new Date());
calendar.add(Calendar.SECOND, seconds);
return calendar.getTime();
}
}
import hashlib
import json
import random
import time
import base64
import requests
# jwt密钥文件中的enterprise_id,生成企业token使用
enterprise_id = 123
# 用户id,通过接口获取,生成个人token使用
user_id = 0
# jwt密钥文件中的client_id
client_id = "xxxx"
# jwt密钥文件中的client_secret
client_secret = "xxxx"
# 开放平台获取token地址(专有云需要修改)
oauth_url = 'https://oauth.fangcloud.com'
# 开放平台api地址(专有云需要修改)
open_url = 'https://open.fangcloud.com'
class Test():
def jwt_token(id, type):
jti = "".join(random.sample('abcdefghijklmnopqrstuvwxyz!@#$%^&*1234567890', 16)).replace(' ', '')
m = hashlib.md5()
m.update(jti.encode("utf-8"))
jti_md5 = m.hexdigest()
sub_type = ''
if(type == 'enterprise'):
sub_type = "enterprise"
elif(type == 'user'):
sub_type = "user"
payload = {
"yifangyun_sub_type": sub_type,
"sub": id,
"exp": int(time.time()) + 60,
"iat": int(time.time()),
"jti": jti_md5,
}
headers = {
'Authorization': 'Basic '+ base64.b64encode((client_id + ":" + client_secret).encode('utf-8')).decode('ascii')
}
url = oauth_url + '/oauth/token?grant_type=jwt_simple&assertion=' + base64.b64encode(json.dumps(payload).encode('utf-8')).decode('ascii')
return requests.post(url, headers=headers).text
enterprise_token = jwt_token(enterprise_id, 'enterprise')
print('enterprise_token:' + enterprise_token)
user_token = jwt_token(user_id, 'user')
print('user_token:' + user_token)
所有的接口在访问时需要在HTTP header中带上access_token(通过jwt模式获取的)。对于含有请求参数的接口,通常是一些POST、PUT或者DELETE接口,还需要设置Content-Type来指定参数的格式。如果需要访问不同版本的API,就需要在请求路径上指定具体版本,如果需要返回不同格式的response body,那么还需要设置Accept。所有的参数都应该采用utf-8的编码:
| 参数字段 | 是否必填 | 字段说明 |
|---|---|---|
| Share-Link-Token | 否 | 分享链接token |
| Share-Link-Verification-Code | 否 | 分享链接码 |
| Authorization | 是 | Bearer {access_token} |
| Content-Type | 是 | application/json |
curl --location --request GET 'https://open.fangcloud.com/api/v2/admin/user/all?platform_id=1&page_id=0&page_capacity=10' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer 76ebc21a-e52e-4800-9ada-a1cdd2f77856'
目前对于开放平台的请求, 我们做了请求的频次限制, 在所有api请求的返回结果中会有三个header表示频次限制相关的信息
| 返回header | 字段类型 | 字段说明 |
|---|---|---|
| X-Rate-Limit-Limit | int | 当前接口请求次数的上限, 固定数值 |
| X-Rate-Limit-Remaining | int | 当前接口允许请求的剩余次数 |
| X-Rate-Limit-Reset | int | 当前接口允许请求的剩余次数恢复到上限所需要的时间(单位为秒) |
当请求超过了频次限制, 返回结果的HTTP Status Code为429, 返回body如下
{
"errors": [
{
"code": "rate_limit",
"msg": "Rate limit exceeded!"
}
],
"request_id": "d3e1088f-28af-495d-b7ee-a9e58e989b76"
}
api接口的异常返回可以分为两类,参数验证错误和业务错误
参数验证错误的返回如又所示:
{
"errors": [
{
"msg": "不能为空",
"code": "request_data_invalid",
"field": "folder_id"
}
],
"request_id": "fdjklsa-asdrwer2312314q-asdfasfav-falsfdjas"
}
参数验证错误有统一的错误码request_data_invalid,具体错误信息会在msg中提示,field提示错误的字段
常见的错误msg包括:
业务错误的异常格式如下所示:
{
"errors": [
{
"msg": "文件不存在",
"code": "file_not_found"
}
],
"request_id": "fdjklsa-asdrwer2312314q-asdfasfav-falsfdjas"
}
{
"errors": [
{
"msg": "不能为空",
"code": "request_data_invalid",
"field": "folder_id"
}
],
"request_id": "fdjklsa-asdrwer2312314q-asdfasfav-falsfdjas"
}
业务错误通常以不同的code来进行区分
| code | message |
|---|---|
| request_data_invalid | 请求参数存在错误 |
| permission_denied | 权限不足 |
| file_not_found | 文件不存在 |
| folder_not_found | 文件夹不存在 |
| file_deleted | 文件已删除 |
| folder_deleted | 文件夹已删除 |
| file_in_trash_not_found | 文件不在回收站 |
| folder_in_trash_not_found | 文件夹不在回收站 |
| file_name_conflict | 文件命名冲突 |
| folder_name_conflict | 文件夹命名冲突 |
| folder_empty_in_trash | 回收站无文件夹 |
| folder_parent_deleted | 父文件夹已被删除 |
| move_to_itself | 文件夹不能移动到自身 |
| move_to_subfolder | 不能移动到子文件夹 |
| copy_to_itself | 文件夹不能拷贝到自身 |
| copy_to_subfolder | 不能拷贝到子文件夹 |
| item_name_invalid | 文件或文件夹名称不合法 |
| item_name_size_incorrect | 文件或文件夹名称长度错误 |
| empty_trash | 回收站为空 |
| request_data_invalid | 请求参数错误 |
| exceed_enterprise_space_limit | 超过企业空间限制 |
| exceed_user_space_limit | 超过用户空间限制 |
| folder_is_descendant | 目标文件夹是移动文件夹的子目录 |
| user_not_found | 用户不存在 |
| user_profile_pic_not_found | 用户头像不存在 |
| user_profile_pic_key_not_found | 用户头像的key未传入 |
| user_profile_pic_key_incorrect | 用户头像的key与user_id不匹配 |
| share_link_password_not_provided | 没有提供分享链接密码 |
| share_link_access_type_invalid | 分享链接的 access 类型无效 |
| due_time_passed | 指定的截止时间已过期 |
| share_link_not_found_or_deleted | 分享链接找不到或已删除 |
| share_link_resource_id_not_provided | 没有提供文件或文件夹id |
| share_link_resource_id_ambiguous | 分享链接资源不明确(同时提供了文件和文件夹id) |
| share_link_password_not_correct | 分享链接密码不正确 |
| share_link_password_size_incorrect | 分享链接密码长度最大33位 |
| share_link_password_invalid | 分享链接密码只能使用数字和字母 |
| share_link_expired | 分享链接已过期 |
| collab_not_found | 协作不存在 |
| collab_role_invalid | 协作角色无效 |
| collab_user_has_been_invited | 用户已经被邀请 |
| collab_user_not_in_same_enterprise | 被邀请用户不在同一企业 |
| collab_group_not_supported | 不支持群组协作 |
| cannot_invite_item_owner | 无法邀请拥有者 |
| comment_not_found | 评论不存在 |
| collab_related_folder_deleted | 协作相关的文件夹已经被删除 |
| enterprise_is_expired | 企业套餐已经过期 |
| department_not_found | 部门不存在 |
| department_name_conflict | 部门名冲突 |
| user_not_in_enterprise | 用户不在企业中 |
| user_already_in_department | 用户已经在该部门中 |
| user_exceed_department_limit | 用户所在的部门数超过部门限制(100) |
| user_not_in_department | 用户不在该部门中 |
| group_name_conflict | 群组名冲突 |
| user_already_in_group | 用户已经在该群组中 |
| user_not_in_group | 用户不在该群组中 |
| user_email_or_phone_invalid | 用户邮箱或手机无效 |
| user_already_deleted | 该用户已被删除 |
| user_already_invited | 该用户已被邀请 |
| user_already_registered | 该用户已被注册 |
| user_receive_items_needed | 需要接收文件的用户 |
| department_space_total_exceeds_enterprise_limit | 部门分配空间超出企业总可用空间 |
| department_having_children_can_not_delete | 无法删除存在子部门的部门 |
| user_space_total_exceeds_enterprise_limit | 用户分配空间超出企业总可用空间 |
| user_received_items_not_in_same_enterprise | 接收文件的用户不在同一企业中 |
| invalid_enterprise_storage | 无效的企业存储 |
| department_director_can_not_delete | 无法删除部门管理员 |
| user_deleted_is_user_received_items | 接收文件的用户不能是被删除者 |
| user_not_active | 用户未激活 |
| preview_file_not_generated | 预览文件未生成 |
| can_not_download_yiqixie_file | 无法下载一起写文件 |
| user_receive_items_need_active | 文件接受者尚未激活 |
| timestamp_range_invalid | 非法的时间戳范围 |
| enterprise_not_enable_sync_account | 企业未开启账号同步 |
| cannot_provide_both_yfy_id_and_custom_id | 不能同时提供亿方云id和自定义id |
| yfy_id_and_custom_id_not_null | 亿方云id和自定义id不能同时为空 |
需要使用用户token,根据用户id生成,详情参考上面生成的token文档
邀请协作所需参数
| folder_id required | integer <int64> (协作文件夹id) |
required | object (邀请对象) |
| invitation_message | string (邀请信息,长度不能超过140个字符) |
{- "item": {
- "type": "folder",
- "id": 181000005330,
- "name": "xxx"
}, - "id": 412027,
- "accessible_by": {
- "type": "group",
- "id": 94444,
- "name": "xxxzxc"
}, - "accepted": true,
- "role": "viewer"
}需要使用用户token,根据用户id生成,详情参考上面生成的token文档
批量邀请协作所需参数
| folder_id required | integer <int64> (协作文件夹id) |
required | Array of objects (邀请对象) |
| invitation_message | string (邀请信息,长度不能超过140个字符) |
{- "folder_id": 179000000092,
- "accessible_by": [
- {
- "type": "department_list",
- "ids": [
- 596606,
- 596610
], - "role": "viewer"
}
], - "invitation_message": "hello"
}需要使用用户token,根据用户id生成,详情参考上面生成的token文档
| id required | integer <int64> 协作ID |
{- "item": {
- "type": "folder",
- "id": 181000005330,
- "name": "xxx"
}, - "id": 412027,
- "accessible_by": {
- "type": "group",
- "id": 94444,
- "name": "xxxzxc"
}, - "accepted": true,
- "role": "viewer"
}需要使用用户token,根据用户id生成,详情参考上面生成的token文档
| id required | integer <int64> 协作ID |
新的权限
| role required | string (更新角色类型) coowner:共同所有者; editor:编辑者; online_collaborator:在线协作者; viewer_uploader:查看/上传者; viewer:查看者; previewer_uploader:预览+上传者; previewer:预览者; uploader:上传者; reset:禁止访问 |
{- "item": {
- "type": "folder",
- "id": 181000005330,
- "name": "xxx"
}, - "id": 412027,
- "accessible_by": {
- "type": "group",
- "id": 94444,
- "name": "xxxzxc"
}, - "accepted": true,
- "role": "viewer"
}需要使用用户token,根据用户id生成,详情参考上面生成的token文档
添加的评论信息
| file_id required | integer <int64> (评论文件id) |
| content required | string (评论文本,长度不能超过1001个字符@[user_id:评论内容]) |
{- "item": {
- "type": "file",
- "id": 181000113542,
- "name": "风光.docx"
}, - "id": 43156,
- "content": "@[12032111:的]",
- "created_at": 1501148332,
- "user": {
- "id": 881525,
- "name": "xdsfd王",
- "login": "autov2@test.com",
- "enterprise_id": 12401
}
}需要使用用户token,根据用户id生成,详情参考上面生成的token文档
| id required | integer <int64> 部门ID |
| permission_filter | boolean 是否过滤权限 |
{- "children": [
- {
- "id": 69938,
- "name": "111",
- "user_count": 3,
- "children_departments_count": 1,
- "direct_item_count": 0,
- "order": 1
}
]
}需要使用用户token,根据用户id生成,详情参考上面生成的token文档
| id required | integer <int64> 部门id |
{- "director": {
- "id": 881525,
- "name": "xxx",
- "login": "xxx@test.com"
}, - "id": 65820,
- "created_at": 1513102764,
- "children_departments_count": 1,
- "direct_item_count": 1,
- "name": "亿方云测试",
- "user_count": 1,
- "parent_id": 0,
- "order": 1
}{- "has_children_departments": true,
- "children": [
- {
- "has_children_departments": false,
- "id": 894823,
- "name": "hr",
- "user_count": 2,
- "parent_id": 893694
}, - {
- "has_children_departments": false,
- "id": 894824,
- "name": "Dev",
- "user_count": 4,
- "parent_id": 893694
}
], - "id": 893694,
- "name": "venus金星计划物Train版Swift理环境部署",
- "user_count": 6,
- "parent_id": 0
}需要使用用户token,根据用户id生成,详情参考上面生成的token文档
| id required | integer <int64> 部门ID |
| query_words | string 查询关键字 |
| page_id | integer <int32> >= 0 页码 |
{- "users": [
- {
- "user_group": "admin",
- "email": "xxx@test.com",
- "phone": "12312312312",
- "space_total": 2199023255552,
- "space_used": 0,
- "profile_pic_key": "ee1bacaffb0128a26b51afaf17126a8b",
- "is_active": true,
- "is_phone_public": true,
- "full_name_pinyin": "xxx",
- "id": 881525,
- "name": "xxx",
- "login": "xxx@test.com",
- "enterprise_id": 12401
}, - {
- "user_group": "user",
- "email": "xxx@test.com",
- "phone": "12312312312",
- "space_total": 5368709120,
- "space_used": 8745602,
- "profile_pic_key": "",
- "is_active": true,
- "is_phone_public": true,
- "full_name_pinyin": "xxx",
- "id": 881533,
- "name": "xxx",
- "login": "xxx@test.com",
- "enterprise_id": 12401
}, - {
- "user_group": "user",
- "email": "xxx@test.com",
- "phone": "",
- "space_total": 2199023255552,
- "space_used": 0,
- "profile_pic_key": "",
- "is_active": true,
- "is_phone_public": true,
- "full_name_pinyin": "xxx",
- "id": 881572,
- "name": "xxx",
- "login": "xxx@test.com",
- "enterprise_id": 12401
}, - {
- "user_group": "user",
- "email": "xxx@test.com",
- "phone": "12312312312",
- "space_total": 2199023255552,
- "space_used": 2869229,
- "profile_pic_key": "0cb601c50ed619267bb791cfe2a60ade",
- "is_active": true,
- "is_phone_public": true,
- "full_name_pinyin": "xxx",
- "id": 881526,
- "name": "xxx",
- "login": "autov22@test.com",
- "enterprise_id": 12401
}
], - "total_count": 4,
- "page_id": 0,
- "page_capacity": 500,
- "page_count": 1
}需要使用用户token,根据用户id生成,详情参考上面生成的token文档
| device_token required | string 设备token |
{- "synced_folders": [
- {
- "sync_root": {
- "type": "department",
- "id": 1,
- "name": "xxx"
}, - "id": 181000010188,
- "name": "aaa"
}
], - "synced_department_spaces": [
- {
- "type": "department",
- "id": 2,
- "name": "xxx2"
}
], - "is_synced_personal_space": false,
- "is_synced_collab_space": false
}需要使用用户token,根据用户id生成,详情参考上面生成的token文档
请求示例:
curl --location --request POST 'https://open.fangcloud.com/api/v2/file/75003907526/copy' \
--header 'Authorization: Bearer 583fad43-3265-45df-9e13-91fa5a22a2ca' \
--header 'Content-Type: application/json' \
--data '{
"target_folder_id": 75000441887
}'
| id required | integer <int64> 文件的ID |
拷贝文件的请求
| target_folder_id required | integer <int64> (目标文件夹id) |
{- "space": {
- "type": "personal"
}, - "sha1": "dc5d8f86d8d33eac2145eddaf1ff85dd38dcca5f",
- "comments_count": 0,
- "extension_category": "document",
- "type": "file",
- "id": 75003903445,
- "name": "0EB21E7F3E887DAEADC3E1B047BCA6AC (1).docx",
- "size": 21087,
- "created_at": 1624330900,
- "modified_at": 1624330900,
- "modified_by": {
- "id": 13117471,
- "name": "yfytest01",
- "login": "admin@mars.fangcloud.com",
- "enterprise_id": 426870
}, - "description": "",
- "path": [
- {
- "type": "folder",
- "id": 0,
- "name": "全部文件"
}
], - "owned_by": {
- "id": 13117471,
- "name": "yfytest01",
- "login": "admin@mars.fangcloud.com",
- "enterprise_id": 426870
}, - "parent": {
- "type": "folder",
- "id": 0
}, - "sequence_id": 8,
- "in_trash": false,
- "is_deleted": false,
- "is_frequently_used": false
}需要使用用户token,根据用户id生成,详情参考上面生成的token文档
请求示例:
curl --location --request POST 'https://open.fangcloud.com/api/v2/file/75003907526/copy_by_path' \
--header 'Authorization: Bearer 583fad43-3265-45df-9e13-91fa5a22a2ca' \
--header 'Content-Type: application/json' \
--data '{
"target_folder_path": "75000441887"
}'
| id required | integer <int64> 文件的ID |
拷贝文件的请求
| target_folder_path required | string (路径名,以/划分文件夹,根目录在个人文件下,文件夹名称必须是1到222个字符,并且不能含有/ ? : * " > < |且末尾不能为“.”) |
{- "space": {
- "type": "personal"
}, - "sha1": "dc5d8f86d8d33eac2145eddaf1ff85dd38dcca5f",
- "comments_count": 0,
- "extension_category": "document",
- "type": "file",
- "id": 75003903445,
- "name": "0EB21E7F3E887DAEADC3E1B047BCA6AC (1).docx",
- "size": 21087,
- "created_at": 1624330900,
- "modified_at": 1624330900,
- "modified_by": {
- "id": 13117471,
- "name": "yfytest01",
- "login": "admin@mars.fangcloud.com",
- "enterprise_id": 426870
}, - "description": "",
- "path": [
- {
- "type": "folder",
- "id": 0,
- "name": "全部文件"
}
], - "owned_by": {
- "id": 13117471,
- "name": "yfytest01",
- "login": "admin@mars.fangcloud.com",
- "enterprise_id": 426870
}, - "parent": {
- "type": "folder",
- "id": 0
}, - "sequence_id": 8,
- "in_trash": false,
- "is_deleted": false,
- "is_frequently_used": false
}需要使用用户token,根据用户id生成,详情参考上面生成的token文档
请求示例:
curl --location --request POST 'https://open.fangcloud.com/api/v2/file/create_blank_file' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer a2a192ea-cb37-4c0c-b8d5-574232fa853b' \
--header 'Cookie: lang=zh-CN' \
--data-raw '{
"departmentId":0,
"name":"111",
"parentEnterpriseId":21791,
"nameConflictResolveStrategy":"2",
"parentFolderId":0,
"type":"1"
}'
文件信息
| name required | string (新文件文件名) |
| type required | string (文件类型) 1:doc类型; 2:ppt类型; 3:xls类型 |
| parentFolderId required | integer <int64> (父文件夹Id) |
| parentEnterpriseId required | integer <int64> (企业id,若为外协文件夹需要填写对应企业id) |
| departmentId required | integer <int64> (部门id) |
| nameConflictResolveStrategy required | string (命名冲突解决策略(固定传2)) 2:系统自动重命名(当前仅支持这种) |
{- "space": {
- "type": "personal"
}, - "sha1": "dc5d8f86d8d33eac2145eddaf1ff85dd38dcca5f",
- "comments_count": 0,
- "extension_category": "document",
- "type": "file",
- "id": 75003903445,
- "name": "0EB21E7F3E887DAEADC3E1B047BCA6AC (1).docx",
- "size": 21087,
- "created_at": 1624330900,
- "modified_at": 1624330900,
- "modified_by": {
- "id": 13117471,
- "name": "yfytest01",
- "login": "admin@mars.fangcloud.com",
- "enterprise_id": 426870
}, - "description": "",
- "path": [
- {
- "type": "folder",
- "id": 0,
- "name": "全部文件"
}
], - "owned_by": {
- "id": 13117471,
- "name": "yfytest01",
- "login": "admin@mars.fangcloud.com",
- "enterprise_id": 426870
}, - "parent": {
- "type": "folder",
- "id": 0
}, - "sequence_id": 8,
- "in_trash": false,
- "is_deleted": false,
- "is_frequently_used": false
}需要使用用户token,根据用户id生成,详情参考上面生成的token文档
请求示例:
curl --location --request POST 'https://open.fangcloud.com/api/v2/folder/179000000087/delete' \
--header 'Authorization: Bearer bdd88b1c-aa8a-4126-b380-a1e64f9348a5'
| id required | integer <int64> 删除文件的ID |
{- "success": true
}需要使用用户token,根据用户id生成,详情参考上面生成的token文档
请求示例:
curl --location --request POST 'https://open.fangcloud.com/api/v2/folder/179000000087/delete_from_trash' \
--header 'Authorization: Bearer bdd88b1c-aa8a-4126-b380-a1e64f9348a5'
| id required | integer <int64> 从回收站删除文件的ID |
{- "success": true
}需要使用用户token,根据用户id生成,详情参考上面生成的token文档
请求示例:
curl --location --request GET 'https://open.fangcloud.com/api/v2/file/75003903551/download_v2?version=0&valid_period=100' \
--header 'Authorization: Bearer 775eb65c-8545-419d-823c-ffb5d42d75c0'
| id required | integer <int64> 文件的ID |
| version | integer <int64> Default: 0 文件的版本信息 |
| external_enterprise_id | integer <int64> 外协文件的企业ID |
需要使用用户token,根据用户id生成,详情参考上面生成的token文档
请求示例:
curl --location --request GET 'https://open.fangcloud.com/api/v2/file/75003907526/version/75000911769/info' \
--header 'Authorization: Bearer 775eb65c-8545-419d-823c-ffb5d42d75c0'
| id required | integer <int64> 文件id |
| version_id required | integer <int64> 文件版本id |
{- "success": true,
- "id": 0,
- "file_id": 0,
- "sha1": "string",
- "name": "string",
- "size": 0,
- "modified_at": 0,
- "modified_by": {
- "id": 0,
- "name": "string",
- "login": "string",
- "enterprise_id": 0,
- "miniDepartmentList": [
- {
- "id": 0,
- "name": "string",
- "director": { },
- "user_count": 0,
- "children_departments_count": 0,
- "direct_item_count": 0,
- "order": 0,
- "level": 0,
- "parentDepartments": [
- { }
]
}
]
}, - "current": true,
- "remark": "string",
- "description": "string"
}需要使用用户token,根据用户id生成,详情参考上面生成的token文档
请求示例:
curl --location --request POST 'https://open.fangcloud.com/api/v2/file/75003907526/version/75000911810/delete' \
--header 'Authorization: Bearer 775eb65c-8545-419d-823c-ffb5d42d75c0'
| id required | integer <int64> 文件id |
| version_id required | integer <int64> 文件版本id |
{- "success": true
}需要使用用户token,根据用户id生成,详情参考上面生成的token文档
请求示例:
curl --location --request GET 'https://open.fangcloud.com/api/v2/file/75003907526/versions' \
--header 'Authorization: Bearer 775eb65c-8545-419d-823c-ffb5d42d75c0'
| id required | integer <int64> 文件id |
{- "success": true,
- "file_versions": [
- {
- "success": true,
- "id": 0,
- "file_id": 0,
- "sha1": "string",
- "name": "string",
- "size": 0,
- "modified_at": 0,
- "modified_by": {
- "id": 0,
- "name": "string",
- "login": "string",
- "enterprise_id": 0,
- "miniDepartmentList": [
- {
- "id": 0,
- "name": "string",
- "director": { },
- "user_count": 0,
- "children_departments_count": 0,
- "direct_item_count": 0,
- "order": 0,
- "level": 0,
- "parentDepartments": [
- { }
]
}
]
}, - "current": true,
- "remark": "string",
- "description": "string"
}
]
}需要使用用户token,根据用户id生成,详情参考上面生成的token文档
请求示例:
curl --location --request POST 'https://open.fangcloud.com/api/v2/file/75003907526/version/75000911769/promote' \
--header 'Authorization: Bearer 775eb65c-8545-419d-823c-ffb5d42d75c0'
| id required | integer <int64> 文件id |
| version_id required | integer <int64> 文件版本id |
{- "space": {
- "type": "personal"
}, - "sha1": "dc5d8f86d8d33eac2145eddaf1ff85dd38dcca5f",
- "comments_count": 0,
- "extension_category": "document",
- "type": "file",
- "id": 75003903445,
- "name": "0EB21E7F3E887DAEADC3E1B047BCA6AC (1).docx",
- "size": 21087,
- "created_at": 1624330900,
- "modified_at": 1624330900,
- "modified_by": {
- "id": 13117471,
- "name": "yfytest01",
- "login": "admin@mars.fangcloud.com",
- "enterprise_id": 426870
}, - "description": "",
- "path": [
- {
- "type": "folder",
- "id": 0,
- "name": "全部文件"
}
], - "owned_by": {
- "id": 13117471,
- "name": "yfytest01",
- "login": "admin@mars.fangcloud.com",
- "enterprise_id": 426870
}, - "parent": {
- "type": "folder",
- "id": 0
}, - "sequence_id": 8,
- "in_trash": false,
- "is_deleted": false,
- "is_frequently_used": false
}需要使用用户token,根据用户id生成,详情参考上面生成的token文档
请求示例:
curl --location 'https://open.fangcloud.com/api/v2/file/75003624924/trash' \
--header 'Authorization: Bearer bdd88b1c-aa8a-4126-b380-a1e64f9348a5'
| id required | integer <int64> 文件id |
{- "deleted_at": 1624869434,
- "deleted_by": {
- "id": 13117471,
- "name": "yfytest01",
- "login": "admin@mars.fangcloud.com",
- "enterprise_id": 426870
}, - "sha1": "dc5d8f86d8d33eac2145eddaf1ff85dd38dcca5f",
- "comments_count": 0,
- "extension_category": "document",
- "type": "file",
- "id": 75003624924,
- "name": "11111.docx",
- "size": 21087,
- "created_at": 1622001702,
- "modified_at": 1624354160,
- "modified_by": {
- "id": 13117471,
- "name": "yfytest01",
- "login": "admin@mars.fangcloud.com",
- "enterprise_id": 426870
}, - "description": "",
- "path": [
- {
- "type": "folder",
- "id": 0,
- "name": "全部文件"
}
], - "owned_by": {
- "id": 13117471,
- "name": "yfytest01",
- "login": "admin@mars.fangcloud.com",
- "enterprise_id": 426870
}, - "parent": {
- "type": "folder",
- "id": 0,
- "name": "全部文件"
}, - "sequence_id": 9,
- "in_trash": false,
- "is_deleted": false,
- "is_frequently_used": false
}需要使用用户token,根据用户id生成,详情参考上面生成的token文档
请求示例:
curl --location 'https://open.fangcloud.com/api/v2/file/75003903445/info_v2' \
--header 'Authorization: Bearer bc326c4a-6eb0-4790-8cf3-3d19232af711'
| id required | integer <int64> 文件id |
| external_enterprise_id | integer <int64> 外协企业id,文件为外协企业文件时必填 |
{- "space": {
- "type": "personal"
}, - "sha1": "dc5d8f86d8d33eac2145eddaf1ff85dd38dcca5f",
- "comments_count": 0,
- "extension_category": "document",
- "type": "file",
- "id": 75003903445,
- "name": "0EB21E7F3E887DAEADC3E1B047BCA6AC (1).docx",
- "size": 21087,
- "created_at": 1624330900,
- "modified_at": 1624330900,
- "modified_by": {
- "id": 13117471,
- "name": "yfytest01",
- "login": "admin@mars.fangcloud.com",
- "enterprise_id": 426870
}, - "description": "",
- "path": [
- {
- "type": "folder",
- "id": 0,
- "name": "全部文件"
}
], - "owned_by": {
- "id": 13117471,
- "name": "yfytest01",
- "login": "admin@mars.fangcloud.com",
- "enterprise_id": 426870
}, - "parent": {
- "type": "folder",
- "id": 0
}, - "sequence_id": 8,
- "in_trash": false,
- "is_deleted": false,
- "is_frequently_used": false
}需要使用用户token,根据用户id生成,详情参考上面生成的token文档
请求示例:
curl --location --request GET 'https://open.fangcloud.com/api/v2/file/recent_items?limit=1' \
--header 'Authorization: Bearer 775eb65c-8545-419d-823c-ffb5d42d75c0'
| limit required | integer <int32> >= 0 获取的条数 |
{- "files": [
- {
- "sha1": "1f5243f2ba7872206aef7197ea92762eddf47555",
- "comments_count": 0,
- "extension_category": "document",
- "type": "file",
- "id": 3990312,
- "name": "新建 Microsoft Word 文档.doc",
- "size": 26112,
- "created_at": 1461919867,
- "modified_at": 1461919868,
- "modified_by": {
- "id": 468,
- "name": "tt2",
- "login": "tt@t.com",
- "enterprise_id": 1
}, - "description": "",
- "path": [
- {
- "type": "folder",
- "id": 0,
- "name": "全部文件"
}
], - "owned_by": {
- "id": 468,
- "name": "tt2",
- "login": "tt@t.com",
- "enterprise_id": 1
}, - "sequence_id": 0
}, - {
- "sha1": "8cfed9a789a37cc8f195510ca34bd1c2800ea2a6",
- "comments_count": 0,
- "extension_category": "document",
- "type": "file",
- "id": 3990314,
- "name": "12.xls",
- "size": 23040,
- "created_at": 1461919873,
- "modified_at": 1462783210,
- "modified_by": {
- "id": 468,
- "name": "tt2",
- "login": "tt@t.com",
- "enterprise_id": 1
}, - "description": "",
- "path": [
- {
- "type": "folder",
- "id": 0,
- "name": "全部文件"
}
], - "owned_by": {
- "id": 468,
- "name": "tt2",
- "login": "tt@t.com",
- "enterprise_id": 1
}, - "sequence_id": 3
}
], - "folders": [ ],
- "total_count": 2,
- "page_id": 0,
- "page_capacity": 20,
- "page_count": 1
}需要使用用户token,根据用户id生成,详情参考上面生成的token文档
请求示例:
curl --location --request GET 'https://open.fangcloud.com/api/v2/file/75003907071/comments' \
--header 'Authorization: Bearer 775eb65c-8545-419d-823c-ffb5d42d75c0'
| id required | integer <int64> 文件id |
{- "success": true,
- "comments": [
- {
- "success": true,
- "id": 0,
- "content": "string",
- "created_at": 0,
- "user": {
- "id": 0,
- "name": "string",
- "login": "string",
- "enterprise_id": 0,
- "miniDepartmentList": [
- {
- "id": 0,
- "name": "string",
- "director": { },
- "user_count": 0,
- "children_departments_count": 0,
- "direct_item_count": 0,
- "order": 0,
- "level": 0,
- "parentDepartments": [
- { }
]
}
]
}
}
]
}需要使用用户token,根据用户id生成,详情参考上面生成的token文档
请求示例:
curl --location --request POST 'https://open.fangcloud.com/api/v2/file/126000100472/mark_as_used' \
--header 'Authorization: Bearer 775eb65c-8545-419d-823c-ffb5d42d75c0'
| item_id required | integer <int64> 文件id |
{- "success": true
}需要使用用户token,根据用户id生成,详情参考上面生成的token文档
请求示例:
curl --location --request POST 'https://open.fangcloud.com/api/v2/folder/179000000087/move' \
--header 'Authorization: Bearer d8ec3bc7-c7f2-40b6-a591-7b03c134478f' \
--header 'Content-Type: application/json' \
--data-raw '{
"target_folder_id": 179000000178,
"target_space": {
"type": "department",
"id": 179000000178
}
}'
| id required | integer <int64> 移动文件的ID |
目标位置
| target_folder_id required | integer <int64> (目标文件夹id) |
{- "success": true
}需要使用用户token,根据用户id生成,详情参考上面生成的token文档
请求示例:
curl --location --request POST 'https://open.fangcloud.com/api/v2/file/75003685568/new_version_v2' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer 1cd9081c-aa2c-4f30-a619-f32663dc57cc' \
--data '{
"name": "报表v1.0.pdf",
"upload_type": "api",
"remark": "新版本",
}'
该接口会返回上传地址,获取到上传地址后,上传文件示例:
curl --location 'https://upload01.fangcloud.com/upload/d125644c2e43449a8becbcf9217c5dcf/ae03113d47ed2732cc40480906705861869c2e7f7687528e29feee5c3ae1793c' \
--header 'Cookie: lang=zh-CN' \
--form 'file=@"/Users/liangxiaosheng/FangcloudV2/personal_space.localized/个人工作文件/个人/开放平台/开放平台使用文档/token介绍.jpg"' ```
| id required | integer <int64> 文件id |
上传新版本详细信息
| name required | string (文件名称,文件名称必须是1到222个字符,并且不能含有/ ? : * " > < \) |
| remark | string (上传新版本时对新版本的备注) |
| upload_type required | string (上传类型) 固定传api |
需要使用用户token,根据用户id生成,详情参考上面生成的token文档
请求示例:
curl --location --request POST 'https://open.fangcloud.com/api/v2/file/pack_download' \
--header 'Authorization: Bearer 583fad43-3265-45df-9e13-91fa5a22a2ca' \
--header 'Content-Type: application/json' \
--data '{
"item_typed_ids": [
"file_203003511640",
"folder_203000428376"
]
}'
文件/文件夹例表
| item_typed_ids required | Array of strings (文件id或文件夹id) |
需要使用用户token,根据用户id生成,详情参考上面生成的token文档
请求示例:
curl --location --request POST 'https://open.fangcloud.com/api/v2/folder/179000000087/restore_from_trash' \
--header 'Authorization: Bearer bdd88b1c-aa8a-4126-b380-a1e64f9348a5'
| id required | integer <int64> 从回收站回复的文件的ID |
{- "success": true
}需要使用用户token,根据用户id生成,详情参考上面生成的token文档
请求示例:
curl --location 'https://open.fangcloud.com/api/v2/folder/179000000087/update' \
--header 'Authorization: Bearer 583fad43-3265-45df-9e13-91fa5a22a2ca' \
--header 'Content-Type: application/json' \
--data '{
"name": "new name"
}'
| id required | integer <int64> 更新文件的ID |
文件的详细信息
| name | string (文件名,文件名称必须是1到222个字符,并且不能含有/ ? : * " > < \) |
| description | string (文件描述,长度必须小于等于140个字符) |
{- "space": {
- "type": "personal"
}, - "sha1": "dc5d8f86d8d33eac2145eddaf1ff85dd38dcca5f",
- "comments_count": 0,
- "extension_category": "document",
- "type": "file",
- "id": 75003903445,
- "name": "0EB21E7F3E887DAEADC3E1B047BCA6AC (1).docx",
- "size": 21087,
- "created_at": 1624330900,
- "modified_at": 1624330900,
- "modified_by": {
- "id": 13117471,
- "name": "yfytest01",
- "login": "admin@mars.fangcloud.com",
- "enterprise_id": 426870
}, - "description": "",
- "path": [
- {
- "type": "folder",
- "id": 0,
- "name": "全部文件"
}
], - "owned_by": {
- "id": 13117471,
- "name": "yfytest01",
- "login": "admin@mars.fangcloud.com",
- "enterprise_id": 426870
}, - "parent": {
- "type": "folder",
- "id": 0
}, - "sequence_id": 8,
- "in_trash": false,
- "is_deleted": false,
- "is_frequently_used": false
}需要使用用户token,根据用户id生成,详情参考上面生成的token文档
请求示例:
curl --location --request POST 'https://open.fangcloud.com/api/v2/file/upload_by_path' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer 003504d9-9a1e-4fc5-8b3e-188ee866b557' \
--header 'Cookie: lang=zh-CN' \
--data '{
"target_folder_path": "123/123",
"name": "text.tar",
"upload_type": "api"
}'
该接口会返回上传地址,获取到上传地址后,上传文件示例:
curl --location 'https://upload01.fangcloud.com/upload/d125644c2e43449a8becbcf9217c5dcf/ae03113d47ed2732cc40480906705861869c2e7f7687528e29feee5c3ae1793c' \
--header 'Cookie: lang=zh-CN' \
--form 'file=@"/Users/liangxiaosheng/FangcloudV2/personal_space.localized/个人工作文件/个人/开放平台/开放平台使用文档/token介绍.jpg"' ```
上传文件详细信息
| target_folder_path required | string (路径名,以/划分文件夹,根目录在个人文件下,文件夹名称必须是1到222个字符,并且不能含有/ ? : * " > < |且末尾不能为“.”) |
| name required | string (文件名称,文件名称必须是1到222个字符,并且不能含有/ ? : * " > < \) |
| upload_type required | string (上传类型) 固定传api |
| is_covered | boolean (为true时重名情况下直接返回上传新版本的预签名链接,默认为false) |
需要使用用户token,根据用户id生成,详情参考上面生成的token文档
请求示例:
curl --location --request POST 'https://open.fangcloud.com/api/v2/file/upload_v2' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer 1cd9081c-aa2c-4f30-a619-f32663dc57cc' \
--data '{
"parent_id": "501002634212",
"name": "报表v1.0.pdf",
"upload_type": "api"
}'
该接口会返回上传地址,获取到上传地址后,上传文件示例:
curl --location 'https://upload01.fangcloud.com/upload/d125644c2e43449a8becbcf9217c5dcf/ae03113d47ed2732cc40480906705861869c2e7f7687528e29feee5c3ae1793c' \
--header 'Cookie: lang=zh-CN' \
--form 'file=@"/Users/liangxiaosheng/FangcloudV2/personal_space.localized/个人工作文件/个人/开放平台/开放平台使用文档/token介绍.jpg"' ```
上传文件详细信息
| parent_id required | integer <int64> (上传至的文件夹id) |
| name required | string (准备上传的文件的名称,文件名称必须是1到222个字符,并且不能含有/ ? : * " > < \) |
| upload_type required | string (上传类型) 固定传api |
| is_covered | boolean (为true时重名情况下直接返回上传新版本的预签名链接,默认为false) |
需要使用用户token,根据用户id生成,详情参考上面生成的token文档
请求示例:
curl --location --request POST 'https://open.fangcloud.com/api/v2/folder/179000000087/copy' \
--header 'Authorization: Bearer 583fad43-3265-45df-9e13-91fa5a22a2ca' \
--header 'Content-Type: application/json' \
--data '{
"target_folder_id": 179000000178
}'
| id required | integer <int64> 文件夹id |
拷贝目标文件夹信息
| target_folder_id required | integer <int64> (目标文件夹id) |
| department_id | integer <int64> (部门id) >= 0 target_folder_id传0时有效,不填则放在个人空间根目录,填写则放在部门空间根目录 |
{- "space": {
- "type": "personal"
}, - "item_count": 0,
- "type": "folder",
- "id": 203000426996,
- "name": "new folders",
- "size": 0,
- "created_at": 1625039303,
- "modified_at": 1625039303,
- "description": "",
- "path": [
- {
- "type": "folder",
- "id": 0,
- "name": "全部文件"
}
], - "owned_by": {
- "id": 13214349,
- "name": "yfytest01",
- "login": "venus@venus.fangcloud.com",
- "enterprise_id": 431512
}, - "parent": {
- "type": "folder",
- "id": 0
}, - "sequence_id": 0,
- "in_trash": false,
- "is_deleted": false,
- "is_frequently_used": false
}需要使用用户token,根据用户id生成,详情参考上面生成的token文档
请求示例:
curl --location --request POST 'https://open.fangcloud.com/api/v2/folder/create' \
--header 'Authorization: Bearer 583fad43-3265-45df-9e13-91fa5a22a2ca' \
--header 'Content-Type: application/json' \
--data '{
"name": "new folders"
"parent_id": 75000441887
}'
文件夹的相信信息
| name required | string (文件夹名,文件夹名称必须是1到222个字符,并且不能含有/ ? : * " > < \) |
| parent_id required | integer <int64> (父文件夹id) |
| department_id | integer <int64> (部门id) >= 0 parent_id传0时有效,不填则在个人空间根目录创建,填写则在部门空间根目录创建 |
{- "space": {
- "type": "personal"
}, - "item_count": 0,
- "type": "folder",
- "id": 203000426996,
- "name": "new folders",
- "size": 0,
- "created_at": 1625039303,
- "modified_at": 1625039303,
- "description": "",
- "path": [
- {
- "type": "folder",
- "id": 0,
- "name": "全部文件"
}
], - "owned_by": {
- "id": 13214349,
- "name": "yfytest01",
- "login": "venus@venus.fangcloud.com",
- "enterprise_id": 431512
}, - "parent": {
- "type": "folder",
- "id": 0
}, - "sequence_id": 0,
- "in_trash": false,
- "is_deleted": false,
- "is_frequently_used": false
}需要使用用户token,根据用户id生成,详情参考上面生成的token文档
请求示例:
curl --location --request POST 'https://open.fangcloud.com/api/v2/folder/create_by_path' \
--header 'Authorization: Bearer 583fad43-3265-45df-9e13-91fa5a22a2ca' \
--header 'Content-Type: application/json' \
--data '{
"target_folder_path": "会议测试/9.25/研发"
"department_id": 894823
}'
文件夹的相信信息
| target_folder_path required | string (路径名,以/划分文件夹,根目录在个人文件下,文件夹名称必须是1到222个字符,并且不能含有/ ? : * " > < |且末尾不能为“.”) |
| department_id | integer <int64> (不填则默认在个人文件下) >= 0 |
{- "space": {
- "type": "personal"
}, - "item_count": 0,
- "type": "folder",
- "id": 203000426996,
- "name": "new folders",
- "size": 0,
- "created_at": 1625039303,
- "modified_at": 1625039303,
- "description": "",
- "path": [
- {
- "type": "folder",
- "id": 0,
- "name": "全部文件"
}
], - "owned_by": {
- "id": 13214349,
- "name": "yfytest01",
- "login": "venus@venus.fangcloud.com",
- "enterprise_id": 431512
}, - "parent": {
- "type": "folder",
- "id": 0
}, - "sequence_id": 0,
- "in_trash": false,
- "is_deleted": false,
- "is_frequently_used": false
}需要使用用户token,根据用户id生成,详情参考上面生成的token文档
请求示例:
curl --location --request POST 'https://open.fangcloud.com/api/v2/folder/179000000087/delete_from_trash' \
--header 'Authorization: Bearer 775eb65c-8545-419d-823c-ffb5d42d75c0'
| id required | integer <int64> 文件夹id |
{- "success": true
}需要使用用户token,根据用户id生成,详情参考上面生成的token文档
请求示例:
curl --location --request POST 'https://open.fangcloud.com/api/v2/folder/179000000087/delete' \
--header 'Authorization: Bearer 775eb65c-8545-419d-823c-ffb5d42d75c0'
| id required | integer <int64> 文件夹id |
{- "success": true
}需要使用用户token,根据用户id生成,详情参考上面生成的token文档
请求示例:
curl --location --request GET 'https://open.fangcloud.com/api/v2/folder/179000000087/trash' \
--header 'Authorization: Bearer 775eb65c-8545-419d-823c-ffb5d42d75c0'
| id required | integer <int64> 文件夹id |
{- "deleted_at": 1497513743,
- "deleted_by": {
- "id": 468,
- "name": "tt",
- "login": "tt@t.com",
- "enterprise_id": 1
}, - "folder_type": "normal",
- "id": 501000307503,
- "path": [
- {
- "name": "全部文件",
- "type": "folder",
- "id": 0
}
], - "sequence_id": 0,
- "name": "unittest_folder",
- "owned_by": {
- "name": "tt",
- "login": "tt@t.com",
- "id": 468,
- "enterprise_id": 1
}, - "type": "folder",
- "created_at": 1489053096,
- "size": 0,
- "description": "",
- "parent": {
- "name": "全部文件",
- "type": "folder",
- "id": 0
}, - "modified_at": 1489053096,
- "modified_by": {
- "id": 468,
- "name": "tt2",
- "login": "tt@t.com",
- "enterprise_id": 1
}, - "item_count": 0
}需要使用用户token,根据用户id生成,详情参考上面生成的token文档
请求示例:
curl --location --request GET 'https://open.fangcloud.com/api/v2/folder/293001037960/children?folder_id=293001037960&type=all&page_capacity=100&page_id=1' \
--header 'Authorization: Bearer 775eb65c-8545-419d-823c-ffb5d42d75c0'
| id required | integer <int64> 文件夹id |
| page_id | integer <int32> >= 0 页号(默认0) |
| page_capacity | integer <int32> >= 1 Default: 20 页容量(默认20) |
| type | string 分为file,folder,all三种,默认为all |
| department_id | integer <int64> >= 0 部门id |
| sort_by | string 分为name,date,size三种,默认为date |
| sort_direction | string 分为desc,asc两种,默认为desc |
{- "files": [
- {
- "sha1": "1f5243f2ba7872206aef7197ea92762eddf47555",
- "comments_count": 0,
- "extension_category": "document",
- "type": "file",
- "id": 3990312,
- "name": "新建 Microsoft Word 文档.doc",
- "size": 26112,
- "created_at": 1461919867,
- "modified_at": 1461919868,
- "modified_by": {
- "id": 468,
- "name": "tt2",
- "login": "tt@t.com",
- "enterprise_id": 1
}, - "description": "",
- "path": [
- {
- "type": "folder",
- "id": 0,
- "name": "全部文件"
}
], - "owned_by": {
- "id": 468,
- "name": "tt2",
- "login": "tt@t.com",
- "enterprise_id": 1
}, - "sequence_id": 0
}, - {
- "sha1": "8cfed9a789a37cc8f195510ca34bd1c2800ea2a6",
- "comments_count": 0,
- "extension_category": "document",
- "type": "file",
- "id": 3990314,
- "name": "12.xls",
- "size": 23040,
- "created_at": 1461919873,
- "modified_at": 1462783210,
- "modified_by": {
- "id": 468,
- "name": "tt2",
- "login": "tt@t.com",
- "enterprise_id": 1
}, - "description": "",
- "path": [
- {
- "type": "folder",
- "id": 0,
- "name": "全部文件"
}
], - "owned_by": {
- "id": 468,
- "name": "tt2",
- "login": "tt@t.com",
- "enterprise_id": 1
}, - "sequence_id": 3
}
], - "folders": [ ],
- "total_count": 2,
- "page_id": 0,
- "page_capacity": 20,
- "page_count": 1
}需要使用用户token,根据用户id生成,详情参考上面生成的token文档
请求示例:
curl --location --request GET 'https://open.fangcloud.com/api/v2/folder/collab_folders?page_id=0&page_capacity=10&sort_by=name&sort_direction=desc' \
--header 'Authorization: Bearer 775eb65c-8545-419d-823c-ffb5d42d75c0'
| page_id | integer <int32> >= 0 页号(默认0) |
| page_capacity | integer <int32> >= 1 Default: 20 页容量(默认20) |
| sort_by | string 排序方式(‘name’, ‘date’, ‘size’) |
| sort_direction | string 排序顺序(‘desc’, ‘asc’ |
{- "files": [
- {
- "sha1": "1f5243f2ba7872206aef7197ea92762eddf47555",
- "comments_count": 0,
- "extension_category": "document",
- "type": "file",
- "id": 3990312,
- "name": "新建 Microsoft Word 文档.doc",
- "size": 26112,
- "created_at": 1461919867,
- "modified_at": 1461919868,
- "modified_by": {
- "id": 468,
- "name": "tt2",
- "login": "tt@t.com",
- "enterprise_id": 1
}, - "description": "",
- "path": [
- {
- "type": "folder",
- "id": 0,
- "name": "全部文件"
}
], - "owned_by": {
- "id": 468,
- "name": "tt2",
- "login": "tt@t.com",
- "enterprise_id": 1
}, - "sequence_id": 0
}, - {
- "sha1": "8cfed9a789a37cc8f195510ca34bd1c2800ea2a6",
- "comments_count": 0,
- "extension_category": "document",
- "type": "file",
- "id": 3990314,
- "name": "12.xls",
- "size": 23040,
- "created_at": 1461919873,
- "modified_at": 1462783210,
- "modified_by": {
- "id": 468,
- "name": "tt2",
- "login": "tt@t.com",
- "enterprise_id": 1
}, - "description": "",
- "path": [
- {
- "type": "folder",
- "id": 0,
- "name": "全部文件"
}
], - "owned_by": {
- "id": 468,
- "name": "tt2",
- "login": "tt@t.com",
- "enterprise_id": 1
}, - "sequence_id": 3
}
], - "folders": [ ],
- "total_count": 2,
- "page_id": 0,
- "page_capacity": 20,
- "page_count": 1
}需要使用用户token,根据用户id生成,详情参考上面生成的token文档
请求示例:
curl --location --request GET 'https://open.fangcloud.com/api/v2/folder/department_folders?department_id=596371' \
--header 'Authorization: Bearer 775eb65c-8545-419d-823c-ffb5d42d75c0'
| page_id | integer <int32> >= 0 页码 |
| page_capacity | integer <int32> >= 1 Default: 20 每页容量 |
| department_id required | integer <int64> >= 0 部门ID |
| sort_by | string 排序方式,分为name,date,size三种,默认为date |
| sort_direction | string 排序顺序,分为desc,asc两种,默认为desc |
{- "files": [
- {
- "sha1": "1f5243f2ba7872206aef7197ea92762eddf47555",
- "comments_count": 0,
- "extension_category": "document",
- "type": "file",
- "id": 3990312,
- "name": "新建 Microsoft Word 文档.doc",
- "size": 26112,
- "created_at": 1461919867,
- "modified_at": 1461919868,
- "modified_by": {
- "id": 468,
- "name": "tt2",
- "login": "tt@t.com",
- "enterprise_id": 1
}, - "description": "",
- "path": [
- {
- "type": "folder",
- "id": 0,
- "name": "全部文件"
}
], - "owned_by": {
- "id": 468,
- "name": "tt2",
- "login": "tt@t.com",
- "enterprise_id": 1
}, - "sequence_id": 0
}, - {
- "sha1": "8cfed9a789a37cc8f195510ca34bd1c2800ea2a6",
- "comments_count": 0,
- "extension_category": "document",
- "type": "file",
- "id": 3990314,
- "name": "12.xls",
- "size": 23040,
- "created_at": 1461919873,
- "modified_at": 1462783210,
- "modified_by": {
- "id": 468,
- "name": "tt2",
- "login": "tt@t.com",
- "enterprise_id": 1
}, - "description": "",
- "path": [
- {
- "type": "folder",
- "id": 0,
- "name": "全部文件"
}
], - "owned_by": {
- "id": 468,
- "name": "tt2",
- "login": "tt@t.com",
- "enterprise_id": 1
}, - "sequence_id": 3
}
], - "folders": [ ],
- "total_count": 2,
- "page_id": 0,
- "page_capacity": 20,
- "page_count": 1
}需要使用用户token,根据用户id生成,详情参考上面生成的token文档
请求示例:
curl --location --request GET 'https://open.fangcloud.com/api/v2/folder/293001037960/info' \
--header 'Authorization: Bearer 775eb65c-8545-419d-823c-ffb5d42d75c0'
| id required | integer <int64> 文件夹id |
{- "space": {
- "type": "personal"
}, - "item_count": 0,
- "type": "folder",
- "id": 203000426996,
- "name": "new folders",
- "size": 0,
- "created_at": 1625039303,
- "modified_at": 1625039303,
- "description": "",
- "path": [
- {
- "type": "folder",
- "id": 0,
- "name": "全部文件"
}
], - "owned_by": {
- "id": 13214349,
- "name": "yfytest01",
- "login": "venus@venus.fangcloud.com",
- "enterprise_id": 431512
}, - "parent": {
- "type": "folder",
- "id": 0
}, - "sequence_id": 0,
- "in_trash": false,
- "is_deleted": false,
- "is_frequently_used": false
}需要使用用户token,根据用户id生成,详情参考上面生成的token文档
请求示例:
curl --location --request GET 'https://open.fangcloud.com/api/v2/folder/personal_items?page_id=1&page_capacity=2&sort_by=name&sort_direction=asc' \
--header 'Authorization: Bearer 775eb65c-8545-419d-823c-ffb5d42d75c0'
| page_id | integer <int32> >= 0 页码 |
| page_capacity | integer <int32> >= 1 Default: 20 每页容量 |
| type | string 类型 |
| sort_by | string Example: sort_by=['name', 'date', 'size'] 排序方式 |
| sort_direction | string Example: sort_direction=['desc', 'asc'] 排序顺序 |
{- "files": [
- {
- "sha1": "1f5243f2ba7872206aef7197ea92762eddf47555",
- "comments_count": 0,
- "extension_category": "document",
- "type": "file",
- "id": 3990312,
- "name": "新建 Microsoft Word 文档.doc",
- "size": 26112,
- "created_at": 1461919867,
- "modified_at": 1461919868,
- "modified_by": {
- "id": 468,
- "name": "tt2",
- "login": "tt@t.com",
- "enterprise_id": 1
}, - "description": "",
- "path": [
- {
- "type": "folder",
- "id": 0,
- "name": "全部文件"
}
], - "owned_by": {
- "id": 468,
- "name": "tt2",
- "login": "tt@t.com",
- "enterprise_id": 1
}, - "sequence_id": 0
}, - {
- "sha1": "8cfed9a789a37cc8f195510ca34bd1c2800ea2a6",
- "comments_count": 0,
- "extension_category": "document",
- "type": "file",
- "id": 3990314,
- "name": "12.xls",
- "size": 23040,
- "created_at": 1461919873,
- "modified_at": 1462783210,
- "modified_by": {
- "id": 468,
- "name": "tt2",
- "login": "tt@t.com",
- "enterprise_id": 1
}, - "description": "",
- "path": [
- {
- "type": "folder",
- "id": 0,
- "name": "全部文件"
}
], - "owned_by": {
- "id": 468,
- "name": "tt2",
- "login": "tt@t.com",
- "enterprise_id": 1
}, - "sequence_id": 3
}
], - "folders": [ ],
- "total_count": 2,
- "page_id": 0,
- "page_capacity": 20,
- "page_count": 1
}需要使用用户token,根据用户id生成,详情参考上面生成的token文档
请求示例:
curl --location --request GET 'https://open.fangcloud.com/api/v2/folder/203000425147/collabs' \
--header 'Authorization: Bearer 775eb65c-8545-419d-823c-ffb5d42d75c0'
| id required | integer <int64> 文件夹id |
{- "final_role": "owner",
- "collabs": [
- {
- "accessible_by": {
- "type": "user",
- "id": 881525,
- "name": "隔壁老王"
}, - "accepted": true,
- "role": "owner"
}, - {
- "id": 407030,
- "accessible_by": {
- "type": "department",
- "id": 78385,
- "name": "222"
}, - "accepted": true,
- "role": "editor"
}, - {
- "id": 407033,
- "accessible_by": {
- "type": "group",
- "id": 94444,
- "name": "假发的就是"
}, - "accepted": true,
- "role": "editor"
}, - {
- "id": 403889,
- "accessible_by": {
- "type": "user",
- "id": 881526,
- "name": "小二上菜"
}, - "accepted": true,
- "role": "editor"
}
]
}需要使用用户token,根据用户id生成,详情参考上面生成的token文档
请求示例:
curl --location --request POST 'https://open.fangcloud.com/api/v2/folder/179000000087/move' \
--header 'Authorization: Bearer 583fad43-3265-45df-9e13-91fa5a22a2ca' \
--header 'Content-Type: application/json' \
--data '{
"target_folder_id": 179000000178
}'
| id required | integer <int64> 文件夹id |
移动目标文件夹信息
| target_folder_id required | integer <int64> (目标文件夹id) |
| department_id | integer <int64> (部门id) >= 0 target_folder_id传0时有效,不填则放在个人空间根目录,填写则放在部门空间根目录 |
{- "success": true
}需要使用用户token,根据用户id生成,详情参考上面生成的token文档
请求示例:
curl --location --request POST 'https://open.fangcloud.com/api/v2/folder/179000000087/restore_from_trash' \
--header 'Authorization: Bearer 775eb65c-8545-419d-823c-ffb5d42d75c0'
| id required | integer <int64> 文件夹id |
{- "success": true
}需要使用用户token,根据用户id生成,详情参考上面生成的token文档
请求示例:
curl --location --request POST 'https://open.fangcloud.com/api/v2/folder/179000000087/update' \
--header 'Authorization: Bearer 583fad43-3265-45df-9e13-91fa5a22a2ca' \
--header 'Content-Type: application/json' \
--data '{
"name": "ew name"
}'
| id required | integer <int64> 文件夹id |
文件夹的详细信息
| name | string (文件夹名,文件夹名称必须是1到222个字符,并且不能含有/ ? : * " > < \) |
| description | string (备注) |
{- "space": {
- "type": "personal"
}, - "item_count": 0,
- "type": "folder",
- "id": 203000426996,
- "name": "new folders",
- "size": 0,
- "created_at": 1625039303,
- "modified_at": 1625039303,
- "description": "",
- "path": [
- {
- "type": "folder",
- "id": 0,
- "name": "全部文件"
}
], - "owned_by": {
- "id": 13214349,
- "name": "yfytest01",
- "login": "venus@venus.fangcloud.com",
- "enterprise_id": 431512
}, - "parent": {
- "type": "folder",
- "id": 0
}, - "sequence_id": 0,
- "in_trash": false,
- "is_deleted": false,
- "is_frequently_used": false
}需要使用用户token,根据用户id生成,详情参考上面生成的token文档
| page_id | integer <int32> >= 0 页码 |
{- "frequent_items": [
- {
- "comments_count": 0,
- "extension_category": "document",
- "type": "file",
- "id": 203003489684,
- "name": "测试文档xxxqqq (2).docx",
- "size": 19236,
- "created_at": 1625133897,
- "modified_at": 1625133897,
- "modified_by": {
- "id": 13214349,
- "name": "yfytest01",
- "login": "venus@venus.fangcloud.com",
- "enterprise_id": 431512
}, - "description": "",
- "path": [ ],
- "owned_by": {
- "id": 13214349,
- "name": "yfytest01",
- "login": "venus@venus.fangcloud.com",
- "enterprise_id": 431512
}, - "sequence_id": 0,
- "file_version_key": "0b2ddce24b1e50daef05b21243be9b04",
- "permissions": [
- "item_upload",
- "item_download",
- "item_create_comment",
- "item_own",
- "item_preview",
- "item_view",
- "item_share",
- "edit_properties",
- "item_create_collab",
- "item_restore",
- "permanent_delete",
- "item_edit_collab",
- "item_delete"
], - "in_trash": false,
- "is_deleted": false,
- "is_frequently_used": true
}, - {
- "comments_count": 0,
- "extension_category": "document",
- "type": "file",
- "id": 203003487135,
- "name": "360萌新的Q&A.docx",
- "size": 18376,
- "created_at": 1624955256,
- "modified_at": 1624955256,
- "modified_by": {
- "id": 13214349,
- "name": "yfytest01",
- "login": "venus@venus.fangcloud.com",
- "enterprise_id": 431512
}, - "description": "",
- "path": [ ],
- "owned_by": {
- "id": 13214349,
- "name": "yfytest01",
- "login": "venus@venus.fangcloud.com",
- "enterprise_id": 431512
}, - "sequence_id": 0,
- "file_version_key": "5020b40d88f733a976478a4d9e2f914f",
- "permissions": [
- "item_upload",
- "item_download",
- "item_create_comment",
- "item_own",
- "item_preview",
- "item_view",
- "item_share",
- "edit_properties",
- "item_create_collab",
- "item_restore",
- "permanent_delete",
- "item_edit_collab",
- "item_delete"
], - "in_trash": false,
- "is_deleted": false,
- "is_frequently_used": true
}
], - "total_count": 2
}{- "created_at": 1496992074,
- "children_departments_count": 1,
- "director": {
- "id": 881525,
- "name": "xxx",
- "login": "autov2@test.com",
- "enterprise_id": 12401
}, - "direct_item_count": 1,
- "id": 65820,
- "name": "xxx",
- "user_count": 4,
- "parent_id": 0,
- "order": 1
}需要使用用户token,根据用户id生成,详情参考上面生成的token文档
| id required | integer <int64> 群组id |
| query_words | string 查询关键字 |
| page_id | integer <int32> >= 0 页码 |
{- "users": [
- {
- "user_group": "admin",
- "email": "xxx@test.com",
- "phone": "12312312312",
- "space_total": 2199023255552,
- "space_used": 0,
- "profile_pic_key": "ee1bacaffb0128a26b51afaf17126a8b",
- "is_active": true,
- "is_phone_public": true,
- "full_name_pinyin": "xxx",
- "id": 881525,
- "name": "xxx",
- "login": "xxx@test.com",
- "enterprise_id": 12401
}, - {
- "user_group": "user",
- "email": "xxx@test.com",
- "phone": "12312312312",
- "space_total": 5368709120,
- "space_used": 8745602,
- "profile_pic_key": "",
- "is_active": true,
- "is_phone_public": true,
- "full_name_pinyin": "xxx",
- "id": 881533,
- "name": "xxx",
- "login": "xxx@test.com",
- "enterprise_id": 12401
}, - {
- "user_group": "user",
- "email": "xxx@test.com",
- "phone": "",
- "space_total": 2199023255552,
- "space_used": 0,
- "profile_pic_key": "",
- "is_active": true,
- "is_phone_public": true,
- "full_name_pinyin": "xxx",
- "id": 881572,
- "name": "xxx",
- "login": "xxx@test.com",
- "enterprise_id": 12401
}, - {
- "user_group": "user",
- "email": "xxx@test.com",
- "phone": "12312312312",
- "space_total": 2199023255552,
- "space_used": 2869229,
- "profile_pic_key": "0cb601c50ed619267bb791cfe2a60ade",
- "is_active": true,
- "is_phone_public": true,
- "full_name_pinyin": "xxx",
- "id": 881526,
- "name": "xxx",
- "login": "autov22@test.com",
- "enterprise_id": 12401
}
], - "total_count": 4,
- "page_id": 0,
- "page_capacity": 500,
- "page_count": 1
}需要使用用户token,根据用户id生成,详情参考上面生成的token文档
| query_words required | string 搜索关键词,不能为空 |
| type | string 搜索类型,分为file,folder,all三种,默认为all |
| sort_by | string 排序方式,分为’name’, ‘date’, ‘size’, ‘score’ |
| sort_direction | string 排序顺序,分为’desc’, ‘asc’ |
| page_id | integer <int32> 第几页,每页默认20,默认为第0页 |
| search_in_folder | integer <int64> 指定父文件夹,匹配的结果都是该文件夹的子文件或子文件夹 |
| fields | integer <int64> 是否展示文件权限,需要展示填写perssion,不需要则不填写 |
| query_filter | string 搜索过滤类型,分为file_name,content,creator, tag, all五种,默认为all |
| updated_time_range | string 指定更新时间范围搜索,格式为开始和结束时间戳,并以逗号分隔(如:‘1509954358,1509954360’),两个时间戳均可以不传,为空就表示不对开始或结束时间进行限制,但是逗号必须传(如:’,1509954360’ 或 ‘1509954358,’ 或 ‘,’) |
| department_id | string 根据存储空间 0 人个空间, -1 与我协作 111 部门id 搜索 |
| precise_search | boolean 是否精确搜索 |
{- "files": [
- {
- "sha1": "1f5243f2ba7872206aef7197ea92762eddf47555",
- "comments_count": 0,
- "extension_category": "document",
- "type": "file",
- "id": 3990312,
- "name": "新建 Microsoft Word 文档.doc",
- "size": 26112,
- "created_at": 1461919867,
- "modified_at": 1461919868,
- "modified_by": {
- "id": 468,
- "name": "tt2",
- "login": "tt@t.com",
- "enterprise_id": 1
}, - "description": "",
- "path": [
- {
- "type": "folder",
- "id": 0,
- "name": "全部文件"
}
], - "owned_by": {
- "id": 468,
- "name": "tt2",
- "login": "tt@t.com",
- "enterprise_id": 1
}, - "sequence_id": 0
}, - {
- "sha1": "8cfed9a789a37cc8f195510ca34bd1c2800ea2a6",
- "comments_count": 0,
- "extension_category": "document",
- "type": "file",
- "id": 3990314,
- "name": "12.xls",
- "size": 23040,
- "created_at": 1461919873,
- "modified_at": 1462783210,
- "modified_by": {
- "id": 468,
- "name": "tt2",
- "login": "tt@t.com",
- "enterprise_id": 1
}, - "description": "",
- "path": [
- {
- "type": "folder",
- "id": 0,
- "name": "全部文件"
}
], - "owned_by": {
- "id": 468,
- "name": "tt2",
- "login": "tt@t.com",
- "enterprise_id": 1
}, - "sequence_id": 3
}
], - "folders": [ ],
- "total_count": 2,
- "page_id": 0,
- "page_capacity": 20,
- "page_count": 1
}默认请求地址:https://open.fangcloud.com/api/v2/knowledge/chatStream
私有化部署请求地址:云盘域名/platform/api/v2/knowledge/chatStream
请求参数说明
| 参数字段 | 字段类型 | 是否必须 | 字段说明 |
|---|---|---|---|
| messages | List[Dict] | 是 | 包含迄今为止对话消息列表,这是一个结构体的列表,每个元素类似如下:{"role": "user", "content": "你好"} role 只支持 user , assistant 其一,content 不得为空,user 为用户角色,assistant 为知识库角色 |
| chatType | string | 是 | 对话类型,固定填:AI_LIBRARY |
| sessionId | string | 否 | 会话id,首次对话不需要传,结果会返回,后续对话需要传返回的值 |
| search | string | 是 | 是否开启联网搜索 |
| gptType | string | 是 | 模型类型 |
| libraryIds | list |
是 | 知识库id列表 |
请求示例
{
"chatType": "AI_LIBRARY",
"messages": [
{
"role": "user",
"content": "你是谁"
}
],
"search": false,
"gptType": "deepseek",
"libraryIds": [
"63df81213d4bb9c55d3d9dac51dbe8d9"
],
"sessionId": "531_1757403170386_490"
}
返回字段说明
stream 格式返回:
content字段是AI回答的文本内容
返回示例
data:{"choices":[{"delta":{"content":" // 包含了JWT令牌","role":"assistant"},"finishReason":"null","index":0,"message":{"content":" // 包含了JWT令牌","role":"assistant"}}],"created":0,"object":""}
data:{"choices":[{"delta":{"content":"的构建逻辑和网络请求实现\n","role":"assistant"},"finishReason":"null","index":0,"message":{"content":"的构建逻辑和网络请求实现\n","role":"assistant"}}],"created":0,"object":""}
完整示例
知识库对话:
curl --location 'https://open.fangcloud.com/api/v2/knowledge/chatStream' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer de74b292-3dbf-446a-9d30-c0e89106a682' \
--data '{
"chatType": "AI_LIBRARY",
"messages": [
{
"role": "user",
"content": "你是谁"
}
],
"search": false,
"gptType": "deepseek",
"libraryIds": [
"63df81213d4bb9c55d3d9dac51dbe8d9"
],
"sessionId": "531_1757403170386_490"
}'
需要使用用户token,根据用户id生成,详情参考上面生成的token文档
创建知识目录相关参数
| library_id required | string (知识库id) |
| parent_document_id required | string (上级知识目录id,若为根目录则传:0) |
| name required | string (知识目录名称) |
| user_ids | Array of integers <int64> (用户id列表,若传该值,只对部分人可见,若不传所有人可见) [ items <int64 > ] |
{- "creator_id": 777910,
- "id": "1142496081205002243",
- "parent_document_id": "0",
- "library_id": "1ed323368408a980993abb469e730473",
- "name": "知识目录1",
- "success": true
}需要使用用户token,根据用户id生成,详情参考上面生成的token文档
创建知识库列表相关参数
| name required | string (知识库名称) |
| pic_file_id required | string (知识库图标地址,可填默认值:https://s0.ssl.qhres2.com/static/a3e6a8389f34868e.svg) |
| content required | string (知识库简介) |
| questions required | Array of strings (知识库推荐问题) |
{- "real_library_id": 2368,
- "library_id": "e984f2dea955253d71d265dc7be539a8",
- "name": "创建知识库",
- "content": "知识库简介",
- "display_type": 2,
- "questions": [
- "问题一",
- "问题二"
], - "creator_id": 777910,
- "success": true
}需要使用用户token,根据用户id生成,详情参考上面生成的token文档
请求示例:
curl --location --request POST 'https://open.fangcloud.com/api/v2/kbase/get_book_segment_list' \
--header 'Authorization: Bearer 583fad43-3265-45df-9e13-91fa5a22a2ca' \
--header 'Content-Type: application/json' \
--data '{
"page_no": 1
"page_size": 10
"library_id": "21b9c123e95200691bd6d4a73a9994f"
"book_id": "11711877123888819810"
}'
查询知识库文件训练片段相关参数
| book_id required | string (知识库文件id) |
| library_id required | string (知识库id) |
| page_size required | integer <int64> (页容量) >= 1 |
| page_no required | integer <int64> (页码) >= 1 |
{- "total": 1,
- "segment_list": [
- {
- "content": "\n**这是第0级标题:第一节 重要提示下的内容:**\n1 本年度报告摘要来自年度报告全文,为全面了解本公司的经营成果、财务状况及未来发展规划,投资者应当到www.sse.com.cn 网站仔细阅读年度报告全文。\n**这是第0级标题:2 重大风险提示 下的内容:**\n本公司已在年度报告中详细阐述在生产经营过程中可能面临的相关风险,详情请查阅年度报告第三节、四、“风险因素”部分的相关内容。公司提请投资者特别关注如下风险: \n\n报告期内,受医药行业投融资放缓的影响,市场需求发生较大变化,产能出现阶段性过剩,行业竞争加剧,由于订单价格下降,部分订单延迟执行,公司出现亏损。公司的主营业务、核心竞争力、主要财务指标未发生重大不利变化,与行业趋势基本一致。公司业务完整,具有直接面向市场独立持续经营的能力,在持续经营能力方面不存在重大风险。得益于医药行业的刚需属性、国家鼓励创新药研发的大环境以及各种配套制度和支持政策的出台,公司所处行业长期向好的趋势不变,不存在持续衰退或技术替代等情形。公司将积极通过开发新客户、完善创新药研发平台、降本增效等方式提升自身竞争力和盈利能力,最大限度降低可能受到的国内外宏观经济环境、产业政策、行业竞争格局变化等诸多外部因素对经营业绩的不利影响,提升公司盈利能力。 \n\n3 本公司董事会、监事会及董事、监事、高级管理人员保证年度报告内容的真实性、准确性、\n\n完整性,不存在虚假记载、误导性陈述或重大遗漏,并承担个别和连带的法律责任。",
- "extension": "xlsx",
- "file_content_size": 634,
- "file_id": "147368",
- "file_type": "library_book",
- "id": "176293769714736804590"
}
], - "success": true
}需要使用用户token,根据用户id生成,详情参考上面生成的token文档
请求示例:
curl --location --request POST 'https://open.fangcloud.com/api/v2/kbase/get_train_file_status' \
--header 'Authorization: Bearer 583fad43-3265-45df-9e13-91fa5a22a2ca' \
--header 'Content-Type: application/json' \
--data '{
"train_file_ids": [123]
}'
查询训练文件训练状态相关参数
| train_file_ids required | Array of integers <int64> (训练文件id列表) [ items <int64 > ] |
{- "train_file_status_list": [
- {
- "train_file_id": 13326,
- "status": 2,
- "status_str": "成功"
}
], - "success": true
}需要使用用户token,根据用户id生成,详情参考上面生成的token文档
获取知识目录列表相关参数
| library_id required | string (知识库id) |
| document_id required | string (知识目录id,顶级目录id时候传0) |
{- "document_list": [
- {
- "creator_id": 777910,
- "id": "1142496081205002243",
- "parent_document_id": "0",
- "name": "知识目录1",
- "item_count": 0
}
], - "success": true
}需要使用用户token,根据用户id生成,详情参考上面生成的token文档
查询知识目录用户列表相关参数
| library_id required | string (知识库id) |
| document_id required | string (知识目录id) |
{- "document_user_list": [
- {
- "id": 123,
- "name": "图灵灵",
- "user_id": 123,
- "library_id": "96e08eafd5b9609bd14b6d2e5c6d3ab9",
- "role_id": "f217474860bc453a537e3945a4baf664",
- "enterprise_id": 11012
}, - {
- "id": 4673,
- "name": "慈大改版6169611呢很长啊啊啊啊啊啊啊啊啊啊啊啊啊",
- "user_id": 777923,
- "library_id": "96e08eafd5b9609bd14b6d2e5c6d3ab9",
- "role_id": "f217474860bc453a537e3945a4baf664",
- "enterprise_id": 11012
}
], - "success": true
}需要使用用户token,根据用户id生成,详情参考上面生成的token文档
获取知识库列表相关参数
| page_number required | integer <int64> (查询页数) |
| page_size | integer <int64> (页容量,不传默认25) |
| search_name | string (知识库名称) |
{- "library_list": [
- {
- "library_real_id": 993,
- "name": "建筑行业知识库",
- "content": "建筑行业相关知识库",
- "knowledge_data_id": 829,
- "library_id": "96e08eafd5b9609bd14b6d2e5c6d3ab9",
- "questions": [
- "年暑假教职工班车停课期间时刻表?",
- "年暑假教职工班车周末时刻表?",
- "年暑假教职工班车恢复正常时间?"
], - "updated": 1755170786,
- "type": 1
}
], - "current_page": 1,
- "page_size": 15,
- "total_page": 1,
- "total_count": 1,
- "success": true
}{- "role_list": [
- {
- "role_id": "f217474860bc453a537e3945a4baf664",
- "role_name": "管理员",
- "is_admin": true
}, - {
- "role_id": "b14dd16c4e993a84586e6a3ad245c907",
- "role_name": "编辑者",
- "is_admin": false
}, - {
- "role_id": "288dfbb641d34e8c452952f6ac311f93",
- "role_name": "预览者",
- "is_admin": false
}
], - "success": true
}需要使用用户token,根据用户id生成,详情参考上面生成的token文档
获取知识库用户列表相关参数
| library_id required | string (知识库id) |
| page_num required | integer <int64> (页码) |
| page_size required | integer <int64> (页容量) |
| search_word | string (搜索词) |
{- "library_user_list": [
- {
- "id": 4593,
- "name": "图灵灵",
- "user_id": 777910,
- "library_id": "96e08eafd5b9609bd14b6d2e5c6d3ab9",
- "role_id": "f217474860bc453a537e3945a4baf664",
- "enterprise_id": 11012,
- "is_admin": true,
- "is_super_admin": true
}
], - "current_page": 1,
- "page_size": 10000,
- "total_page": 1,
- "total_count": 181,
- "success": true
}需要使用用户token,根据用户id生成,详情参考上面生成的token文档
知识库发布文件相关参数
required | Array of objects (发布文件列表) |
| library_id required | string (知识库id) |
{- "file_list": [
- {
- "id": "1142517622898688078",
- "name": "理论部分资料 (2).pdf",
- "size": 1269461,
- "extension": "pdf",
- "created": 1755597428,
- "updated": 1755597428,
- "creator_id": 777910,
- "document_id": "0",
- "library_id": "1ed323368408a980993abb469e730473",
- "enterprise_id": "11012",
}
], - "success": true
}需要使用用户token,根据用户id生成,详情参考上面生成的token文档
获取知识库文件列表相关参数
| page_number | integer <int64> (页码,默认第一页) |
| page_size | integer <int64> (容量,默认25) |
| sort_field | string (排序的字段名常量: id(编号), name(名称), created(创建时间), updated(修改时间) 默认为按照id排序) |
| document_id required | string (知识目录id) |
| library_id required | string (知识库id) |
| search_key_word | string (搜索关键字,不传则查询所有的) |
{- "file_list": [
- {
- "id": "1135589895243300952",
- "name": "【测试工程师_杭州】范文斌 5年 (1) (2).pdf",
- "size": 315761,
- "extension": "pdf",
- "created": 1753945729,
- "updated": 1753945729,
- "creator_id": 777910,
- "document_id": "0",
- "library_id": "17d586578c0d7b8b979e405e16752fa4",
- "enterprise_id": "11012",
- "summary": "范文斌,1995 年 1 月生于浙江嘉兴,现居杭州余杭。毕业于浙江树人大学电子信息技术专业。求职意向为测试工程师。他专业技能丰富,熟悉多种测试工具和技术,掌握 Python 语言实现自动化测试。有多家公司测试工作经历,参与过赣州第五大道、摇一摇赛车等多个项目,负责需求评审、用例编写、bug 跟踪、自动化脚本编写等工作。自我评价中提到自己工作认真负责、适应力强、善于沟通和分析总结,有主动学习精神。 ",
}, - {
- "id": "1129355519790678089",
- "name": "360萌新的Q&A(2)(1) (4) (1).docx",
- "size": 15943,
- "extension": "docx",
- "created": 1752459338,
- "updated": 1752459338,
- "creator_id": 777910,
- "document_id": "0",
- "library_id": "17d586578c0d7b8b979e405e16752fa4",
- "enterprise_id": "11012",
- "summary": "这是一份新员工入职须知,涵盖多方面内容。打印文件用“360 云打印”,在 503B 操作;VPN、PIN 码、域密码可在网页版 360 家重置;VPN 在推推申请审批。入职当天海英姐开通亿方云账号,签合同次日激活域账号。入职材料交清华代寄,不同时间入职五险一金缴纳情况有别。还介绍了考勤、请假、设备申请、办公用品获取等事项,以及推推下载链接等。 ",
}
], - "total": 2,
- "success": true
}需要使用用户token,根据用户id生成,详情参考上面生成的token文档
更新知识目录详情相关参数
| library_id required | string (知识库id) |
| document_id required | string (知识目录id) |
| name required | string (知识目录名称) |
| user_ids | Array of integers <int64> (用户id,若传该值,只对部分人可见,若不传所有人可见) [ items <int64 > ] |
{- "creator_id": 111,
- "id": "1145823033093521497",
- "parent_document_id": "0",
- "library_id": "96e08eafd5b9609bd14b6d2e5c6d3ab9",
- "name": "测试",
- "success": true
}知识库上传文件步骤:
一、调用知识库上传文件接口获取文件上传地址
二、调用获取到的上传文件地址,执行上传的文件流程,获取到文件详情
(header中需要传x-file-name字段:文件的名称,汉字需要urlencode),上传文件请求示例:
curl --location 'https://upload01.fangcloud.com/upload/8a6362286b2a48f7945a0ef087ebb190/c200031eac8a490011fe2a47e859fb75cf63f7e10e492eaad64e12376d39e147' \
--header 'x-file-name: active_fenci.csv' \
--header 'Content-Type: text/csv' \
--data-binary '@active_fenci.csv'
三、调用发布文件接口,发布到对应的知识库中,才能在知识库中看到文件,发布接口的入参book_id为步骤二上传文件后得到的文件id
知识库上传文件相关参数
| file_size required | integer <int64> (文件大小) |
| file_name required | string (文件名称) |
| document_id required | string (知识目录id) |
| library_id required | string (知识库id) |
{- "success": true
}需要使用用户token,根据用户id生成,详情参考上面生成的token文档
数据集召回参数
| library_ids | Array of strings (知识库id列表) |
| query required | string (问题) |
{- "train_file_info": [
- {
- "id": 1,
- "file_name": "测试1",
- "file_id": 501007356821,
- "file_type": "folder",
- "status": 1,
- "analysis_method": "direct_segment"
}, - {
- "id": 2,
- "file_name": "测试2",
- "file_id": 501007356821111,
- "file_type": "folder",
- "status": 1,
- "analysis_method": "direct_segment"
}
], - "total": 2,
- "page_size": 10,
- "page_num": 1
}需要使用用户token,根据用户id生成,详情参考上面生成的token文档
新增Ai文件信息
| data_value required | string (数据值,url地址或者云盘文件id) |
| data_type required | string (数据类型) url(类型为url时:data_value传url地址)file(类型为url时:data_value传云盘文件id) |
{- "success": true,
- "ai_file_id": 758
}AI知识库版本不支持
数据集添加训练任务信息
| data_id required | integer <int64> (数据集id) |
| analysis_method required | string (解析类型) direct_segment(通用文本类型,支持云盘文件或者文件夹,支持文件类型:docx、txt、pdf、md)qa(问答,只支持云盘文件,支持文件类型:csv、xlsx)table(表格类型,只支持云盘文件,支持文件类型:xlsx) |
| file_type required | string (文件类型) file(文件)folder(文件夹) |
| file_id required | integer <int64> (文件夹或文件夹id) |
object (训练参数(类型为direct_segment时候需要传)) |
{- "success": true
}默认请求地址:https://open.fangcloud.com/api/v2/knowledge/chatStream
私有化部署请求地址:云盘域名/platform/api/v2/knowledge/chatStream
请求参数说明
| 参数字段 | 字段类型 | 是否必须 | 字段说明 |
|---|---|---|---|
| messages | List[Dict] | 是 | 包含迄今为止对话消息列表,这是一个结构体的列表,每个元素类似如下:{"role": "user", "content": "你好"} role 只支持 user , assistant 其一,content 不得为空,user 为用户角色,assistant 为知识号角色 |
| knowledgeGptId | string | 否 | 智能体id,从智能体对话页面的url地址中获取 |
| sessionId | string | 是 | 对话标识 |
| chatType | string | 是 | 固定为:ZSH_CHAT |
请求示例
{
"messages": [
{"role": "user", "content": "如何调用开放平台?"}
],
"knowledgeGptId": "291",
"sessionId": "1721706231962_7248294",
"chatType":"ZSH_CHAT"
}
返回字段说明
stream 格式返回:
content字段是AI回答的文本内容
返回示例
data:{"choices":[{"delta":{"content":" // 包含了JWT令牌","role":"assistant"},"finishReason":"null","index":0,"message":{"content":" // 包含了JWT令牌","role":"assistant"}}],"created":0,"object":""}
data:{"choices":[{"delta":{"content":"的构建逻辑和网络请求实现\n","role":"assistant"},"finishReason":"null","index":0,"message":{"content":"的构建逻辑和网络请求实现\n","role":"assistant"}}],"created":0,"object":""}
完整示例
知识号对话:
curl --location 'https://open.fangcloud.com/api/v2/knowledge/chatStream' \
--header 'Authorization: Bearer cb806f3c-8d68-49ab-9925-4eefe3c8ec96' \
--header 'Content-Type: application/json' \
--data '{
"messages": [
{"role": "user", "content": "如何调用开放平台?"}
],
"knowledgeGptId": "321",
"sessionId": "1721706231962_7248294",
"chatType":"ZSH_CHAT"
}'
需要使用用户token,根据用户id生成,详情参考上面生成的token文档
数据集匹配测试信息
| data_id required | integer <int64> (数据集id) >= 1 |
| question required | string (问题) |
{- "match_result_list": [
- {
- "answer": "万亿大模型 VS PB级/亿级知识文档\n文档大模型能力3:Grounding(对话能力增强)\n助力大模型落地接入业务语境\n[\n]\nAI文件助手\nAI云文档\nAI知识问答\n文档大模型\n文档大模型能力3:Grounding对话能力增强\n精确定位答案来源,提升可信度\n[\n]\nAI文件助手\nAI云文档\nAI知识问答\n文档大模型\n文档云大模型和文心一言在文档处理场景的关键能力对比\n大模型技能\n测试问题\n文档云大模型\n文心一言模型\n回答包含图片\n非遗保护的基本原则有哪些?\n拒答能力\n爱奇艺是什么?\n相似问题生成\n非遗保护的工作目标(根据答案生成问题\n的相关性)\n关键词提取\n实能科技企业期化器,众创空向奖励政策。对新认定的\n国家级和省纽科技企业斯化器分别给予 200 万元、100 \n万元的奖励,对年度绩败评价优秀的国家报和省纽科技\n企业化带分别给予 100 万元,50 万元的奖励,对年居\n绩效评价结果排多前 20 位的省级以上众创空向给予 50 \n万元的奖励。",
- "file_id": 1421,
- "file_name": "360智能文档云【v1.0】产品介绍.pdf",
- "id": 171508340014212,
- "score": 1.7348562,
- "task_type": "direct_segment",
- "vector_text": "万亿大模型 VS PB级/亿级知识文档\n文档大模型能力3:Grounding(对话能力增强)\n助力大模型落地接入业务语境\n[\n]\nAI文件助手\nAI云文档\nAI知识问答\n文档大模型\n文档大模型能力3:Grounding对话能力增强\n精确定位答案来源,提升可信度\n[\n]\nAI文件助手\nAI云文档\nAI知识问答\n文档大模型\n文档云大模型和文心一言在文档处理场景的关键能力对比\n大模型技能\n测试问题\n文档云大模型\n文心一言模型\n回答包含图片\n非遗保护的基本原则有哪些?\n拒答能力\n爱奇艺是什么?\n相似问题生成\n非遗保护的工作目标(根据答案生成问题\n的相关性)\n关键词提取\n实能科技企业期化器,众创空向奖励政策。对新认定的\n国家级和省纽科技企业斯化器分别给予 200 万元、100 \n万元的奖励,对年度绩败评价优秀的国家报和省纽科技\n企业化带分别给予 100 万元,50 万元的奖励,对年居\n绩效评价结果排多前 20 位的省级以上众创空向给予 50 \n万元的奖励。"
}, - {
- "answer": "召回\n2、关联文件查看(可控制是否显示)\nAI知识问答(2)\n基于现有FAQ生成答案,优于传统FAQ客服\n[\n]\nAI文件助手\nAI云文档\nAI知识问答\n文档大模型\n识别上下文\n自动内容更新(更新附件内容即可)\n易于理解的总结性回答\n传统FAQ客服\n智能FAQ客服\nAI知识问答(3)\n[ 问答机器人支持多渠道发布,站内直接访问、站外H5/API对接\n]\nAI文件助手\nAI云文档\nAI知识问答\n文档大模型\n通过URL的方式接入到第三方应用官网\n微信公众号嵌入&朋友圈分享\n钉钉等IM集成\n官网等应用嵌入浏览器\n通过URL的方式接入到微信公众号\n通过URL的方式接入到钉钉等IM应用\nAI知识问答配置平台(1)\n满足个人和专业场景的知识问答配置\n[\n]\nAI文件助手\nAI云文档\nAI知识问答\n文档大模型\n知识号创建\n问答配置\n知识训练\n数据集管理\n匹配测试\n多渠道发布\nAI知识问答配置平台(2)\n提供极简模式,零门槛快速创建\n[\n]\nAI文件助手\nAI云文档\nAI知识问答\n文档大模型\n零学习成本\n帮助个人用户快速创\n建自己的知识问答号\n1.设置名称\n \n2.选择需要训练的文档 \n3.设置开场白及默认问题\n4.提交并完成训练\nAI知识问答配置平台(3)\n提供专业知识训练,提升回答准确度\n[\n]\nAI文件助手\nAI云文档\nAI知识问答\n文档大模型\n面向企业场景的专\n业知识训练模式,\n提升真实&复杂场\n景下的回答准确性\n提供三种文档导入及知识训练方式:\n• 文本分段:基于语境的分片方法解决传统分片引起的语义断裂问题\n• AI生成问答对:通过大模型分析文本内容,智能化生成问答对\n• 导入问答对:基于用户现有FAQ文档,快速导入训练\n通过大模型生成相似问题,提升AI回答的命中率\n问答匹配测试,持续训练调优\n",
- "file_id": 1421,
- "file_name": "360智能文档云【v1.0】产品介绍.pdf",
- "id": 171508340014217,
- "score": 1.7303435,
- "task_type": "direct_segment",
- "vector_text": "召回\n2、关联文件查看(可控制是否显示)\nAI知识问答(2)\n基于现有FAQ生成答案,优于传统FAQ客服\n[\n]\nAI文件助手\nAI云文档\nAI知识问答\n文档大模型\n识别上下文\n自动内容更新(更新附件内容即可)\n易于理解的总结性回答\n传统FAQ客服\n智能FAQ客服\nAI知识问答(3)\n[ 问答机器人支持多渠道发布,站内直接访问、站外H5/API对接\n]\nAI文件助手\nAI云文档\nAI知识问答\n文档大模型\n通过URL的方式接入到第三方应用官网\n微信公众号嵌入&朋友圈分享\n钉钉等IM集成\n官网等应用嵌入浏览器\n通过URL的方式接入到微信公众号\n通过URL的方式接入到钉钉等IM应用\nAI知识问答配置平台(1)\n满足个人和专业场景的知识问答配置\n[\n]\nAI文件助手\nAI云文档\nAI知识问答\n文档大模型\n知识号创建\n问答配置\n知识训练\n数据集管理\n匹配测试\n多渠道发布\nAI知识问答配置平台(2)\n提供极简模式,零门槛快速创建\n[\n]\nAI文件助手\nAI云文档\nAI知识问答\n文档大模型\n零学习成本\n帮助个人用户快速创\n建自己的知识问答号\n1.设置名称\n \n2.选择需要训练的文档 \n3.设置开场白及默认问题\n4.提交并完成训练\nAI知识问答配置平台(3)\n提供专业知识训练,提升回答准确度\n[\n]\nAI文件助手\nAI云文档\nAI知识问答\n文档大模型\n面向企业场景的专\n业知识训练模式,\n提升真实&复杂场\n景下的回答准确性\n提供三种文档导入及知识训练方式:\n• 文本分段:基于语境的分片方法解决传统分片引起的语义断裂问题\n• AI生成问答对:通过大模型分析文本内容,智能化生成问答对\n• 导入问答对:基于用户现有FAQ文档,快速导入训练\n通过大模型生成相似问题,提升AI回答的命中率\n问答匹配测试,持续训练调优\n"
}
], - "success": true
}需要使用用户token,根据用户id生成,详情参考上面生成的token文档
创建知识员工信息
| name required | string (知识员工名称) |
| intro | string (知识员工介绍) |
| system_prompt | string (知识员工设定(知识员工设定和数据集两项最少填一项)) |
| chat_intro | string (开场白) |
| data_ids | Array of integers <int64> (数据集id列表(知识员工设定和数据集两项最少填一项)) [ items <int64 > ] |
| no_recall_replay | string (超纲回答(数据集列表不为空有效)) |
| show_preview | boolean (不传为false(数据集列表不为空有效)) |
| show_doc_source | boolean (不传为false(数据集列表不为空有效)) |
Array of objects (默认问题) | |
| temperature | number <double> (回答风格,默认:0.6) 可选值:0.3、0.4、0.5、0.6、0.7、0.8、0.9 |
{- "id": 123
}需要使用用户token,根据用户id生成,详情参考上面生成的token文档
获取Ai文件详情信息
| ai_file_id required | integer <int64> (ai文件训练得到的数据集id) |
{- "success": true,
- "suggestion_list": [
- "今晚杭州的强对流天气具体有哪些特点?",
- "在雨天驾车出行时,有哪些安全措施需要特别注意?",
- "未来一周杭州的天气趋势是怎样的?"
], - "summary_mind_map": "由于我无法创建视觉图像,我将以Markdown格式提供文本形式的思维导图。以下是根据您提供的内容创建的思维导图:\n\n\n# 杭州交警提醒\n\n## 天气预警\n- 今晚强对流天气\n - 局部大暴雨\n - 雷雨大风\n- 白天多云到阴\n - 对出行影响不大\n- 后半夜到明天上午最强时段\n\n## 防范措施\n- 注意强对流天气防范\n- 15日天气恢复平静\n- 16日起雨水再次出现\n- 17-19日阵雨或雷雨增多\n\n## 驾车出行注意事项\n- 保证良好视线\n - 检查雨刷器\n - 除雾模式\n- 控制车速\n - 避免急刹\n- 转弯要慢\n - 避免急打方向\n- 减少超车、并线\n- 加大前后车距\n- 正确使用灯光\n- 积水路段要小心\n\n## 温馨提示\n1. 防范局地强降雨、雷雨大风\n2. 15日早晨能见度较低\n\n## 天气趋势预报\n- 14日(周日)\n - 上午阴有阵雨或雷雨\n - 下午到前半夜阴有时有阵雨或雷雨\n - 后半夜转阴到多云\n- 15日(周一)\n - 多云\n- 16日(周二)\n - 多云到阴,局部有阵雨或雷雨\n- 17日(周三)\n - 多云转阴有阵雨或雷雨\n- 18日(周四)\n - 阴有阵雨或雷雨\n- 19日(周五)\n - 阴有时有阵雨或雷雨\n\n## 发布信息\n- 杭州市气象台\n- 4月13日11时发布\n\n\n请注意,Markdown格式的思维导图在视觉上可能不如专业的思维导图软件直观,但它提供了一种结构化的方式来呈现信息。"
}需要使用用户token,根据用户id生成,详情参考上面生成的token文档
查询知识员工详情信息
| knowledge_gpt_id required | integer <int64> (知识员工id) |
{- "knowledge_gpt_id": 310,
- "base_info": {
- "name": "开放平台测试",
- "intro": "开放平台测试",
- "system_prompt": "测试",
- "chat_intro": "你好,我是开放平台使用小助手,使用开放平台的问题可以直接问题。",
- "data_ids": [
- 112
], - "no_recall_replay": "请参考开放平台在线文档地址,这里能找到你的答案:https://open.fangcloud.com",
- "show_preview": true,
- "show_doc_source": true,
- "suggested_question_complex": [
- {
- "label": "默认",
- "question": [
- "开放平台上是什么?",
- "如何使用使用开放平台?",
- "如何获取开放平台token?",
- "如何调用开放平台接口?",
- "如何上传文件?",
- "企业级token和个人级token的区别什么?",
- "如何获取用户信息?",
- "什么情况下需要使用企业级、什么情况下需要使用个人级?以及如何",
- "有没有demo/有没有XX语言的demo?"
]
}, - {
- "label": "标签1",
- "question": [
- "12",
- "222"
]
}
], - "temperature": 0.3
}, - "share_info": {
- "status": true,
- "expiration": "2024-08-29T15:59:59.000+0000",
- "show_scope": "enterprise",
- "token": "a7xxxf3c-724e-4684-b87f-54d1cbf791cc"
}, - "square_info": {
- "publish_square_enabled": true,
- "user_ids": [ ],
- "view_scope": "selected"
}
}需要使用用户token,根据用户id生成,详情参考上面生成的token文档
数据集召回参数
| library_ids | Array of strings (知识库id列表) |
| query required | string (问题) |
{- "train_file_info": [
- {
- "id": 1,
- "file_name": "测试1",
- "file_id": 501007356821,
- "file_type": "folder",
- "status": 1,
- "analysis_method": "direct_segment"
}, - {
- "id": 2,
- "file_name": "测试2",
- "file_id": 501007356821111,
- "file_type": "folder",
- "status": 1,
- "analysis_method": "direct_segment"
}
], - "total": 2,
- "page_size": 10,
- "page_num": 1
}{- "Knowledge_gpt_list": [
- {
- "id": 321,
- "name": "123",
- "system_prompt": "123",
- "intro": "123",
- "chat_intro": "123",
- "suggested_question": [
- "今天天气怎么样!"
]
}
], - "success": true
}AI知识库版本不支持
查询数据集问答对列表信息
| data_id required | integer <int64> (数据集id) >= 1 |
| page_size required | integer <int64> (页容量) >= 1 |
| page_no required | integer <int64> (页码) >= 1 |
{- "qa_list": [
- {
- "answer": "##亿方云开放平台是基于亿方云基础业务和功能向开发者提供二次开发的服务平台,为企业提供丰富的云盘文档协同管理解决方案。企业或第三方合作伙伴可以快速低成本地接入亿方云,实现存储、查看、分享、协作等一站式文件管理。激活企业非结构数据资产价值,助你的企业更快一步。\n\n##亿方云开放平台提供UI组件、SDK、API等接入方式,10行代码助你构建企业文件统一管理平台。",
- "question": "亿方云开放平台是什么?",
- "file_id": "3264",
- "file_name": "副本知识号模版 (1) (2).csv",
- "id": "173027927232640"
}, - {
- "answer": "通过开放平台接口,可以实现用调用接口的方式实现云盘内的操作,使业务场景和云盘紧密结合,提升工作效率。",
- "question": "开放平台有什么功能?",
- "file_id": "3264",
- "file_name": "副本知识号模版 (1) (2).csv",
- "id": "173027927232641"
}
], - "total": 2,
- "success": true
}AI知识库版本不支持
查询数据集知识片段列表信息
| data_id required | integer <int64> (数据集id) >= 1 |
| page_size required | integer <int64> (页容量) >= 1 |
| page_no required | integer <int64> (页码) >= 1 |
{- "segment_list": [
- {
- "content": "高血压防治知识\n自测血压\n方法\n使用经过国际标准方案认证的上臂式家用自动电子血压计,不推荐腕式血压计、手指血压计、水银柱血压计进行家庭血压监测。",
- "extension": "docx",
- "file_content_size": 452,
- "file_id": "2773",
- "file_name": "附件3高血压防治核心信息.docx",
- "id": "172553105827730"
}
], - "total": 1,
- "success": true
}AI知识库版本不支持
查询训练任务详情列表信息
| data_id required | integer <int64> (数据集id) >= 1 |
| task_type required | string (类型) direct_segment(文件,直接分段)csv_qa_import(CSV问答导入) |
| page_size | integer <int64> (页容量,不传默认为10) >= 1 |
| page_num | integer <int64> (页码,从1开始,不传默认为1) >= 1 |
{- "train_file_info": [
- {
- "id": 1,
- "file_name": "测试1",
- "file_id": 501007356821,
- "file_type": "folder",
- "status": 1,
- "analysis_method": "direct_segment"
}, - {
- "id": 2,
- "file_name": "测试2",
- "file_id": 501007356821111,
- "file_type": "folder",
- "status": 1,
- "analysis_method": "direct_segment"
}
], - "total": 2,
- "page_size": 10,
- "page_num": 1
}需要使用用户token,根据用户id生成,详情参考上面生成的token文档
添加的审阅信息
| file_ids | Array of integers <int64> (审阅的文件id列表) [ items <int64 > ] |
| title | string (审阅标题) |
| due_time | string (过期时间(xxxx-xx-xx,例如2021-10-09)) |
| description | string (审阅描述) |
| invited_user_ids | Array of integers <int64> (被邀请审阅的人的用户id列表) [ items <int64 > ] |
{- "id": 123,
- "name": "abc"
}需要使用用户token,根据用户id生成,详情参考上面生成的token文档
| id required | integer <int64> 审阅id |
修改的审阅信息
| deleted_reviewers | Array of integers <int64> (删除审阅者) [ items <int64 > ] |
| added_reviewers | Array of integers <int64> (添加审阅者) [ items <int64 > ] |
| due_time | string (过期时间(xxxx-xx-xx,例如2021-10-09)) |
{- "id": 576197,
- "inviter": {
- "id": 13214349,
- "name": "yfytest01",
- "login": "venus@venus.fangcloud.com",
- "enterprise_id": 431512
}, - "name": "123",
- "description": "123",
- "created_at": 1625564498,
- "modified_at": 1625564500,
- "due_time": 0,
- "reviewers": [ ],
- "items": [
- {
- "extension": "docx",
- "created_at": 1625564498,
- "modified_at": 1625564498,
- "id": 203003491974,
- "name": "测试文档xxxqqq (5).docx",
- "typed_id": "file_203003491974",
- "user_id": 0,
- "size": 19111,
- "parent_folder_id": 0,
- "in_trash": false,
- "is_deleted": false
}
], - "is_complete": true,
- "need_sign": false,
- "is_expired": true
}需要使用用户token,根据用户id生成,详情参考上面生成的token文档
| id required | integer <int64> 审阅id |
| page_id required | integer <int32> 页码 |
| page_capacity required | integer <int32> 每页容量 |
{- "review": {
- "id": 576197,
- "name": "123"
}, - "review_comments": [
- {
- "id": 308712,
- "user": {
- "id": 13214349,
- "name": "xxx",
- "login": "xxxxxxx",
- "enterprise_id": 431512
}, - "content": "435345",
- "created_at": 1626078407,
- "is_voice": false,
- "voice_length": 0,
- "voice_storage_path_mp3": "",
- "voice_storage_path_ogg": ""
}
], - "review_comment_count": 1,
- "total_count": 4,
- "page_id": 0,
- "page_capacity": 1,
- "page_count": 4
}需要使用用户token,根据用户id生成,详情参考上面生成的token文档
| id required | integer <int64> 审阅id |
{- "id": 576197,
- "inviter": {
- "id": 13214349,
- "name": "yfytest01",
- "login": "venus@venus.fangcloud.com",
- "enterprise_id": 431512
}, - "name": "123",
- "description": "123",
- "created_at": 1625564498,
- "modified_at": 1625564500,
- "due_time": 0,
- "reviewers": [ ],
- "items": [
- {
- "extension": "docx",
- "created_at": 1625564498,
- "modified_at": 1625564498,
- "id": 203003491974,
- "name": "测试文档xxxqqq (5).docx",
- "typed_id": "file_203003491974",
- "user_id": 0,
- "size": 19111,
- "parent_folder_id": 0,
- "in_trash": false,
- "is_deleted": false
}
], - "is_complete": true,
- "need_sign": false,
- "is_expired": true
}需要使用用户token,根据用户id生成,详情参考上面生成的token文档
添加的审阅评论信息
| content required | string (审阅评论内容) |
| review_id | integer <int64> (审阅id) |
{- "success": true,
- "id": 0,
- "content": "string",
- "review": {
- "id": 0,
- "name": "string"
}, - "created_at": 0,
- "is_voice": true,
- "voice_length": 0,
- "voice_storage_path_mp3": "string",
- "password_protected": "string",
- "user": {
- "id": 0,
- "name": "string",
- "login": "string",
- "enterprise_id": 0,
- "miniDepartmentList": [
- {
- "id": 0,
- "name": "string",
- "director": { },
- "user_count": 0,
- "children_departments_count": 0,
- "direct_item_count": 0,
- "order": 0,
- "level": 0,
- "parentDepartments": [
- { }
]
}
]
}
}需要使用用户token,根据用户id生成,详情参考上面生成的token文档
| tag_name required | string 标签名称 |
| sort_by required | string Example: sort_by=name, date, size 排序方式 |
| sort_direction required | string Example: sort_direction=desc, asc 排序顺序 |
| page_id required | integer <int32> 页码,从1开始 |
{- "files": [
- {
- "sha1": "1f5243f2ba7872206aef7197ea92762eddf47555",
- "comments_count": 0,
- "extension_category": "document",
- "type": "file",
- "id": 3990312,
- "name": "新建 Microsoft Word 文档.doc",
- "size": 26112,
- "created_at": 1461919867,
- "modified_at": 1461919868,
- "modified_by": {
- "id": 468,
- "name": "tt2",
- "login": "tt@t.com",
- "enterprise_id": 1
}, - "description": "",
- "path": [
- {
- "type": "folder",
- "id": 0,
- "name": "全部文件"
}
], - "owned_by": {
- "id": 468,
- "name": "tt2",
- "login": "tt@t.com",
- "enterprise_id": 1
}, - "sequence_id": 0
}, - {
- "sha1": "8cfed9a789a37cc8f195510ca34bd1c2800ea2a6",
- "comments_count": 0,
- "extension_category": "document",
- "type": "file",
- "id": 3990314,
- "name": "12.xls",
- "size": 23040,
- "created_at": 1461919873,
- "modified_at": 1462783210,
- "modified_by": {
- "id": 468,
- "name": "tt2",
- "login": "tt@t.com",
- "enterprise_id": 1
}, - "description": "",
- "path": [
- {
- "type": "folder",
- "id": 0,
- "name": "全部文件"
}
], - "owned_by": {
- "id": 468,
- "name": "tt2",
- "login": "tt@t.com",
- "enterprise_id": 1
}, - "sequence_id": 3
}
], - "folders": [ ],
- "total_count": 2,
- "page_id": 0,
- "page_capacity": 20,
- "page_count": 1
}需要使用用户token,根据用户id生成,详情参考上面生成的token文档
需要添加的标签和项目信息
| type required | string (项目类型) file:文件类型; folder:文件夹类型 |
| id required | string (项目id) 文件或者文件夹id |
| names | Array of strings (标签名称列表) |
Array of objects (TagCategory) |
{- "success": true,
- "tags": [
- {
- "id": 2278,
- "name": "明天"
}, - {
- "id": 2279,
- "name": "天气"
}
]
}需要使用用户token,根据用户id生成,详情参考上面生成的token文档
需要移除的标签和项目信息
| type required | string (项目类型) file:文件类型; folder:文件夹类型 |
| id required | string (项目id) 文件或者文件夹id |
| tag_ids required | Array of integers <int64> (标签id列表) [ items <int64 > ] |
{- "success": true
}需要使用用户token,根据用户id生成,详情参考上面生成的token文档
| type | string 搜索类型,可选值: file, folder, all |
| sort_by | string 排序方式,可选值: name, date, size, score |
| sort_direction | string 排序顺序,可选值: desc, asc |
| page_id | integer <int32> >= 0 页码 |
| page_capacity | integer <int32> >= 1 Default: 20 每页容量 |
{- "files": [
- {
- "sha1": "1f5243f2ba7872206aef7197ea92762eddf47555",
- "comments_count": 0,
- "extension_category": "document",
- "type": "file",
- "id": 3990312,
- "name": "新建 Microsoft Word 文档.doc",
- "size": 26112,
- "created_at": 1461919867,
- "modified_at": 1461919868,
- "modified_by": {
- "id": 468,
- "name": "tt2",
- "login": "tt@t.com",
- "enterprise_id": 1
}, - "description": "",
- "path": [
- {
- "type": "folder",
- "id": 0,
- "name": "全部文件"
}
], - "owned_by": {
- "id": 468,
- "name": "tt2",
- "login": "tt@t.com",
- "enterprise_id": 1
}, - "sequence_id": 0
}, - {
- "sha1": "8cfed9a789a37cc8f195510ca34bd1c2800ea2a6",
- "comments_count": 0,
- "extension_category": "document",
- "type": "file",
- "id": 3990314,
- "name": "12.xls",
- "size": 23040,
- "created_at": 1461919873,
- "modified_at": 1462783210,
- "modified_by": {
- "id": 468,
- "name": "tt2",
- "login": "tt@t.com",
- "enterprise_id": 1
}, - "description": "",
- "path": [
- {
- "type": "folder",
- "id": 0,
- "name": "全部文件"
}
], - "owned_by": {
- "id": 468,
- "name": "tt2",
- "login": "tt@t.com",
- "enterprise_id": 1
}, - "sequence_id": 3
}
], - "folders": [ ],
- "total_count": 2,
- "page_id": 0,
- "page_capacity": 20,
- "page_count": 1
}{- "id": 449,
- "enterprise": {
- "id": 1,
- "name": "测试企业",
- "admin_user_id": 111
}, - "name": "qyang1",
- "phone": "15088679770",
- "email": "qyang1@admin.com",
- "login": "qyang1@admin.com",
- "profile_pic_key": "f2b7154b8fa0500004fa0cde46e5e214",
- "active": true,
- "full_name_pinyin": "qyang1",
- "pinyin_first_letters": "qyang1"
}{- "departments": [
- {
- "id": 70419,
- "name": "222",
- "director": {
- "id": 881525,
- "name": "隔壁老王",
- "login": "autov2@test.com",
- "enterprise_id": 12401
}, - "user_count": 3,
- "children_departments_count": 0,
- "direct_item_count": 6
}, - {
- "id": 69938,
- "name": "autotest_Dvk_1516903746",
- "director": {
- "id": 881525,
- "name": "隔壁老王",
- "login": "autov2@test.com",
- "enterprise_id": 12401
}, - "user_count": 4,
- "children_departments_count": 2,
- "direct_item_count": 23
}
]
}需要使用用户token,根据用户id生成,详情参考上面生成的token文档
| id required | integer <int64> 用户id |
{- "id": 449,
- "enterprise": {
- "id": 1,
- "name": "测试企业",
- "admin_user_id": 111
}, - "name": "qyang1",
- "phone": "15088679770",
- "email": "qyang1@admin.com",
- "login": "qyang1@admin.com",
- "profile_pic_key": "f2b7154b8fa0500004fa0cde46e5e214",
- "active": true,
- "full_name_pinyin": "qyang1",
- "pinyin_first_letters": "qyang1"
}需要使用用户token,根据用户id生成,详情参考上面生成的token文档
| query_words | string 搜索关键字,默认企业所有用户 |
| page_id | integer <int32> >= 0 页码,默认为0 |
{- "users": [
- {
- "user_group": "admin",
- "email": "xxx@test.com",
- "phone": "12312312312",
- "space_total": 2199023255552,
- "space_used": 0,
- "profile_pic_key": "ee1bacaffb0128a26b51afaf17126a8b",
- "is_active": true,
- "is_phone_public": true,
- "full_name_pinyin": "xxx",
- "id": 881525,
- "name": "xxx",
- "login": "xxx@test.com",
- "enterprise_id": 12401
}, - {
- "user_group": "user",
- "email": "xxx@test.com",
- "phone": "12312312312",
- "space_total": 5368709120,
- "space_used": 8745602,
- "profile_pic_key": "",
- "is_active": true,
- "is_phone_public": true,
- "full_name_pinyin": "xxx",
- "id": 881533,
- "name": "xxx",
- "login": "xxx@test.com",
- "enterprise_id": 12401
}, - {
- "user_group": "user",
- "email": "xxx@test.com",
- "phone": "",
- "space_total": 2199023255552,
- "space_used": 0,
- "profile_pic_key": "",
- "is_active": true,
- "is_phone_public": true,
- "full_name_pinyin": "xxx",
- "id": 881572,
- "name": "xxx",
- "login": "xxx@test.com",
- "enterprise_id": 12401
}, - {
- "user_group": "user",
- "email": "xxx@test.com",
- "phone": "12312312312",
- "space_total": 2199023255552,
- "space_used": 2869229,
- "profile_pic_key": "0cb601c50ed619267bb791cfe2a60ade",
- "is_active": true,
- "is_phone_public": true,
- "full_name_pinyin": "xxx",
- "id": 881526,
- "name": "xxx",
- "login": "autov22@test.com",
- "enterprise_id": 12401
}
], - "total_count": 4,
- "page_id": 0,
- "page_capacity": 500,
- "page_count": 1
}需要使用用户token,根据用户id生成,详情参考上面生成的token文档
用户更新的信息
| name required | string (新名字,长度不能超过30个字符) |
{- "id": 449,
- "enterprise": {
- "id": 1,
- "name": "测试企业",
- "admin_user_id": 111
}, - "name": "qyang1",
- "phone": "15088679770",
- "email": "qyang1@admin.com",
- "login": "qyang1@admin.com",
- "profile_pic_key": "f2b7154b8fa0500004fa0cde46e5e214",
- "active": true,
- "full_name_pinyin": "qyang1",
- "pinyin_first_letters": "qyang1"
}需要使用企业token,根据企业id生成,详情参考上面生成的token文档
新部门的相关信息
| name required | string (部门名称,长度不能超过30个字符) |
| parent_id required | integer <int64> (父部门id) |
| director_id | integer <int64> (部门管理员id) >= 1 |
Array of objects (特殊成员信息) | |
| space_total | integer <int64> (总共空间,单位为GB,默认为20) >= 1 |
| hide_phone | boolean (是否隐藏部门成员手机号,默认和上级部门保持一致) |
| disable_share | boolean (是否禁用分享,默认和上级部门保持一致) |
| enable_watermark | boolean (是否开启水印预览,默认和上级部门保持一致) |
| create_common_folder | boolean (是否建立公共资料库,默认false) |
| collab_auto_accepted | boolean (是否自动接受协作邀请,默认false) |
{- "director": {
- "id": 881525,
- "name": "xxx",
- "login": "xxx@test.com"
}, - "space_used": 79152336,
- "space_total": 21474836480,
- "special_users": [ ],
- "hide_phone": false,
- "disable_share": false,
- "enable_watermark": false,
- "collab_auto_accepted": false,
- "id": 65820,
- "name": "亿方云测试",
- "parent_id": 0,
- "order": 1
}需要使用企业token,根据企业id生成,详情参考上面生成的token文档
| platform_id required | integer <int64> 平台id,私有部署一般默认为:2 |
客户部门id列表
{- "department_file_manager_info_list": [
- {
- "department_id": 123,
- "custom_department_id": 123,
- "customUser_list": [
- {
- "id": 123,
- "name": "xxx",
- "custom_id": "123",
- "email": "123@abc.cn",
- "phone": "",
- "department_ids": [
- {
- "department_id": 123,
- "custom_department_id": "123",
- "name": "xxx"
}
]
}
]
}
]
}需要使用企业token,根据企业id生成,详情参考上面生成的token文档
| id required | integer <int64> 部门id |
{- "director": {
- "id": 881525,
- "name": "xxx",
- "login": "xxx@test.com"
}, - "space_used": 79152336,
- "space_total": 21474836480,
- "special_users": [ ],
- "hide_phone": false,
- "disable_share": false,
- "enable_watermark": false,
- "collab_auto_accepted": false,
- "id": 65820,
- "name": "亿方云测试",
- "parent_id": 0,
- "order": 1
}需要使用企业token,根据企业id生成,详情参考上面生成的token文档
| id required | integer <int64> 部门id |
部门的相关信息
| name required | string (部门名称,长度不能超过30个字符) |
| parent_id | integer <int64> (父部门id) >= 0 |
| director_id | integer <int64> (部门管理员id) >= -1 |
Array of objects (特殊成员信息) | |
| space_total | integer <int64> (总共空间,单位为GB,默认为20) >= 1 |
| hide_phone | boolean (是否隐藏部门成员手机号,默认和上级部门保持一致) |
| disable_share | boolean (是否禁用分享,默认和上级部门保持一致) |
| enable_watermark | boolean (是否开启水印预览,默认和上级部门保持一致) |
| collab_auto_accepted | boolean (是否自动接受协作邀请,默认false) |
| file_managers | Array of integers <int64> (文件管理员id列表) [ items <int64 > ] |
| permission_type | string (部门权限) |
{- "director": {
- "id": 881525,
- "name": "xxx",
- "login": "xxx@test.com"
}, - "space_used": 79152336,
- "space_total": 21474836480,
- "special_users": [ ],
- "hide_phone": false,
- "disable_share": false,
- "enable_watermark": false,
- "collab_auto_accepted": false,
- "id": 65820,
- "name": "亿方云测试",
- "parent_id": 0,
- "order": 1
}需要使用企业token,根据企业id生成,详情参考上面生成的token文档
| id required | integer <int64> 部门id |
部门的相关信息
| operatorId | integer <int64> (操作者id) >= 0 |
| spaceTotal | integer <int64> (部门总空间) >= 1 |
{- "department": {
- "id": 1,
- "name": "xxx",
- "space_used": 0,
- "space_total": 0
}
}需要使用企业token,根据企业id生成,详情参考上面生成的token文档
| id required | integer <int64> 部门ID |
| query_words | string 查询关键字 |
| page_id | integer <int32> >= 0 页码 |
{- "users": [
- {
- "user_group": "admin",
- "email": "xxx@test.com",
- "phone": "12312312312",
- "space_total": 2199023255552,
- "space_used": 0,
- "profile_pic_key": "ee1bacaffb0128a26b51afaf17126a8b",
- "is_active": true,
- "is_phone_public": true,
- "full_name_pinyin": "xxx",
- "id": 881525,
- "name": "xxx",
- "login": "xxx@test.com",
- "enterprise_id": 12401
}, - {
- "user_group": "user",
- "email": "xxx@test.com",
- "phone": "12312312312",
- "space_total": 5368709120,
- "space_used": 8745602,
- "profile_pic_key": "",
- "is_active": true,
- "is_phone_public": true,
- "full_name_pinyin": "xxx",
- "id": 881533,
- "name": "xxx",
- "login": "xxx@test.com",
- "enterprise_id": 12401
}, - {
- "user_group": "user",
- "email": "xxx@test.com",
- "phone": "",
- "space_total": 2199023255552,
- "space_used": 0,
- "profile_pic_key": "",
- "is_active": true,
- "is_phone_public": true,
- "full_name_pinyin": "xxx",
- "id": 881572,
- "name": "xxx",
- "login": "xxx@test.com",
- "enterprise_id": 12401
}, - {
- "user_group": "user",
- "email": "xxx@test.com",
- "phone": "12312312312",
- "space_total": 2199023255552,
- "space_used": 2869229,
- "profile_pic_key": "0cb601c50ed619267bb791cfe2a60ade",
- "is_active": true,
- "is_phone_public": true,
- "full_name_pinyin": "xxx",
- "id": 881526,
- "name": "xxx",
- "login": "autov22@test.com",
- "enterprise_id": 12401
}
], - "total_count": 4,
- "page_id": 0,
- "page_capacity": 500,
- "page_count": 1
}需要使用企业token,根据企业id生成,详情参考上面生成的token文档
新群组的相关信息
| name required | string (群组名称,长度不能超过30个字符) |
| admin_user_id | integer <int64> (群组管理员id,默认没有) >= 1 |
| description | string (群组描述) |
| visible | boolean (是否可见,默认false) |
| collab_auto_accepted | boolean (是否自动接受协作邀请,默认false,当群组管理员为空时默认为true) |
{- "is_visible": true,
- "collab_auto_accepted": true,
- "id": 123,
- "name": "autotest_Ldm_123",
- "description": "",
- "created_at": 1513102764,
- "user_count": 0
}获取该公司的可见的群组列表
需要使用企业token,根据企业id生成,详情参考上面生成的token文档
| query_words | string 查询关键字 |
| page_id | integer <int32> >= 0 页码 |
{- "created_at": 1496992074,
- "children_departments_count": 1,
- "director": {
- "id": 881525,
- "name": "xxx",
- "login": "autov2@test.com",
- "enterprise_id": 12401
}, - "direct_item_count": 1,
- "id": 65820,
- "name": "xxx",
- "user_count": 4,
- "parent_id": 0,
- "order": 1
}需要使用企业token,根据企业id生成,详情参考上面生成的token文档
| id required | integer <int64> 群组id |
{- "is_visible": true,
- "collab_auto_accepted": true,
- "id": 123,
- "name": "autotest_Ldm_123",
- "description": "",
- "created_at": 1513102764,
- "user_count": 0
}需要使用企业token,根据企业id生成,详情参考上面生成的token文档
| id required | integer <int64> 群组id |
群组的相关信息
| name | string (群组名称,长度不能超过30个字符) |
| admin_user_id | integer <int64> (群组管理员id,默认没有) >= -1 |
| description | string (群组描述) |
| visible | boolean (是否可见,默认false) |
| collab_auto_accepted | boolean (是否自动接受协作邀请,默认false,当群组管理员为空时默认为true) |
{- "is_visible": true,
- "collab_auto_accepted": true,
- "id": 123,
- "name": "autotest_Ldm_123",
- "description": "",
- "created_at": 1513102764,
- "user_count": 0
}需要使用企业token,根据企业id生成,详情参考上面生成的token文档
| id required | integer <int64> 群组id |
| query_words | string 查询关键字 |
| page_id | integer <int32> >= 0 页码 |
{- "users": [
- {
- "user_group": "admin",
- "email": "xxx@test.com",
- "phone": "12312312312",
- "space_total": 2199023255552,
- "space_used": 0,
- "profile_pic_key": "ee1bacaffb0128a26b51afaf17126a8b",
- "is_active": true,
- "is_phone_public": true,
- "full_name_pinyin": "xxx",
- "id": 881525,
- "name": "xxx",
- "login": "xxx@test.com",
- "enterprise_id": 12401
}, - {
- "user_group": "user",
- "email": "xxx@test.com",
- "phone": "12312312312",
- "space_total": 5368709120,
- "space_used": 8745602,
- "profile_pic_key": "",
- "is_active": true,
- "is_phone_public": true,
- "full_name_pinyin": "xxx",
- "id": 881533,
- "name": "xxx",
- "login": "xxx@test.com",
- "enterprise_id": 12401
}, - {
- "user_group": "user",
- "email": "xxx@test.com",
- "phone": "",
- "space_total": 2199023255552,
- "space_used": 0,
- "profile_pic_key": "",
- "is_active": true,
- "is_phone_public": true,
- "full_name_pinyin": "xxx",
- "id": 881572,
- "name": "xxx",
- "login": "xxx@test.com",
- "enterprise_id": 12401
}, - {
- "user_group": "user",
- "email": "xxx@test.com",
- "phone": "12312312312",
- "space_total": 2199023255552,
- "space_used": 2869229,
- "profile_pic_key": "0cb601c50ed619267bb791cfe2a60ade",
- "is_active": true,
- "is_phone_public": true,
- "full_name_pinyin": "xxx",
- "id": 881526,
- "name": "xxx",
- "login": "autov22@test.com",
- "enterprise_id": 12401
}
], - "total_count": 4,
- "page_id": 0,
- "page_capacity": 500,
- "page_count": 1
}需要使用企业token,根据企业id生成,详情参考上面生成的token文档
操作类型信息
| action_types | Array of integers <int64> (日志操作类型) [ items <int64 > ] |
| is_all | boolean |
{- "action_types": {
- "1": "登录成功",
- "2": "登出",
- "3": "登录失败",
- "4": "修改密码",
- "5": "发起重置密码",
- "6": "重置密码",
- "7": "使用新设备登录",
- "8": "使用被删除过的设备登录",
- "9": "使用6个月没有访问记录的设备登录",
- "10": "邀请成员",
- "11": "删除成员",
- "12": "设置员工存储空间",
- "13": "用户注册",
- "14": "用户激活",
- "16": "用户注册",
- "17": "通过邮箱验证",
- "18": "个人账号加入企业",
- "19": "用户注册",
- "20": "移交管理员",
- "21": "设置员工权限",
- "22": "通过邀请链接注册",
- "23": "创建邀请链接",
- "24": "更新邀请链接",
- "25": "删除邀请链接",
- "26": "删除外部协作者",
- "27": "添加了联合管理员",
- "28": "编辑了联合管理员",
- "29": "删除了联合管理员",
- "30": "修改姓名",
- "31": "验证绑定邮箱",
- "32": "绑定邮箱",
- "33": "绑定并验证手机号",
- "34": "开启手机号隐藏",
- "35": "关闭手机号隐藏",
- "36": "开启二次验证",
- "37": "修改二次验证方式",
- "38": "关闭二次验证",
- "39": "协助关闭二次验证",
- "40": "删除设备登录",
- "41": "更换头像",
- "42": "修改手机号",
- "43": "设置员工所属存储",
- "44": "创建管理员",
- "45": "编辑管理员",
- "46": "删除管理员",
- "47": "开启邮箱隐藏",
- "48": "关闭邮箱隐藏",
- "100": "复制",
- "101": "移动",
- "102": "新建文件夹",
- "103": "从回收站删除",
- "104": "删除",
- "105": "从回收站恢复",
- "106": "搜索",
- "107": "下载",
- "108": "上传文件",
- "109": "重命名",
- "110": "删除历史版本",
- "111": "新建文件",
- "112": "设置当前版本",
- "113": "上传新版本",
- "114": "下载历史版本",
- "115": "添加常用",
- "116": "移出常用",
- "117": "添加标签",
- "118": "删除标签",
- "119": "修改说明",
- "120": "保存(分享转存)",
- "121": "锁定文件",
- "122": "解锁文件",
- "123": "新建部门文件夹",
- "124": "重命名部门文件夹",
- "125": "取消部门文件夹属性",
- "126": "移动到部门文件夹",
- "127": "转交文件夹所有者权限",
- "128": "开启禁用分享",
- "129": "关闭禁用分享",
- "130": "开启水印预览",
- "131": "关闭水印预览",
- "132": "订阅",
- "133": "取消订阅",
- "138": "移到隔离区",
- "139": "从隔离区恢复",
- "140": "从隔离区删除",
- "141": "从回收站部分还原",
- "142": "在线编辑文件",
- "200": "添加评论",
- "201": "删除评论",
- "202": "编辑评论",
- "300": "发起审阅",
- "301": "编辑审阅",
- "302": "结束了审阅",
- "303": "发表评论",
- "305": "创建签字审阅",
- "306": "导出了审阅",
- "307": "发起审阅",
- "308": "重新提交",
- "309": "关闭审阅",
- "310": "同意",
- "311": "拒绝",
- "312": "退回",
- "313": "编辑抄送人",
- "400": "发起分享",
- "401": "删除分享链接",
- "402": "设置分享权限",
- "403": "分享文件(夹)到",
- "405": "编辑分享设置",
- "406": "编辑分享留言",
- "407": "编辑分享版本",
- "408": "关闭分享",
- "409": "打开分享",
- "410": "添加成员",
- "411": "删除成员",
- "500": "邀请协作者",
- "501": "移出协作者",
- "502": "修改协作权限",
- "503": "公司成员加入协作",
- "504": "邀请外部协作者",
- "505": "创建协作链接",
- "506": "修改协作链接",
- "507": "删除协作链接",
- "508": "外部协作者加入协作",
- "509": "外部协作者加入协作",
- "510": "公司成员加入协作(自动接受)",
- "511": "添加协作者(系统逻辑)",
- "512": "同意部门加入协作",
- "513": "同意群组加入协作",
- "514": "同意群组加入协作(自动接受)",
- "515": "移出协作者(系统逻辑)",
- "516": "群组加入协作",
- "517": "部门加入协作",
- "518": "群组加入协作(自动接受)",
- "519": "部门加入协作(自动接受)",
- "520": "外部协作者加入协作",
- "521": "邀请外部协作者",
- "522": "外部协作者加入协作",
- "600": "预览",
- "601": "预览历史版本",
- "700": "接受群组邀请",
- "701": "拒绝群组邀请",
- "702": "新建群组",
- "703": "解散群组",
- "704": "编辑群组信息",
- "705": "添加群组成员",
- "706": "移出群组成员",
- "709": "退出群组",
- "710": "设置群组管理员",
- "711": "设置群组属性",
- "712": "自动接受群组邀请",
- "713": "取消群组管理员",
- "805": "同步文件夹",
- "806": "取消同步文件夹",
- "900": "编辑企业信息",
- "901": "设置密码安全等级",
- "902": "设置回收站保留天数",
- "903": "更换Logo",
- "904": "冻结企业",
- "905": "关闭亿方云推广Banner",
- "906": "开启亿方云推广Banner",
- "907": "设置分享页标题",
- "908": "开启企业成员二次验证",
- "909": "关闭企业成员二次验证",
- "910": "开启所有分享链接均不允许下载",
- "911": "关闭所有分享链接均不允许下载",
- "912": "开启所有分享链接均仅限公司成员访问",
- "913": "关闭所有分享链接均仅限公司成员访问",
- "914": "开启禁止下载",
- "915": "关闭禁止下载",
- "916": "开启企业成员个人存储空间",
- "917": "关闭企业成员个人存储空间",
- "918": "开启个人文件内不允许邀请协作",
- "919": "关闭个人文件内不允许邀请协作",
- "920": "开启不允许编辑者邀请协作",
- "921": "关闭不允许编辑者邀请协作",
- "922": "开启不允许共同所有者邀请协作",
- "923": "关闭不允许共同所有者邀请协作",
- "924": "设置文件页显示组织架构层数",
- "925": "选择文案模板",
- "926": "开启禁用分享",
- "927": "关闭禁用分享",
- "928": "开启水印预览",
- "929": "关闭水印预览",
- "930": "显示参与协作的部门文件夹的路径信息",
- "931": "关闭参与协作的部门文件夹的路径信息",
- "1000": "新建部门",
- "1001": "编辑部门信息",
- "1002": "新增部门主管",
- "1003": "更换部门主管",
- "1004": "删除部门",
- "1005": "移除部门成员",
- "1006": "新增部门成员",
- "1007": "新增部门成员(系统逻辑)",
- "1008": "编辑部门存储空间",
- "1009": "删除部门主管",
- "1010": "新增部门特殊成员",
- "1011": "取消部门特殊成员",
- "1012": "编辑部门所属存储",
- "1013": "移动部门",
- "1014": "新增文件管理员",
- "1015": "删除文件管理员",
- "1016": "设置根目录权限",
- "1100": "新建文件夹收集任务",
- "1101": "编辑文件夹收集任务",
- "1102": "结束文件夹收集任务",
- "1103": "贡献了子文件夹",
- "1200": "参与收集",
- "1201": "发起收集",
- "1202": "截止收集",
- "1203": "开启收集",
- "1204": "编辑收集",
- "1205": "添加成员",
- "1206": "删除成员",
- "1300": "发起全盘查毒",
- "1301": "全盘查毒完成",
- "1302": "开启自动查毒",
- "1303": "关闭自动查毒",
- "1400": "使用白名单程序打开文件",
- "1401": "使用非白名单程序打开文件被阻止",
- "1402": "阻止移动操作",
- "1403": "阻止复制操作",
- "1404": "开启文件防泄露系统",
- "1405": "关闭文件防泄露系统",
- "1406": "编辑文件防泄露系统",
- "1407": "解密文件",
- "1408": "开启文件管控",
- "1409": "关闭文件管控",
- "1410": "修改审批人",
- "1411": "设置白名单用户",
- "1412": "修改文件安全管控策略",
- "1420": "开启/关闭安全外发包",
- "1422": "编辑安全外发包默认权限",
- "1423": "创建安全外发包",
- "1500": "发起行为审批",
- "1501": "同意",
- "1502": "拒绝",
- "1503": "发表评论",
- "1504": "关闭行为审批",
- "1600": "新增文件管理员",
- "1601": "删除文件管理员",
- "1700": "开启",
- "1701": "关闭",
- "1702": "开启",
- "1703": "关闭",
- "1704": "添加",
- "1705": "编辑",
- "1706": "删除",
- "1707": "添加",
- "1708": "删除",
- "1710": "开启",
- "1711": "关闭",
- "1712": "开启",
- "1713": "关闭",
- "1714": "开启",
- "1715": "关闭",
- "1716": "开启",
- "1717": "关闭",
- "1718": "开启",
- "1719": "关闭",
- "1720": "添加",
- "1721": "编辑",
- "1722": "删除",
- "1800": "发起文件摆渡",
- "1801": "接收摆渡文件",
- "1802": "摆渡基础设置",
- "1803": "摆渡发起设置",
- "1804": "摆渡接收设置"
}
}需要使用企业token,根据企业id生成,详情参考上面生成的token文档
日志信息
| start_date required | string (起始时间,格式为:yyyy-MM-dd, 不得早于今日前90天) |
| end_date required | string (截止时间,格式为:yyyy-MM-dd, 不得迟于今日) |
| page_number | integer <int64> (页数) |
| page_size | integer <int64> (页容量) |
| action_types | Array of integers <int64> (日志类型) [ items <int64 > ] |
| file_ids | Array of integers <int64> (文件id列表) [ items <int64 > ] |
| folder_ids | Array of integers <int64> (文件夹id列表) [ items <int64 > ] |
| review_ids | Array of integers <int64> (审阅id列表) [ items <int64 > ] |
| emails | Array of strings (邮箱列表) |
| folder_collection_ids | Array of integers <int64> (文件夹手机手机列表) [ items <int64 > ] |
| department_ids | Array of integers <int64> (部门id列表) [ items <int64 > ] |
| user_ids | Array of integers <int64> (用户id列表) [ items <int64 > ] |
{- "total_count": 2,
- "user_activities": [
- {
- "created": 1541405251,
- "action_type": {
- "name": "预览",
- "id": "600"
}, - "operator": {
- "user_name": "test",
- "login": "t@test.com",
- "id": "881525"
}, - "target": {
- "target_file_name": "图片.jpeg",
- "size": "69.88KB",
- "id": "181000464235"
}, - "additional_info": {
- "preview_user": {
- "id": "1118256",
- "name": "test2",
- "login": "t2@test.com"
}
}, - "platform": {
- "service_name": "客户端: WEB",
- "ip_address": "IP:115.123.61.114(浙江 杭州)"
}
}, - {
- "created": 1541402802,
- "action_type": {
- "name": "预览",
- "id": "600"
}, - "operator": {
- "user_name": "test",
- "login": "t@test.com",
- "id": "881525"
}, - "target": {
- "target_file_name": "文档.pdf",
- "size": "43.97KB",
- "id": "181000464239"
}, - "additional_info": {
- "info": {
- "path": "个人文件/预览文件夹/"
}
}, - "platform": {
- "service_name": "客户端: WEB",
- "ip_address": "IP:115.123.61.114(浙江 杭州)"
}
}
], - "success": true
}需要使用企业token,根据企业id生成,详情参考上面生成的token文档
日志信息
| start_date required | string (起始时间,格式为:yyyy-MM-dd, 不得早于今日前90天) |
| end_date required | string (截止时间,格式为:yyyy-MM-dd, 不得迟于今日) |
| page_id | integer <int64> (页码,默认为1) |
| page_capacity | integer <int64> (页容量,默认为25,不超过500) |
{- "user_activities": [
- {
- "created": 1541405251,
- "action_type": {
- "name": "预览",
- "id": "600"
}, - "operator": {
- "user_name": "test",
- "login": "t@test.com",
- "id": "881525"
}, - "target": {
- "target_file_name": "图片.jpeg",
- "size": "69.88KB",
- "id": "181000464235"
}, - "additional_info": {
- "preview_user": {
- "id": "1118256",
- "name": "test2",
- "login": "t2@test.com"
}
}, - "platform": {
- "service_name": "客户端: WEB",
- "ip_address": "IP:115.236.61.114(浙江 杭州)"
}
}, - {
- "created": 1541402802,
- "action_type": {
- "name": "预览",
- "id": "600"
}, - "operator": {
- "user_name": "test",
- "login": "t@test.com",
- "id": "881525"
}, - "target": {
- "target_file_name": "文档.pdf",
- "size": "43.97KB",
- "id": "181000464239"
}, - "additional_info": {
- "info": {
- "path": "个人文件/预览文件夹/"
}
}, - "platform": {
- "service_name": "客户端: WEB",
- "ip_address": "IP:115.236.61.114(浙江 杭州)"
}
}
], - "success": true
}需要使用企业token,根据企业id生成,详情参考上面生成的token文档
日志信息
| date required | string (日期,格式为:yyyy-MM-dd) |
| pagination | integer <int64> (页容量) |
| page_capacity | integer <int64> (页码数) |
{- "pagination": 1,
- "user_activities": [
- {
- "created": 1541405251,
- "action_type": {
- "name": "预览",
- "id": "600"
}, - "operator": {
- "user_name": "test",
- "login": "t@test.com",
- "id": "881525"
}, - "target": {
- "target_file_name": "图片.jpeg",
- "size": "69.88KB",
- "id": "181000464235"
}, - "additional_info": {
- "preview_user": {
- "id": "1118256",
- "name": "test2",
- "login": "t2@test.com"
}
}, - "platform": {
- "service_name": "客户端: WEB",
- "ip_address": "IP:115.236.61.114(浙江 杭州)"
}
}, - {
- "created": 1541402802,
- "action_type": {
- "name": "预览",
- "id": "600"
}, - "operator": {
- "user_name": "test",
- "login": "t@test.com",
- "id": "881525"
}, - "target": {
- "target_file_name": "文档.pdf",
- "size": "43.97KB",
- "id": "181000464239"
}, - "additional_info": {
- "info": {
- "path": "个人文件/预览文件夹/"
}
}, - "platform": {
- "service_name": "客户端: WEB",
- "ip_address": "IP:115.236.61.114(浙江 杭州)"
}
}
], - "success": true
}需要使用企业token,根据企业id生成,详情参考上面生成的token文档
| id required | integer <int64> 平台id,私有部署一般默认为:2 |
| department_id required | string 部门个性化id |
| yfy_department_id required | integer <int64> 亿方云平台上的部门id |
{- "custom_id": "xxx",
- "director": {
- "id": 881525,
- "name": "xxx",
- "login": "xxx@test.com"
}, - "space_used": 79152336,
- "space_total": 21474836480,
- "special_users": [ ],
- "hide_phone": false,
- "disable_share": false,
- "enable_watermark": false,
- "collab_auto_accepted": false,
- "id": 65820,
- "name": "亿方云测试",
- "parent_id": 0,
- "order": 1
}需要使用企业token,根据企业id生成,详情参考上面生成的token文档
| id required | integer <int64> 平台id,私有部署一般默认为:2 |
| group_id required | string 群组个性化id |
| yfy_group_id required | integer <int64> 亿方云平台上的群组id |
{- "custom_id": "xxx",
- "is_visible": true,
- "collab_auto_accepted": true,
- "id": 157290,
- "name": "autotest_Ldm_1513102763",
- "description": "",
- "created_at": 1513102764,
- "user_count": 0
}需要使用企业token,根据企业id生成,详情参考上面生成的token文档
| id required | integer <int64> 平台id,私有部署一般默认为:2 |
| user_id required | string 用户个性化id,user_id和yfy_user_id两个参数二选一,若都传则使用user_id |
| yfy_user_id required | integer <int64> 亿方云平台上的用户id,user_id和yfy_user_id两个参数二选一,若都传则使用user_id |
{- "custom_id": "xxx",
- "hide_phone": false,
- "disable_download": false,
- "space_used": 14481,
- "space_total": 21474836480,
- "id": 881525,
- "name": "xxx",
- "login": "xxx@xxx.com",
- "phone": "11111111111",
- "email": "xxx@xxx.com",
- "profile_pic_key": "ee1bacaffb0128a26b51afaf17126a8b",
- "active": true,
- "full_name_pinyin": "xxx",
- "pinyin_first_letters": "xxx"
}需要使用企业token,根据企业id生成,详情参考上面生成的token文档
| id required | integer <int64> 平台id,私有部署一般默认为:2 |
部门的同步信息
required | Array of objects (同步的部门信息) |
{- "success_items_count": 1,
- "request_id": "sadasdsd-fgewrsecd-sdfsdwer-sddsf"
}需要使用企业token,根据企业id生成,详情参考上面生成的token文档
| id required | integer <int64> 平台id,私有部署一般默认为:2 |
群组的同步信息
required | Array of objects (同步的群组信息) |
{- "success_items_count": 1,
- "request_id": "sadasdsd-fgewrsecd-sdfsdwer-sddsf"
}需要使用企业token,根据企业id生成,详情参考上面生成的token文档
| id required | integer <int64> 平台id,私有部署一般默认为:2 |
用户的同步信息
required | Array of objects (同步的用户信息) |
| default_department_id | string (默认加入的部门id) |
| default_group_id | string (默认加入的群组id) |
| custom_password | string (同步用户登录account密码) |
{- "success_items_count": 1,
- "request_id": "sadasdsd-fgewrsecd-sdfsdwer-sddsf"
}需要使用企业token,根据企业id生成,详情参考上面生成的token文档
新用户的相关信息
| full_name | string (用户姓名,长度不能超过30) |
| phone | string (用户手机) |
string (用户邮箱) | |
| storage_id | integer <int64> (用户存储id,非多存储不需要关心) |
| space_total | integer <int64> (用户空间大小,-1为无限,单位为GB) |
| hide_phone | boolean (是否隐藏手机号,默认为false) |
| disable_download | boolean (是否禁用下载,默认为false) |
| force_active | boolean (是否强制激活,默认为false) |
| password | string (当force_active为true时,必须提供并且长度在6-32位之间,false时忽略该参数) |
{- "hide_phone": false,
- "disable_download": false,
- "space_used": 14481,
- "space_total": 21474836480,
- "id": 881525,
- "name": "xxx",
- "login": "xxx@xxx.com",
- "phone": "11111111111",
- "email": "xxx@xxx.com",
- "profile_pic_key": "ee1bacaffb0128a26b51afaf17126a8b",
- "active": true,
- "full_name_pinyin": "xxx",
- "pinyin_first_letters": "xxx"
}需要使用企业token,根据企业id生成,详情参考上面生成的token文档
| identifier required | string 用户标识,type为simple_phone_or_email时传手机或者邮箱,type为user_ticket时传第三方id |
| type required | string Example: type=simple_phone_or_email(手机号或者邮箱), user_ticket(第三方id) 用户标识类型 |
| platform_id required | integer <int64> >= 1 平台id,私有部署一般默认为:2 |
{- "auth_key": "ejqeobGoeT",
- "client_id": "e885b1d0-39e4-49eb-be06-16078cf3f613",
- "expires_in": 300
}需要使用企业token,根据企业id生成,详情参考上面生成的token文档
| identifier required | string 用户标识,type为simple_phone_or_email时传手机或者邮箱,type为user_ticket时传第三方id |
| type required | string Example: type=simple_phone_or_email(手机号或者邮箱), user_ticket(第三方id) 用户标识类型 |
| platform_id required | integer <int64> >= 1 平台id,私有部署一般默认为:2 |
{- "expires_in": 300
}需要使用企业token,根据企业id生成,详情参考上面生成的token文档
| identifier required | string 用户标识,type为simple_phone_or_email时传手机或者邮箱,type为user_ticket时传第三方id |
| type required | string Example: type=simple_phone_or_email(手机号或者邮箱), user_ticket(第三方id) 用户标识类型 |
| platform_id required | integer <int64> >= 1 平台id,私有部署一般默认为:2 |
{- "id": 449,
- "enterprise": {
- "id": 1,
- "name": "测试企业",
- "admin_user_id": 111
}, - "name": "qyang1",
- "phone": "15088679770",
- "email": "qyang1@admin.com",
- "login": "qyang1@admin.com",
- "profile_pic_key": "f2b7154b8fa0500004fa0cde46e5e214",
- "active": true,
- "full_name_pinyin": "qyang1",
- "pinyin_first_letters": "qyang1"
}需要使用企业token,根据企业id生成,详情参考上面生成的token文档
| id required | integer <int64> 用户id |
| last_login_flag | boolean 是否查询用户最后登录时间 |
{- "hide_phone": false,
- "disable_download": false,
- "space_used": 14481,
- "space_total": 21474836480,
- "id": 881525,
- "name": "xxx",
- "login": "xxx@xxx.com",
- "phone": "11111111111",
- "email": "xxx@xxx.com",
- "profile_pic_key": "ee1bacaffb0128a26b51afaf17126a8b",
- "active": true,
- "full_name_pinyin": "xxx",
- "pinyin_first_letters": "xxx"
}需要使用企业token,根据企业id生成,详情参考上面生成的token文档
| id required | integer <int64> 用户ID |
用户的相关信息
| name | string (用户名称,长度不能超过30个字符) |
| storage_id | integer <int64> (用户存储id,非多存储不需要关心) |
| space_total | integer <int64> (用户空间大小,-1为无限,单位为GB) |
| hide_phone | boolean (是否隐藏手机号,默认为false) |
| disable_download | boolean (是否禁用下载,默认为false) |
{- "hide_phone": false,
- "disable_download": false,
- "space_used": 14481,
- "space_total": 21474836480,
- "id": 881525,
- "name": "xxx",
- "login": "xxx@xxx.com",
- "phone": "11111111111",
- "email": "xxx@xxx.com",
- "profile_pic_key": "ee1bacaffb0128a26b51afaf17126a8b",
- "active": true,
- "full_name_pinyin": "xxx",
- "pinyin_first_letters": "xxx"
}