目录

订阅变更

请求

HTTP请求

POST
https://drive.cloud.hicloud.com/drive/v1/changes/subscirbe

参数

*仅对必填项做特别说明。

参数名数据类型
描述
cursorstringquery必填,当前页游标,由前一个响应的nextCursor获取。
fieldsstringquery采用[Partial-response格式]。
containers
stringquery查询范围,可选值drive和applicationData,或两者的组合,以逗号连接。默认是drive。
formstringquery媒体格式。
prettyPrintbooleanquery是否以美观格式输出。
quotaIdstringquery用户标识,小于40个字符。用于限制单个用户的API访问数量。
callbackstringqueryJSONP的callback函数。
x-hw-trace-idstringheader业务跟踪id。
x-hw-app-idstringheader应用的appid。
versionstringheadersdk版本。
x-hw-terminalstringheader终端型号。
x-hw-osstringheader终端操作系统类型。
unionIDstringheader开放的用户id。
User-Agentstringheader应用版本号/appid。

请求体

在请求正文中,提供具有以下结构的数据:

参数名参数类型描述
idstring必填,一个唯一ID,标识这个订阅通道。
userTokenstring必填,发送消息通知时,回传给业务。
typestring必填,发送机制类型,web_hook。
urlstring必填,发送通知的地址。
expirationTimeinteger通道的到期的日期和时间,以Unix时间戳表示,以毫秒为单位,File资源最长1天,Change资源最长1周。

响应

如果成功,此方法将返回具有以下结构的响应正文:

  1. {
  2.            "category": "api#channel",
  3.            "id": "string",
  4.            "resourceId": "string",
  5.            "resourceUri": "string",
  6.            "userToken": "string",
  1.            "expirationTime": 0,
  2.            "type": "string",
  3.            "url": "string"
  4. }
参数名参数类型描述
categorystring资源类型,固定为api#channel。
idstringID。
resourceIdstring资源ID,标识通道上正在监视的资源。
resourceUristring资源版本标识符。
userTokenstring发送消息通知时,回传给业务。
expirationTimeinteger通道的到期的日期和时间,以Unix时间戳表示,以毫秒为单位,File资源最长1天,Change资源最长1周。
typestring类型。
urlstring回调地址。