Modifying Zones (zones/modify)
You can apply multiple operations—such as create and delete zones—to different zones in a single request.
The URL to the CloudKit web service, which is
The protocol version—currently, 1.
A unique identifier for the app’s container. The container ID begins with
The version of the app’s container. Pass
developmentto use the environment that is not accessible by apps available on the store. Pass
productionto use the environment that is accessible by development apps and apps available on the store.
The database to store the data within the container. Pass
publicto use the database that is accessible to all users of the app. Pass
privateto use the database that is visible only to the currently signed-in user.
The POST request is a JSON dictionary containing the following keys:
Array of dictionaries defining the operations to apply to zones in the database. The dictionary keys are described in Zone Operation Dictionary. This key is required.
Zone Operation Dictionary
The dictionary keys for an operation are:
The type of operation. Possible values are either
A dictionary representing the zone to modify. It has a single
The response is a dictionary containing the results per operation with the following key:
All operations are attempted and performed in the order they appear in the
operations array in the request. Check the
zones array in the response for which operations are successful. Only one operation is permitted per zone in the request.
Related Framework API
This request is similar to using the
CKModifyRecordZonesOperation class in the CloudKit framework.