Targeting
Notation follows the APIs index.
datais an array of items, used where each resource carries its own content. For creates and replaces, each item is a resource shaped exactly as the corresponding single-resource API expects it. For actions whose body differs per resource, each item is the target'sidand the action'sbody.idsis an array of resource IDs.filteris an advanced query expression.
A request MUST supply exactly one form of targeting, whichever forms the operation accepts.
ids exists alongside filter, even though a filter can say { "in": [{ "var": "id" }, [...]] },
because of what happens to an ID that matches nothing. With ids, the caller named the resource, so
a missing one is a failure and is reported back. With filter, the caller described a set, and a
resource that is not in it simply is not in it.
- A
filterMUST NOTbe empty. idsanddataMUST NOTname the same resource twice.- An empty
idsordataarray is valid and affects nothing. - A request carrying more items than the documented maximum
MUSTbe rejected with422. - Targeting
MUST NOTwiden the caller's reach. Everyidsandfilteris implicitly restricted to the current organization and to the resources the caller may see. AfilterMUST NOTmatch a resource the caller should not know exists, and an ID naming such a resourceMUSTbe reported exactly as a nonexistent one would be.