Documentation Archive

Developer

CloudKit Web Services Reference

On This Page

Fetching Subscriptions by Identifier (subscriptions/lookup)

You can fetch subscriptions with the specified identifiers.

Path

POST [path]/database/[version]/[container]/[environment]/subscriptions/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.

Request

The POST request is a JSON dictionary containing the following key:

Key

Description

subscriptions

An array of dictionaries containing a single subscriptionID key. The value of the subscriptionID key is a string representation of a unique identifier for the subscription you want to fetch. This key is required.

Response

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

Key

Description

subscriptions

An array of dictionaries, containing one dictionary for each subscription. If the fetch of a subscription was successful, the dictionary represents the subscription, described in Subscription Dictionary. If the fetch of a subscription was unsuccessful, the dictionary is an error dictionary, described in Subscription Fetch Error Dictionary.

Related Framework API

This request is similar to the CKFetchSubscriptionsOperation class in the CloudKit framework.