ds.store REST

Skip to end of metadata
Go to start of metadata

Description

Stores an object data in Gigya's Data Store (DS).

Note: If you plan on integrating the DS, we highly recommend reading the Data Store Guide. The DS is part of the Registration-as-a-Service premium package that requires separate activation. If the DS is not part of your site package please contact your Gigya Account Manager or email support@gigya-inc.com.

 

Request URL

Where <Data_Center_ID> is:
  • us1 - For the US data center.
  • eu1 - For the European data center.
  • au1 - For the Australian data center.
  • ru1 - For the Russian data center.

If you are not sure of your site's data center, see Finding Your Site's Data Center.

Parameters

RequiredNameTypeDescription
dataJSON objectSpecifies the data to store. The data object should be specified as a JSON object complying with the following restrictions:
  • A maximum size of 512K of data.
  • User defined field names must begin with a character and may contain characters, digits and underscores.
  • We highly recommend that you give every field a type specification by appending the type to the field name in the following manner: "_". Valid types are:
    • i - an integer number (may contain 64bit long values as well), allows exact matching or range searches.
    • f - a floating point number, allows exact matching or range searches.
    • s - a string only allows exact matching.
    • t - a full text search field, allows for partial searching based on keywords.
    • b - Boolean.
    • d - a date field, allows exact matching or range searches. The valid date formats are:
      • Standard ISO time format (like "2011-07-14T11:42:32.123+3", may be specified without a time at all or without a time zone)
      • "YYYY-MM-DD HH:MM:SS"
  • When the field type is not specified explicitly we will try to auto detect it. Fields that fail auto detection will be considered strings.
    Note: When defining a 'binary' field type, it is not inferred from the data, and must be set explicitly using the 'setSchema' method.
For example:
{
   firstName_s : "david",
   birthDate_d : "1978-07-22",
   about_t : "I love tracking,...",
   academicDegree : {
       university_s: "Berkeley",
       degree_s: "MBA",
       department_s: "Business",
       courses : [{...}, {...},...]
   },
   hobbies_s: ["running", "music", "movies"]
}
typestring A string indicating the type of the object, equivalent to a name classifying objects as being of the same type; used in searches and when applying schemas.
oidstringA unique object identifier. If this parameter is set with the "auto" value, Gigya will generate a unique ID for the object. 
UIDstringA unique ID of a user. Setting this parameter associates the data object with the specified user. The identifier of this object is the compound of oid and UID
updateBehaviorstringThis parameter defines how to handle conflicting updates. The parameter may receive one of the following values:
  • "arrayPush" (default) - will cause arrays data provided with this API call to be appended to existing arrays data in the DB.
  • "arraySet" - will replace the content of existing arrays data in the DB with the values of arrays data provided with this API call.
  • "replace" - will cause the entire object data in the DB to be replaced with the new data provided with this call.
format string Determines the format of the response. The options are:
  • json (default)
  • jsonp - if the format is jsonp then you are required to define a callback method (see parameter below).
callback string This parameter is required only when the format parameter is set to jsonp (see above). In such cases this parameter should define the name of the callback method to be called in the response, along with the jsonp response data.
httpStatusCodes Boolean The default value of this parameter is false, which means that the HTTP status code in Gigya's response is always 200 (OK), even if an error occurs. The error code and message is given within the response data (see below). If this parameter is set to true, the HTTP status code in Gigya's response would reflect an error, if one occurred.

Authorization Parameters

Each REST API request must contain identification and authorization parameters.

Please refer to the Authorization Parameters section for details. 

 

Response Data

FieldTypeDescription
 
statusCode integer The HTTP response code of the operation. Code '200' indicates success.
errorCode integer The result code of the operation. Code '0' indicates success, any other number indicates failure. For a complete list of error codes, see the Error Codes table.
statusReason string A brief explanation of the status code.
errorMessage string A short textual description of an error, associated with the errorCode, for logging purposes. This field will appear in the response only in case of an error.
errorDetails string This field will appear in the response only in case of an error and will contain the exception info, if available.
callId string Unique identifier of the transaction, for debugging purposes.
time string The time of the response represented in ISO 8601 format, i.e., yyyy-mm-dd-Thh:MM:ss.SSSZ or
oidstringThe object's unique identifier. The value is either the oid parameter that you specified in the API call or a unique string generated by Gigya (if you have set the parameter to be "auto"). 

 

Response Example

{
  "oid": "8b8972c3b3114db2a0acdfa2617693bf",
  "statusCode": 200,
  "errorCode": 0,
  "statusReason": "OK",
  "callId": "bcb794e7b8ca41b1b3baf99e7bc1c86a",
  "time": "2015-03-22T11:42:25.943Z"
}