Modifying Zones (zones/modify)
You can apply multiple operations—such as create and delete zones—to different zones in a single request.
Path
POST [path]/database/[version]/[container]/[environment]/[database]/zones/modify
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. Pass
public
to use the database that is accessible to all users of the app. Passprivate
to use the database that is visible only to the currently signed-in user.
Request
The POST request is a JSON dictionary containing the following keys:
Key |
Description |
---|---|
|
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:
Key |
Description |
---|---|
|
The type of operation. Possible values are either |
|
A dictionary representing the zone to modify. It has a single |
Response
The response is a dictionary containing the results per operation with the following key:
Key |
Description |
---|---|
|
An array containing a result dictionary for each zone in the |
Discussion
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.
Fetching Zones by Identifier (zones/lookup)
Copyright © 2018 Apple Inc. All rights reserved. Terms of Use | Privacy Policy | Updated: 2016-06-13