schema.collections

Schema file

type

object

properties

  • autoIncrementFields

The list of fields that must be incremented automatically when inserting a new element. This fields must be type integer

type

array

items

type

string

  • collectionName

The collection name

type

string

  • filters

The filters available for the schema

type

array

items

CollectionFilter

  • historizeCollection

When set as true, each operation on an entry of this collection is reported inside the collections_history collection. This allows to get a previous state of a collection entry.

Default value is [true]

type

boolean

default

True

  • indexes

The indexes to build on the Mongo Database for the collection

type

array

items

IndexConfigurationEntity

  • isTemplateGeneratedByOspComposer

Name of the playbook that generated this file. If present, the file is managed by the Composer and may be overwritten on regeneration. Used for selective clean. Do not edit or set manually.

type

string

  • moduleId

The id of the collection module

type

string

  • noDuplicatesFields

The list of fields that cannot have duplicates values. This only applies to values that are arrays

type

array

items

type

string

  • templateId

The id of the template to use for this file

type

string

  • templateVariables

The variables and their values to be replaced from the template

type

object

additionalProperties

  • ttlAfterDelete

Time to live (TTL) in seconds of an entry before it is fully removed from the database after it was deleted. When deleting an entry with a delete request, the flag __is_active is set to false, making this entry not appear in request. If value is 0, the entry is never fully deleted.

Default value is [0]

type

integer

default

0

  • variablesFiles

The variables files to use to replace the variables. The first file of the list will take precedence over the following one. Template variables take precedence over the contents of the files.

type

array

items

type

string

additionalProperties

False

CollectionFilter

type

object

properties

  • id

A reference to this collection filter.

type

string

  • query

MongoDB expression ↗️ that represents the filter to apply.

The available placeholder are define here ↗️.

  • scope

The filter scope defines which elements from the collection are impacted by the filter query.

This parameter is mainly here to allow to request deleted elements from the collection. Whenever a delete request is done to a collection, the targeted element is not fully deleted, but only update to set a flag (__is_active) to false. They can be fully deleted if the collection configuration has a ttlAfterDelete different than 0. These flagged elements are never returned or impacted by any request done to any collection. Using a filter with the scope ONLY_INACTIVE is currently the only way to interact with deleted elements.

The different scopes are:

  • ONLY_ACTIVE (default): this filters will only match active elements of the collection (flag __is_active as true, meaning not deleted)

  • ONLY_INACTIVE: this filters will only match inactive elements of the collection (flag __is_active as false, meaning deleted)

  • ALL: every element of the collection

Learn more about Collections ↗️.

type

string

enum

ONLY_ACTIVE, ONLY_INACTIVE, ALL

additionalProperties

False

IndexConfigurationEntity

type

object

properties

  • index

The Mongo expression used for indexing. “ + See MongoDB indexes properties documentation ↗️. See MongoDB indexes documentation ↗️.

  • name

The name of the index

type

string

  • partialFilterExpression

Partial filter expression used to filter the elements that are affected by this index

  • sparse

Create the indexes only the document when the field exist

Default value is [false]

type

boolean

default

False

  • unique

Set the index as unique. This will prevent the insertion of new document if the index is not unique. See MongoDB unique indexes ↗️ for more information.

Default value is [false]

type

boolean

default

False

additionalProperties

False