/push

Append objects to the end of the collection identified by collectionId, in request order. Objects already linked are moved to the end. The collection _version is not changed.

POST /collection/push/{collection_id} — Append objects to a collection.

Append objects to a collection.

post
  • Requires an authenticated user with BAG_READ permission.
  • Linking objects to a collection requires LINK permission.
  • If objects already exist in the collection, they will be moved to the end.
  • The objects are appended in order of the request.
  • 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
allow_invalid_aclstring · booleanOptional

Allow storing the collection even if the owner doesn't have the necessary permissions for all objects to share the rights defined in the _acl property of the collection. The _invalid_acl flag will be set, if the user doesn't have sufficient permissions to share all objects of the collection. The user needs the permission BAG_ACL for the collection in order to use this parameter.

Differs from easydb 5: this confirmation is driven by the boolean allow_invalid_acl parameter. easydb 5 instead resolves the 202 confirmation with a collection_rights_policy query parameter; there is no allow_invalid_acl parameter in easydb 5.

background_invalid_aclstring · booleanOptional

If set, the invalid-ACL validity check (whether the collection owner may grant the rights of all linked objects) is not run inline. Instead a queued ACTION_COLLECTION_ACL_CHECK job is scheduled and the request returns immediately, before the check has resolved.

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>.

Body
_versionintegerRead-onlyOptional

The _version of the collection.

countintegerOptional

The number of objects linked to this collection. In /api/collection/splice the number of objects to delete. Use -1 to delete all objects.

indexinteger · nullableOptional

The index to use for /api/collection/splice. Index 0 is to the left of the first object. Index which equals the number of existing objects in the collection is to the right of the last object.

offsetintegerRead-onlyOptional

The offset of list of objects.

limitintegerRead-onlyOptional

The maximum count of objects to list.

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