Tracks changes.
POST
https://drive.cloud.hicloud.com/drive/v1/changes/subscribe
*Some parameters are mandatory.
| Parameter Name | Type | Description | |
| cursor | string | query | Cursor for the current page. It should be set to the value of nextCursor from the previous response. (Mandatory) |
| fields | string | query | Fields in the request, which are in the partial response format. |
| containers | string | query | Query scope. Its value can be drive, applicationData, or a combination of the two (separated by a comma). The default value is drive. |
| form | string | query | Media format. |
| prettyPrint | boolean | query | Indicates whether to return a response in a human-readable format. |
| quotaId | string | query | User identifier, consisting of 40 characters at maximum. It is used to restrict the number of API calls of an individual user. |
| callback | string | query | Callback function used in JSONP requests. |
| x-hw-trace-id | string | header | ID used for service tracing. It is contained in the request header. |
| x-hw-app-id | string | header | App ID. It is contained in the request header. |
| version | string | header | SDK version number. It is contained in the request header. |
| x-hw-terminal | string | header | Device model. It is contained in the request header. |
| x-hw-os | string | header | Device operating system. It is contained in the request header. |
| unionID | string | header | Open user ID. It is contained in the request header. |
| User-Agent | string | header | App version number or ID. It is contained in the request header. |
In the request body, provide data with the following structure:
| Parameter Name | Type | Description |
| id | string | A unique string that identifies this channel.(Mandatory) |
| userToken | string | A string that is sent to the target address along with each notification that is sent on this channel.(Mandatory) |
| type | string | Type of delivery mechanism that is used for this channel. Value: web_hook.(Mandatory) |
| url | string | The address where notifications are delivered for this channel.(Mandatory) |
| expirationTime | integer | Date 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. |
If successful, this method returns a response body with the following structure:
- {
- "category": "api#channel",
- "id": "string",
- "resourceId": "string",
- "resourceUri": "string",
- "userToken": "string",
- "expirationTime": 0,
- "type": "string",
- "url": "string"
- }
| Parameter Name | Type | Description |
| category | string | Resource type. The value is always api#channel. |
| id | string | ID. |
| resourceId | string | Resource ID, which identifies the resource being tracked on this channel. |
| resourceUri | string | A version-specific identifier for the tracked resource. |
| userToken | string | A string that is sent to the target address along with each notification that is sent on this channel. |
| expirationTime | integer | Date 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. |
| type | string | Type of delivery mechanism that is used for this channel. |
| url | string | Callback address. |