目录

Tracks changes.

Request

HTTP Request

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

Parameters

*Some parameters are mandatory.

Parameter NameType
Description
cursorstringqueryCursor for the current page. It should be set to the value of nextCursor from the previous response. (Mandatory)
fieldsstringqueryFields in the request, which are in the partial response format.
containersstringqueryQuery scope. Its value can be drive, applicationData, or a combination of the two (separated by a comma). The default value is drive.
formstringqueryMedia format.
prettyPrintbooleanqueryIndicates whether to return a response in a human-readable format.
quotaIdstringqueryUser identifier, consisting of 40 characters at maximum. It is used to restrict the number of API calls of an individual user.
callbackstringqueryCallback function used in JSONP requests.
x-hw-trace-idstringheaderID used for service tracing. It is contained in the request header.
x-hw-app-idstringheaderApp ID. It is contained in the request header.
versionstringheaderSDK version number. It is contained in the request header.
x-hw-terminalstringheaderDevice model. It is contained in the request header.
x-hw-osstringheaderDevice operating system. It is contained in the request header.
unionIDstringheaderOpen user ID. It is contained in the request header.
User-AgentstringheaderApp version number or ID. It is contained in the request header.

Request Body

In the request body, provide data with the following structure:

Parameter NameTypeDescription
idstringA unique string that identifies this channel.(Mandatory)
userTokenstringA string that is sent to the target address along with each notification that is sent on this channel.(Mandatory)
typestringType of delivery mechanism that is used for this channel. Value: web_hook.(Mandatory)
urlstringThe address where notifications are delivered for this channel.(Mandatory)
expirationTimeintegerDate and time of notification channel expiration, expressed as a Unix timestamp, in milliseconds. File resources will expire within one day, while change resources will expire within one week.

Response

If successful, this method returns a response body with the following structure:

  1. {
  2.            "category": "api#channel",
  3.            "id": "string",
  4.            "resourceId": "string",
  5.            "resourceUri": "string",
  6.            "userToken": "string",
  7.            "expirationTime": 0,
  8.            "type": "string",
  9.            "url": "string"
  10. }
Parameter NameTypeDescription
categorystringResource type. The value is always api#channel.
idstringID.
resourceIdstringResource ID, which identifies the resource being tracked on this channel.
resourceUristringA version-specific identifier for the tracked resource.
userTokenstringA string that is sent to the target address along with each notification that is sent on this channel.
expirationTimeintegerDate and time of notification channel expiration, expressed as a Unix timestamp, in milliseconds. File resources will expire within one day, while change resources will expire within one week.
typestringType of delivery mechanism that is used for this channel.
urlstringCallback address.