top
关闭

开发者登录

系统字典类

主要使用场景:系统字典类

1、查询自定义学科列表

基础 需要授权

查询自定义学科列表

前置条件

获取接口访问凭证:accessToken

请求说明

url https://gateway.tianyuyun.com/user/openapi/subject/get-custom-subject?accessToken={{accessToken}}
请求方式 get
是否需要鉴权
请求数限制
接口方向 第三方应用->开放平台

参数说明

序号 字段名 约束 类型 长度 说明

1

top_org_id

必选

string

学校编号 必传

2

school_period

可选

string

学段类型 以,连接 不传查所有学段

3

page

可选

string

页码 不传默认1

4

page_size

可选

int

每页查询数量 不传默认100

返回说明

序号 字段名 约束 类型 长度 说明

1

code

必选

string

结果编码

2

message

必选

string

结果描述

3

result

必选

json

结果对象

3.1

count

必选

string

学科数量

3.2

page

必选

string

当前页码

3.3

page_size

必选

string

每页数量

3.4

list

必选

json

学科列表

3.4.1

subject_id

必选

string

学科编号

3.4.2

parent_subject_id

必选

string

父级学科(预留)

3.4.3

org_id

必选

string

学校id

3.4.4

school_period

必选

string

学段,多个逗号分隔

3.4.5

subject_name

必选

string

学科名字

3.4.6

subject_alias

必选

string

学科别名

3.4.7

subject_type

必选

string

学科类型

3.4.8

status

必选

int

状态

3.4.9

createtime

必选

int

创建时间

3.4.10

updatetime

必选

int

更新时间

示例

							请求示例
https://gateway.tianyuyun.com/user/openapi/subject/get-custom-subject?top_org_id=***&school_period=***&accessToken={{accessToken}}

返回示例
{
  "code": "000000",
  "message": "查询成功",
  "result": {
    "count": 8,
    "page": 1,
    "page_size": 3,
    "list": [
      {
        "org_id": "012b5b648d8211e9a0210200f73e4533",
        "status": 0,
        "createtime": 1583458216,
        "subject_id": "08d1d0ba5f4a11eabcce0200f7010548",
        "updatetime": 1583460162,
        "introduction": "",
        "subject_name": "自定义学科1",
        "subject_type": 2,
        "platform_code": "",
        "school_period": "0,1",
        "subject_alias": "自定义学科1",
        "parent_subject_id": ""
      },
      {
        "org_id": "012b5b648d8211e9a0210200f73e4533",
        "status": 0,
        "createtime": 1619160997,
        "subject_id": "0c89cee0a40111eb99042ad18a2581e3",
        "updatetime": 1626412070,
        "introduction": "",
        "subject_name": "理科综合",
        "subject_type": 2,
        "platform_code": "888880",
        "school_period": "1,2",
        "subject_alias": "理综",
        "parent_subject_id": ""
      },
      {
        "org_id": "012b5b648d8211e9a0210200f73e4533",
        "status": 0,
        "createtime": 1619161007,
        "subject_id": "12273720a40111eb80af2ad18a2581e3",
        "updatetime": 1626412092,
        "introduction": "",
        "subject_name": "文科综合",
        "subject_type": 2,
        "platform_code": "888880",
        "school_period": "1,2",
        "subject_alias": "文综",
        "parent_subject_id": ""
      }
    ]
  }
}
						

参数说明

请求参数消息体-文本类
序号 字段名 约束 类型 长度 说明

1

msgType

必选

String

10

消息类型,此时固定为:text

1.1

text

必选

Json

-

text消息体

1.1.1

content

必选

String

消息内容

示例

{
	"msgtype": "text",
	"text": {
		"content": "zhxy msg text test 12"
	}
}
											

参数说明

请求参数消息体-link类
序号 字段名 约束 类型 长度 说明

1

msgType

必选

String

10

消息类型,此时固定为:link

2

link

必选

Json

-

link消息体

2.1

pcUrl

必选

String

PC端消息点击链接地址

2.2

appUrl

必选

String

移动客户端点击消息时跳转到的H5地址

2.3

title

必选

String

消息标题

2.4

busiId

必选

String

对应业务的id

2.5

content

必选

String

消息描述

2.6

picUrl

必选

String

图文消息的图片链接,支持JPG、PNG格式,较好的效果为大图640*320,小图80*80。如不填,在客户端不显示图片

示例

{
	"msgtype": "link",
	"link": {
		"pcUrl": "http://www.baidu.com",
		"appUrl": "http://www.baidu.com",
		"picUrl": "http://xxx.yyy.com/zzz.jpg",
		"content": "百度一下",
		"title": "百度",
		"busiId":"AQWER1234"
	}
}
											

参数说明

请求参数消息体-oa类
序号 字段名 约束 类型 长度 说明

1

msgType

必选

String

10

消息类型,此时固定为:oa

2

busiId

必选

String

-

该条oa消息在业务系统对应的id

3

pcUrl

必选

String

消息点击链接地址

4

appUrl

必选

String

移动客户端点击消息时跳转到的H5地址

5

oa

必选

Json

-

oa类型消息体

5.1

head

必选

Json

255

消息头部Json

5.1.1

text

必选

String

255

消息的头部标题

5.1.2

bgColor

可选

String

消息头部的背景颜色。长度限制为8个英文字符,其中前2为表示透明度,后6位表示颜色值。不要添加0x。默认值:FFCC0000

5.2

body

可选

Json

消息体

5.2.1

title

可选

String

消息体的标题

5.2.2

content

可选

String

消息体的正文

5.2.3

imageUrl

可选

String

消息体中的图片url

5.2.4

fileCount

可选

String

自定义的附件数目。此数字仅供显示,不作验证

5.2.5

author

可选

String

自定义的作者名字

5.2.6

form

可选

Json数组

消息体的表单,最多6个

5.2.7

key

可选

String

消息体的关键字

5.2.8

value

可选

String

消息体的关键字对应的值