Gigya Job Openings

Page History

Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.


Include Page
Template_gs rest api Auth parameters
Template_gs rest api Auth parameters

Schema Object

uniqueArrayAn array defining the fields on which you wish to impose a constraint of uniqueness. You may impose a compound uniqueness constraint based on a set of fields (see the example below). Only regular primitive data fields can be defined as unique.
Note: Setting fields to be "unique" only works going forward, so if the fields already have non-unique values, the non-unique values will remain.
fieldsJSON objectThis object defines properties per data fields. The object contains field names and their corresponding list of properties (see the example below). The field name should be the full path name with dots, i.e. "work.address".
The properties in option are:
  • type - Defines the data type of this field. The supported values are "integer", "float", "boolean", "string", "date", "long", "text" and "binary".
    When the 'type' property is not specified the type will be deduced from the field name extension or automatically according to the content of the first item. When defining a 'binary' field type, it is not inferred from the data must be declared explicitly through the 'type' parameter.
    Please note that field's type cannot be changed after it contains data.
  • writeAccess - Specifies whether to allow unsigned requests to write into this field. The supported values are:
    • "serverOnly" (default ) - Only signed requests coming from the server are allowed.
    • "clientCreate" - Unsigned requests coming from the client are allowed to write into this field, only if it wasn't set before.
    • "clientModify" - Unsigned requests coming from the client are allowed to write into this field and modify existing values.
  • format - Allows assigning a regular expression that defines the format of this data field. Gigya will verify that data set in this data field matches the format. If the data set in this field doesn't match the format, Gigya will not set the data and will return an error. The best practice is to validate the data format on your client application. The format property accepts a string of the form: "regex('')". The regex syntax can be found in: Regular Expression Language Reference.
  • languages- An array of strings containing languages with which a text field is compatible, in addition to the default languages. A maximum of four such languages are supported. The values passed in this property are added to the existing languages in the field, and if the total number exceeds four languages, the operation fails.
    Note: The only language currently supported for this functionality is Japanese.
  • Include Page
    Encryption Parameter Definition Template
    Encryption Parameter Definition Template

Include Page
Delete A Field From Schema Template
Delete A Field From Schema Template

dynamicSchemaBooleanSpecifies whether the schema is strict or dynamic. The default value of this parameter is true i.e. dynamic schema. In a dynamic schema you may add new fields that are not defined in the schema to the DS. The new fields are automatically added to the dynamic schema. In a strict schema you can only write into fields that are already defined in the schema.

Schema Object Example

Code Block
    unique: [                               
       ["field1"],                        // an example of a single field that must be unique
       ["field2", "field3" ]              // an example of a compound unique constraint based on two fields
    fields: {
        "field1": {
        "field4": {
        "field5": {
        "field6": null,     // Delete field6
        "field7": {
    dynamicSchema: false