Documentation Archive

Developer

CloudKit Web Services Reference

On This Page

Fetching Zones by Identifier (zones/lookup)

You can fetch zones by using specified identifiers.

Path

POST [path]/database/[version]/[container]/[environment]/[database]/zones/lookup

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. Pass production 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. Pass private 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

zones

Dictionary that identifies a record zone in the database, described in Zone ID Dictionary. Use the zoneName key to specify the zone’s identifier. This key is required.

Response

The response is a dictionary containing the results per zone with the following key:

Key

Description

zones

An array containing a result dictionary for each zone in the zones request array. 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.

Related Framework API

This request is similar to using the CKFetchRecordZonesOperation class in the CloudKit framework.