中育 API 整理

中育 API 整理

2023 年 1 月 24 日

警告

内容已严重过时

浅浅整理一下已知的中育 API

以下请求内容均以 C# 形式书写,实际请求时需要序列化为 JSON,有些还需要加密

云笔记

信息

云笔记的大部分 API 都对请求内容和返回值中的 data 做了 AES 加密,但是 AES 的密钥可以在某个地方找到,详见此处

警告

AES 密钥已更改。

登录 已过时

请求地址

POST http://note.func.zykj.org/api/Account/GuestLogin

请求头

Content-Type: application/json

请求内容

//请求时序列化并加密
public class LoginData
{
    public string clientCode { get; set; }
    public string password { get; set; }
    public string schoolCode { get; set; }
    public string smsVerificationCode { get; set; };
    public string userName { get; set; }
}

返回值

public class CommonResponseData
{
    public int code { get; set; }
    public string msg { get; set; }
    public string data { get; set; }
    // data项解密并反序列化后得到 UserInfo
}

public class UserInfo
{
    public string token { get; set; }
    public int userId { get; set; }
    public string realName { get; set; }
    public int roleType { get; set; }
    public string ezyServer { get; set; }
    public object mobile { get; set; }
    public object clientCode { get; set; }
    public string accessKeyId { get; set; }
    public string accessKeySecret { get; set; }
    public string securityToken { get; set; }
}

获取所有笔记 请求地址已过时

请求地址

GET http://note.func.zykj.org/api/Notes/GetAll

请求头

Authorization: bearer {UserInfo.Token}

请求内容

返回值

public class CommonResponseData
{
    public int code { get; set; }
    public string msg { get; set; }
    public string data { get; set; }
    // data项解密并反序列化后得到 GetAllNotesResponseData
}

public class GetAllNotesResponseData
{
    public int userId { get; set; }
    public string schoolCode { get; set; }
    public int totalCount { get; set; }
    public NoteInfo[] noteList { get; set; }
}

public class NoteInfo
{
    public string fileId { get; set; }
    public string fileName { get; set; }
    public string fileUrl { get; set; }
    public string parentId { get; set; }
    public int type { get; set; }
    public string createTime { get; set; }
    public string updateTime { get; set; }
    public int version { get; set; }
    public bool shared { get; set; }
}

获取 OSS 密钥 已过时

请求地址

GET http://note.func.zykj.org/api/Account/GetOssToken

请求头

Authorization: bearer {UserInfo.Token}

请求内容

返回值

public class CommonResponseData
{
    public int code { get; set; }
    public string msg { get; set; }
    public string data { get; set; }
    // data项解密并反序列化后得到 OssAccessResponseData
}

public class OssAccessResponseData
{
    public string accessKeyId { get; set; }
    public string accessKeySecret { get; set; }
    public string securityToken { get; set; }
    public string requestId { get; set; }
}

添加或更新文件 请求地址已过时(未验证)

请求地址

POST http://note.func.zykj.org/api/Notes/AddOrUpdate

请求头

Authorization: bearer {UserInfo.Token}
Content-Type: application/json

请求内容

//请求时序列化并加密
public class AddFileData
{
    public string fileId { get; set; }
    public string fileName { get; set; }
    public string fileUrl { get; set; }
    public string parentId { get; set; }
    public int type { get; set; }
}

返回值

public class MinimumResponseData
{
    public int code { get; set; }
    public string msg { get; set; }
}

删除笔记 请求地址已过时(未验证)

请求地址

POST http://note.func.zykj.org/api/Notes/Delete

请求头

Authorization: bearer {UserInfo.Token}
Content-Type: application/json

请求内容

["{NoteInfo.fileId}"]

返回值

public class MinimumResponseData
{
    public int code { get; set; }
    public string msg { get; set; }
}

在线专栏

这些 API 暂时没有加密 {:.note}


文件历史

feat: backport tags support cb2b6c5
2025 年 6 月 24 日 02:37djdjz7
refactor: redo the overall PageView structure f543612
2025 年 2 月 22 日 13:32djdjz7
chore: remove lcpu related code b5e18ec
2025 年 2 月 22 日 08:59djdjz7
theme: layout update 9984f92
2023 年 11 月 11 日 13:20djdjz7
posts update 9013843
2023 年 10 月 3 日 08:39djdjz7
update 3e02699
2023 年 10 月 2 日 09:32djdjz7
refractoring cd66e4f
2023 年 10 月 2 日 05:51djdjz7
update urls b19fa8a
2023 年 7 月 26 日 02:54djdjz7
update d29bb4e
2023 年 1 月 25 日 00:01Jason Dai
fix hyperlink ade6197
2023 年 1 月 24 日 14:07Jason Dai
更新 2023-01-24-zy-apis.md 36eb015
2023 年 1 月 24 日 03:05Jason Dai
update 2c134f3
2023 年 1 月 24 日 02:52Jason Dai
update 76e463a
2023 年 1 月 24 日 02:49Jason Dai
© 2023 - 2025
Unless otherwise stated, text contents are licensed under CC BY-NC 4.0, and codes are licensed under MIT.
Images may be subject to separate licenses, see the image captions for details if applicable.