Fetching Database Changes (changes/database)
Fetches the zones that changed since a specified sync token.
Path
POST [path]/database/[version]/[container]/[environment]/[database]/changes/database
Parameters
- path
The URL to the CloudKit web service, which is
https://api.apple-cloudkit.com
.- version
The protocol version—currently, 1.
- container
A unique identifier for the app’s container. The container ID begins with
iCloud.
.- environment
The version of the app’s container. Pass
development
to use the environment that is not accessible by apps available on the store. Passproduction
to use the environment that is accessible by development apps and apps available on the store.- database
The database to store the data within the container. The possible values are:
private
The database that contains private data that is visible only to the current user.
shared
The database that contains records shared with the current user.
Request
The POST request is a JSON dictionary containing the following keys:
Key |
Description |
---|---|
|
Identifies a point in the database’s change history. |
|
The maximum number of records to fetch. The default is the maximum number of records allowed in a request, described in Data Size Limits. |
Response
Dictionary containing the results of the operation with the following keys:
Key |
Description |
---|---|
|
An array containing a result dictionary for each zone in the specified database. If successful, the result dictionary contains the keys described in Zone Dictionary. If unsuccessful, the result dictionary contains the keys described in Zone Fetch Error Dictionary. |
|
Identifies a point in the database’s change history. |
|
Boolean value that indicates whether there are more changes to request. If |
Discussion
Use the Fetching Record Zone Changes (changes/zone) endpoint to fetch the changes in each zone returned in this response.
Modifying Zones (zones/modify)
Copyright © 2018 Apple Inc. All rights reserved. Terms of Use | Privacy Policy | Updated: 2016-06-13