/remove

Unlink the listed objects from the collection identified by collectionId. The body is a bare JSON array of objects (each by _global_object_id or lookup:_global_object_id); if any object is not currently linked the call fails with 400 CollectionRemoveNotAllObjectsFound. The collection _version is not changed.

POST /collection/remove/{collection_id} — Remove the listed objects from a collection.

Remove the listed objects from a collection.

post
  • Requires an authenticated user with BAG_READ permission.
  • Unlinking objects from the collection requires the UNLINK permission.
  • The request body is a bare JSON array of objects to unlink (each identified by _global_object_id or lookup:_global_object_id). Unlike push / splice, the array is sent directly, not wrapped in an objects property.
  • If one or more objects in the body are not currently linked to the collection, the call fails with 400 CollectionRemoveNotAllObjectsFound.
  • The _version of the collection is not changed.
Authorizations
AuthorizationstringRequired

Access token in the Authorization header: Authorization: Bearer <token>.

Path parameters
collection_idintegerRequired

The collection id of the collection to access.

Query parameters
skip_indexstring · booleanOptional

If set, do not queue index jobs for objects added to or removed from the collection.

Header parameters
x-fylr-authorizationstringOptional

The access token in form of Bearer <token>. You can also use authorization which does the same. authorization is looked at first.

authorizationstringOptional

The access token in form of Bearer <token>.

Bodyobject[]

A bare JSON array of objects to unlink (each identified by _global_object_id or lookup:_global_object_id). Unlike push / splice, the array is sent directly, not wrapped in an objects property.

_global_object_idstringOptional

The object id identifying the object. This is considered a local object if has the format <system object id>@local or <system object id>@<db uuid>. All other ids are considered foreign and accepted without further checks. Local ids are checked for existance.

Responses
200

Short response of containing only the number of objects.

application/json
_versionintegerOptional

The _version of the collection.

countintegerOptional

The number of objects linked to this collection.

Last updated