FeaturesTemplatesShowcaseTownie
AI
BlogDocsPricing
Log inSign up
dinavinter
dinavinteros
Public
Like
os
Home
Code
18
accountviewer
2
dsviewer
2
shared
1
README-author-update.md
README-delete-test-projects.md
accounts-schema.ts
accounts.yaml
cleanup.tsx
copy-projects-tods.ts
data.json
delete-test-projects-advanced.ts
delete-test-projects.ts
ds-schema.ts
ds.md
main.tsx
update-authors-advanced.ts
update-project-authors.ts
verify
Branches
1
Pull requests
Remixes
History
Environment variables
5
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
Sign up now
Code
/
ds.md
Code
/
ds.md
Search
6/9/2025
Viewing readonly version of main branch: v159
View latest version
ds.md

SAP Customer Data Cloud

Generated on: 2025-06-09 18:21:06 GMT+

SAP Customer Data Cloud | SHIP

Public

Original content: https://help.sap.com/docs/SAP_CUSTOMER_DATA_CLOUD/8b8d6fffe113457094a17701f63e3d6a?locale=en-

US&state=PRODUCTION&version=SHIP

Warning

This document has been generated from SAP Help Portal and is an incomplete version of the official SAP product documentation.

The information included in custom documentation may not reect the arrangement of topics in SAP Help Portal, and may be

missing important aspects and/or correlations to other topics. For this reason, it is not for production use.

For more information, please visit https://help.sap.com/docs/disclaimer.

Data Store REST

SAP Customer Data Cloud's Data Store (DS) API consists of the methods listed below.

ds.delete REST
ds.deleteSchemaFields REST
ds.get REST
ds.getSchema REST
ds.getTypes REST
ds.search REST
ds.setSchema REST
ds.store REST

ds.delete REST

Description

Deletes object data or an entire object from Gigya's Data Store.

Request URL

https://ds./ds.delete

Where is:

us1.gigya.com - For the US data center.

eu1.gigya.com - For the European data center.

au1.gigya.com - For the Australian data center.

eu2.gigya.com - For the European Azure data center.

cn1.sapcdm.cn - For the Chinese data center.

 Note

If you plan on integrating the DS, we highly recommend reading the Data Store Guide.
The DS is a premium platform that requires separate activation. If the DS is not part of your site package contact your SAP
Customer Data Cloud Customer Engagement Executive or email support@gigya-inc.com.

 Note

If you plan on integrating the DS, we highly recommend reading the Data Store Guide.
The DS is a premium platform that requires separate activation. If the DS is not part of your site package contact your Gigya
Customer Engagement Executive or email support@gigya-inc.com.

global.gigya.com - For all Global site groups.

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

Parameters

Required Name Type Description
oid string The ID of the object to delete.
type string A string indicating the type of the
object.
elds string A comma separated list of elds
to delete. Acceptable values for
this parameter:
Data eld names,
specifying the the
complete path, i.e.
album.photo.photoTitle_t
Partial eld names (elds
that contain only a part
of the path to sub-
objects, i.e. album.photo)
  • indicate to retrieve everything below that path.
"*" - indicates to retrieve
the entire stored object.
UID string If the object is associate with a
user, then the ID of the user
should be specied and forms a
compound key together with the
oid.
* If you call this method through
an external OAuth2 SDK, then
the UID may be passed implicitly
within the access_token.
format string Determines the format of the
response.
json (default)
context string/JSON This parameter may be used to
pass data through the current
method and return it,
unchanged, within the response.
ignoreInterruptions Boolean This may be used in some cases
to suppress logic applied by the
Web SDK, such as automatic
opening of screens (e.g., in a
registration completion
Required Name Type Description
scenario). This parameter may
not be used with REST APIs.
httpStatusCodes Boolean The default value of this
parameter is false, which means
that the HTTP status code in
SAP Customer Data Cloud'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 SAP
Customer Data Cloud's response
would reect an error, if one
occurred.

Authorization Parameters

Each REST API request must contain identication and authorization parameters.

Some REST APIs may function without these authorization parameters, however, when that occurs, these calls are treated as

client-side calls and all client-side rate limits will apply. In order to not reach client-side IP rate limits that may impact your

implementation when using server-to-server REST calls, it is Recommended Best Practice to always use an application key and

secret or a bearer token when sending requests. A non-exhaustive list of REST APIs that this may apply to are as follows:

accounts.login
socialize.login
accounts.notifyLogin
socialize.notifyLogin
accounts.nalizeRegistration
accounts.linkAccounts

Please refer to the Authorization Parameters section for details.

Sample Requests

 Note

As of January 31, 2023, you may no longer use a Partner Secret as a valid authentication method for requests to SAP Customer
Data Cloud servers.

Response Data

Field Type Description
apiVersion integer Denes the API version that returned the
response and may not always be returned.
callId string Unique identier of the transaction, for
debugging purposes.
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.
errorDetails string This eld will appear in the response only in
case of an error and will contain the
exception info, if available.
errorMessage string
fullEventName string The full name of the event that triggered
the response. This is an internally used
parameter that is not always returned and A
Copyright Disclaimer Privacy Statement Legal Disclosure Trademark Terms of Use
Field Type Description
short textual description of an error,
associated with the errorCode, for logging
purposes. This eld will appear in the
response only in case of an error.should not
be relied upon by your implementation.
time string The time of the response represented in
ISO 8601 format: yyyy-mm-dd-
Thh:MM:ss.SSSZ (for example, 2021-03-
05T06:11:31.513Z)
statusCode integer The HTTP response code of the operation.
Code '200' indicates success.
This property is deprecated and only
returned for backward compatibility.
statusReason string A brief explanation of the status code.
This property is deprecated and only
returned for backward compatibility.

Response Example

ds.deleteSchemaFields REST

Description

Deletes a eld from a specied Gigya Data Store schema type.

Once a eld is deleted:

You cannot save data to that eld, nor retrieve data that was saved to that eld.
You cannot recreate a eld of the same name in the schema.

This parameter or feature is part of our Early Adopters Program. To nd out if you are eligible for participation, contact your SAP

Customer Data Cloud Customer Engagement Executive or contact us at SAP Support.

{
"statusCode": 200,
"errorCode": 0,
"statusReason": "OK",
A short textua"callId": "31ba039fb8d340ceb2f43d52c89bf187",
"time": "2015-03-22T11:42:25.943Z"
}

 Note

If you plan on integrating the DS, we highly recommend reading the Data Store Guide.
The DS is a premium platform that requires separate activation. If the DS is not part of your site package, contact your SAP
Customer Data Cloud Customer Engagement Executive or contact us at SAP Support.

Request URL

https://ds./ds.deleteSchemaFields

Where is:

us1.gigya.com - For the US data center.

eu1.gigya.com - For the European data center.

au1.gigya.com - For the Australian data center.

eu2.gigya.com - For the European Azure data center.

cn1.sapcdm.cn - For the Chinese data center.

global.gigya.com - For all Global site groups.

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

Parameters

Required Name Type Description
type string The schema type dened in the
Data Store from which to delete
elds.
dataSchema array The elds to delete from the
specied Data Store type. For
example:
format string Determines the format of the
response.
json (default)
context string/JSON This parameter may be used to
pass data through the current
method and return it,
unchanged, within the
response.
ignoreInterruptions Boolean This may be used in some cases
to suppress logic applied by the
Web SDK, such as automatic
opening of screens (e.g., in a
registration completion
scenario). This parameter may
not be used with REST APIs.
httpStatusCodes Boolean The default value of this
parameter is false, which means
that the HTTP status code in
SAP Customer Data Cloud's
response is always 200 (OK),
even if an error occurs. The
["field1","field2"]
Required Name Type Description
error code and message is given
within the response data (see
below). If this parameter is set
to true, the HTTP status code in
SAP Customer Data Cloud's
response would reect an error,
if one occurred.

Authorization Parameters

Each REST API request must contain identication and authorization parameters.

Some REST APIs may function without these authorization parameters, however, when that occurs, these calls are treated as

client-side calls and all client-side rate limits will apply. In order to not reach client-side IP rate limits that may impact your

implementation when using server-to-server REST calls, it is Recommended Best Practice to always use an application key and

secret or a bearer token when sending requests. A non-exhaustive list of REST APIs that this may apply to are as follows:

accounts.login
socialize.login
accounts.notifyLogin
socialize.notifyLogin
accounts.nalizeRegistration
accounts.linkAccounts

Please refer to the Authorization Parameters section for details.

Sample Requests

 Note

As of January 31, 2023, you may no longer use a Partner Secret as a valid authentication method for requests to SAP Customer
Data Cloud servers.

Response Data

Field Type Description
apiVersion integer Denes the API version that returned the
response and may not always be returned.
callId string Unique identier of the transaction, for
debugging purposes.
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.
errorDetails string This eld will appear in the response only in
case of an error and will contain the
exception info, if available.
errorMessage string A short textual description of an error,
associated with the errorCode, for logging
purposes. This eld will appear in the
response only in case of an error.
Copyright Disclaimer Privacy Statement Legal Disclosure Trademark Terms of Use
Field Type Description
fullEventName string The full name of the event that triggered
the response. This is an internally used
parameter that is not always returned and
should not be relied upon by your
implementation.
time string The time of the response represented in
ISO 8601 format: yyyy-mm-dd-
Thh:MM:ss.SSSZ (for example, 2021-03-
05T06:11:31.513Z)
statusCode integer The HTTP response code of the operation.
Code '200' indicates success.
This property is deprecated and only
returned for backward compatibility.
statusReason string A brief explanation of the status code.
This property is deprecated and only
returned for backward compatibility.

Response Example

ds.get REST

Description

Retrieves an object's or the specied datum from Gigya's Data Store.

Request URL

https://ds./ds.get

Where is:

us1.gigya.com - For the US data center.

{
"statusCode": 200,
"errorCode": 0,
"statusReason": "OK",
"callId": "31ba039fb8d340ceb2f43d52c89bf187",
"time": "2015-03-22T11:42:25.943Z"
}

 Note

If you plan on integrating the DS, we highly recommend reading the Data Store Guide.
The DS is a premium platform that requires separate activation. If the DS is not part of your site package contact your Gigya
Customer Engagement Executive or email support@gigya-inc.com.

eu1.gigya.com - For the European data center.

au1.gigya.com - For the Australian data center.

eu2.gigya.com - For the European Azure data center.

cn1.sapcdm.cn - For the Chinese data center.

global.gigya.com - For all Global site groups.

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

Parameters

Required Name Type Description
oid string The ID of the object to retrieve.
type string 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.
elds string A comma separated list of elds
to retrieve. Acceptable values for
this parameter:
Data eld names,
specifying the the
complete path, i.e.
album.photo.photoTitle_t
Partial eld names (elds
that contain only a part
of the path to sub-
objects, i.e. album.photo)
  • indicate to retrieve everything below that path.
"*" - indicates to retrieve
the entire stored object.
UID string If the object is associate with a
user, then the ID of the user
should be specied and forms a
compound key together with the
oid.
* If you call this method through
an external OAuth2 SDK, then
the UID may be passed implicitly
within the access_token.
format string Determines the format of the
response.
json (default)
Required Name Type Description
context string/JSON This parameter may be used to
pass data through the current
method and return it,
unchanged, within the response.
ignoreInterruptions Boolean This may be used in some cases
to suppress logic applied by the
Web SDK, such as automatic
opening of screens (e.g., in a
registration completion
scenario). This parameter may
not be used with REST APIs.
httpStatusCodes Boolean The default value of this
parameter is false, which means
that the HTTP status code in
SAP Customer Data Cloud'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 SAP
Customer Data Cloud's response
would reect an error, if one
occurred.

Authorization Parameters

Each REST API request must contain identication and authorization parameters.

Some REST APIs may function without these authorization parameters, however, when that occurs, these calls are treated as

client-side calls and all client-side rate limits will apply. In order to not reach client-side IP rate limits that may impact your

implementation when using server-to-server REST calls, it is Recommended Best Practice to always use an application key and

secret or a bearer token when sending requests. A non-exhaustive list of REST APIs that this may apply to are as follows:

accounts.login
socialize.login
accounts.notifyLogin
socialize.notifyLogin
accounts.nalizeRegistration
accounts.linkAccounts

Please refer to the Authorization Parameters section for details.

 Note

As of January 31, 2023, you may no longer use a Partner Secret as a valid authentication method for requests to SAP Customer
Data Cloud servers.

Sample Requests

Response Data

Field Type Description
apiVersion integer Denes the API version that returned the
response and may not always be returned.
callId string Unique identier of the transaction, for
debugging purposes.
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.
errorDetails string This eld will appear in the response only in
case of an error and will contain the
exception info, if available.
errorMessage string A short textual description of an error,
associated with the errorCode, for logging
Copyright Disclaimer Privacy Statement Legal Disclosure Trademark Terms of Use
Field Type Description
purposes. This eld will appear in the
response only in case of an error.
fullEventName string The full name of the event that triggered
the response. This is an internally used
parameter that is not always returned and
should not be relied upon by your
implementation.
time string The time of the response represented in
ISO 8601 format: yyyy-mm-dd-
Thh:MM:ss.SSSZ (for example, 2021-03-
05T06:11:31.513Z)
statusCode integer The HTTP response code of the operation.
Code '200' indicates success.
This property is deprecated and only
returned for backward compatibility.
statusReason string A brief explanation of the status code.
This property is deprecated and only
returned for backward compatibility.
data JSON object The object data retrieved from Gigya's Data
Store.
oid string The ID of the object
UID string If the object is associate with a user, then
the ID of the user.
lastUpdated long The time of the latest change in this object,
in Java time (number of milliseconds since
Jan. 1st 1970).
lastUpdatedTime string The time of the latest change in this object,
in ISO 8601 format.
created long The time of this object's creation, in Java
time (number of milliseconds since Jan. 1st
1970).
createdTime string The time of this object's creation, in ISO
8601 format.

Response Example

{
"data": {
"BloodType": "A",
"Dislikes": "Evil",
"EyeColor": "Brown",
"HairColor": "Brown",
"Height": "179 cms",
"Likes": "Justice",
"Occupation": "QA",
"Weight": "94.1 kgs"
},
"oid": "8b8972c3b3114db2a0acdfa2617693bf",

ds.getSchema REST

Description

This method retrieves the schema of a specied data type in Gigya's Data Store (DS).

Request URL

https://ds./ds.getSchema

Where is:

us1.gigya.com - For the US data center.

eu1.gigya.com - For the European data center.

au1.gigya.com - For the Australian data center.

eu2.gigya.com - For the European Azure data center.

cn1.sapcdm.cn - For the Chinese data center.

global.gigya.com - For all Global site groups.

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

Parameters

Required Name Type Description
type string A string indicating the type of
the object, equivalent to a
schema name. To see all the
"lastUpdatedTime": "2012-08-08T12:16:24Z",
"lastUpdated": 1344428184385,
"createdTime": "2012-08-08T12:16:24Z",
"created": 1344428184385,
"statusCode": 200,
"errorCode": 0,
"statusReason": "OK",
"callId": "d02ada709b494be18d47cab5a23c3470",
"time": "2015-03-22T11:42:25.943Z"
}

 Note

For security reasons this method is not available for client-side SDKs, only for server-side SDKs.

 Note

If you plan on integrating the DS, we highly recommend reading the Data Store Guide.
The DS is a premium platform that requires separate activation. If the DS is not part of your site package contact your Gigya
Customer Engagement Executive or email support@gigya-inc.com.

Required Name Type Description

types currently dened in the
schema, use ds.getTypes or the
Schema Editor.
lter string Species what parts of the
schema to return, can be one of
the following options:
full - (default) return the
complete schema
including implicit elds
and dynamic elds.
explicitOnly - return
only the parts of the
schema that were
explicitly set by the
partner using a
setSchema call.
clientOnly - return only
the elds in the schema
that allow client access.
For those elds return
only the type and
format and required
properties (see the
format denition of the
schema object).
format string Determines the format of the
response.
json (default)
context string/JSON This parameter may be used to
pass data through the current
method and return it,
unchanged, within the
response.
ignoreInterruptions Boolean This may be used in some cases
to suppress logic applied by the
Web SDK, such as automatic
opening of screens (e.g., in a
registration completion
scenario). This parameter may
not be used with REST APIs.
httpStatusCodes Boolean The default value of this
parameter is false, which means
that the HTTP status code in
SAP Customer Data Cloud'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
Required Name Type Description
SAP Customer Data Cloud's
response would reect an error,
if one occurred.
includeDynamicSchema Boolean Deprecated. When it is explicitly
set to false it should be
interpreted as
schemaType=explicit.

Authorization Parameters

Each REST API request must contain identication and authorization parameters.

Some REST APIs may function without these authorization parameters, however, when that occurs, these calls are treated as

client-side calls and all client-side rate limits will apply. In order to not reach client-side IP rate limits that may impact your

implementation when using server-to-server REST calls, it is Recommended Best Practice to always use an application key and

secret or a bearer token when sending requests. A non-exhaustive list of REST APIs that this may apply to are as follows:

accounts.login
socialize.login
accounts.notifyLogin
socialize.notifyLogin
accounts.nalizeRegistration
accounts.linkAccounts

Please refer to the Authorization Parameters section for details.

Sample Requests

 Note

As of January 31, 2023, you may no longer use a Partner Secret as a valid authentication method for requests to SAP Customer
Data Cloud servers.

Response Data

Field Type Description
apiVersion integer Denes the API version that returned the
response and may not always be returned.
callId string Unique identier of the transaction, for
debugging purposes.
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.
errorDetails string This eld will appear in the response only in
case of an error and will contain the
exception info, if available.
errorMessage string A short textual description of an error,
associated with the errorCode, for logging
purposes. This eld will appear in the
response only in case of an error.
Copyright Disclaimer Privacy Statement Legal Disclosure Trademark Terms of Use
Field Type Description
fullEventName string The full name of the event that triggered
the response. This is an internally used
parameter that is not always returned and
should not be relied upon by your
implementation.
time string The time of the response represented in
ISO 8601 format: yyyy-mm-dd-
Thh:MM:ss.SSSZ (for example, 2021-03-
05T06:11:31.513Z)
statusCode integer The HTTP response code of the operation.
Code '200' indicates success.
This property is deprecated and only
returned for backward compatibility.
statusReason string A brief explanation of the status code.
This property is deprecated and only
returned for backward compatibility.
schema JSON object A JSON object that details the schema
structure. See the format denition of the
schema object.

Response Example

ds.getTypes REST

Description

This method retrieves the schema data types dened in Gigya's Data Store (DS).

{
"schema": {
"fields": {
"customField1": {
"type": "integer"
},
"customField2": {
"type": "string"
},
"customField3": {
"type": "string"
}
},
"dynamicSchema": false
},
"statusCode": 200,
"errorCode": 0,
"statusReason": "OK",
"callId": "0d8382a314ac4329a53add3067e863d9",
"time": "2015-03-22T11:42:25.943Z"
}

 Note

Request URL

https://ds./ds.getTypes

Where is:

us1.gigya.com - For the US data center.

eu1.gigya.com - For the European data center.

au1.gigya.com - For the Australian data center.

eu2.gigya.com - For the European Azure data center.

cn1.sapcdm.cn - For the Chinese data center.

global.gigya.com - For all Global site groups.

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

Authorization Parameters

Each REST API request must contain identication and authorization parameters.

Some REST APIs may function without these authorization parameters, however, when that occurs, these calls are treated as

client-side calls and all client-side rate limits will apply. In order to not reach client-side IP rate limits that may impact your

implementation when using server-to-server REST calls, it is Recommended Best Practice to always use an application key and

secret or a bearer token when sending requests. A non-exhaustive list of REST APIs that this may apply to are as follows:

accounts.login
socialize.login
accounts.notifyLogin
socialize.notifyLogin
accounts.nalizeRegistration
accounts.linkAccounts

Please refer to the Authorization Parameters section for details.

For security reasons this method is not available for client-side SDKs, only for server-side SDKs.

 Note

If you plan on integrating the DS, we highly recommend reading the Data Store Guide.
The DS is a premium platform that requires separate activation. If the DS is not part of your site package contact your Gigya
Customer Engagement Executive or email support@gigya-inc.com.

 Note

As of January 31, 2023, you may no longer use a Partner Secret as a valid authentication method for requests to SAP Customer
Data Cloud servers.

Sample Requests

Response Data

Field Type Description
apiVersion integer Denes the API version that returned the
response and may not always be returned.
callId string Unique identier of the transaction, for
debugging purposes.
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.
errorDetails string This eld will appear in the response only in
case of an error and will contain the
exception info, if available.
errorMessage string A short textual description of an error,
associated with the errorCode, for logging
Copyright Disclaimer Privacy Statement Legal Disclosure Trademark Terms of Use
Field Type Description
purposes. This eld will appear in the
response only in case of an error.
fullEventName string The full name of the event that triggered
the response. This is an internally used
parameter that is not always returned and
should not be relied upon by your
implementation.
time string The time of the response represented in
ISO 8601 format: yyyy-mm-dd-
Thh:MM:ss.SSSZ (for example, 2021-03-
05T06:11:31.513Z)
statusCode integer The HTTP response code of the operation.
Code '200' indicates success.
This property is deprecated and only
returned for backward compatibility.
statusReason string A brief explanation of the status code.
This property is deprecated and only
returned for backward compatibility.
types array A list of the types which make up this DS
schema.

Response Example

ds.search REST

Description

Searches and retrieves data from Gigya's Data Store (DS) using an SQL-like query. For security reasons this method is not

available for client side SDKs, only for server side SDKs. SQL queries are converted into Gigya's proprietary query language. SQL

injection attacks are not possible because queries are both created by the customer and then converted by Gigya.

A short delay is possible between the writing of account data to the data base and its availability in queries.

{
"types": [
"myType"
],
"statusCode": 200,
"errorCode": 0,
"statusReason": "OK",
"callId": "f293e7d275fa4656b6bf197d90027ae2",
"time": "2017-08-17T07:32:49.229Z"
}

 Note

If you plan on integrating the DS, we highly recommend reading the Data Store Guide.

The DS is a premium platform that requires separate activation. If the DS is not part of your site package contact your Gigya

Customer Engagement Executive or email support@gigya-inc.com.

Query Syntax Specication

Gigya queries use the same syntax rules as SQL, however not all standard SQL key words are available.

When querying for string values, value must be wrapped in double quotes. e.g., SELECT * FROM data.music WHERE guitar
= "Fender".
When querying for Integer (and other non-textual elds) values, value must not be wrapped in quotes. e.g., SELECT * FROM
data.userAccounts WHERE age = 42.
Unsupported SQL syntax in the query string (e.g., HAVING) will produce an error.
The query string clauses must be ordered in the following way*:
. Select clause
. From clause
. Where clause
. Filter clause
. Group By clause
. Order By clause
. Start clause Or/And Limit clause
Deleted objects do not appear in queries.
Encrypted elds are decrypted during searches but comparison operators (>, >=, <, <=) and regex expressions are not
available on these elds. The Contains keyword can be used for case-insensitive searches on encrypted elds but does not
support partial strings.
Example queries and responses can be viewed at DS.search Examples.

select - The "select" statement accepts a comma separated list of elds or objects to retrieve. Acceptable values for this

statement are:

Field names, specifying the complete path, i.e. data.album.photo.photoTitle_t. Specifying partial elds names (data.album)
will return all the elds in the path.
Object names, specifying an object name, i.e. user_likes will return all the elds in the user_likes object.
Partial eld names (elds that contain only a part of the path to sub-objects, i.e. data.album) - will retrieve everything below
that path.
* - will retrieve every eld in the schema.
count(*) - Returns the number of objects for a particular object type in the data store. The result is given in the response as
a single value inside the "data" eld.
as - create an alias (temporary title) for the returned object or eld. 'Select data.track.title as song...' will return a eld
called track.song containing the values of data.track.title. Example:
// Query
SELECT data.music.trackName AS Track
// Result
{"results": [
{"track": {"song": "I will follow"} },
{"track": {"song": "Into the Heart"} },
{"track": {"song": "The Ocean"} },
{"track": {"song": "A Day Without Me"} },
{"track": {"song": "Shadows and Trees"} }
],
"objectsCount": 5,
"totalCount": 1840,
"statusCode": 200,
sum(), min(), max(), avg(), sum_of_squares(), variance(), std() - Mathematical functions, must all be performed on the
same numeric eld. Fields with null values will be ignored.
The name of the eld on which the function is to be performed must be entered in the brackets. For example: 'Select
min(track) from data.music'.
sum - provides a total for the eld in the brackets.
min/max - minimum/maximum value for the eld. If no values are found, min will return "innity" and max will
return "-innity".
avg - average value of the eld.
variance - the extent that the eld's values vary.
std - standard deviation, the likelihood that values vary.

from - Name of the data source. Only one data source is supported. Queries on objects in the Data Store (DS.search) must specify

the object "type" classic ation as dened in the DS.store method.

where - The "where" clause denes conditions for selecting items from the collection. Supported operators:

> , >=, <, <= , = , != - the left operand must be a data eld name (with a proper suffix letter) and the right operand must be a
constant of the same type as the eld. For example: "where track.# >= 18 ".
Only = and != can be used with encrypted elds.
and , or
contains, not contains - may be used only on text (string) elds and arrays.
Text (string) elds - support standard full text search capabilities. Contains is not case-sensitive. The left operand
must be a text eld name and the right operand must be a constant string. You can search for a specic word within
the string, for example: WHERE data.about_t CONTAINS "music". Underscores are treated as separators between
words. Contains cannot be used to locate words within encrypted elds (you must enter the full string) and is case
insensitive.
Arrays - the left operand must be an array eld name and the right operand must be a constant of the same type as
the array values. The array eld name must have a suffix denoting the type of the arrays values. For example:
WHERE data.hobbies_s CONTAINS "swimming".
in() - only retrieve items if the eld contains one of the list values. For example: 'select * from data.music where
track.album_artist in ("Elvis", "Beatles", "Santana")' will return tracks recorded by the specied artists.
is null , is not null
not
regex ('') - denes a search term using regex formatting. Regex patterns cannot be used on encrypted elds.

order by - The "order by" clause species a list of elds by which to sort the result objects.

limit - Using the "LIMIT" clause, you may specify the maximum number of returned result objects. If not specied, the default is

  1. The maximum number of results that will be returned is 10000 ; setting a limit higher than 10000 will have no affect on

number of results. If the search is sent with openCursor = true, LIMIT will set the batch size. LIMIT must be the last item in the

query.

"errorCode": 0,
"statusReason": "OK",
"callId": "2222"
}

 Note

You can only search words that are part of a sentence, you cannot search for parts of a word.

start - The "start" clause (not an SQL standard clause) may be used for paging. The clause species the start index from which to

return result objects.

The 'select - from - where - order by' query creates an (internal) indexed list of objects. By using the start & limit clauses, you will

receive a subset of this list, starting with the start index and ending with start+limit index.

Query Optimization

Below are a few points to note regarding query optimization:

. Query execution is based on clause position and is executed from left to right.
. Place clauses that have the greatest impact on records returned at the beginning of your SQL statement. For example, to
retrieve a list of male users over the age of 25:
This is because lt ering rst by gender automatically reduces the result set by half, so the server only needs to run the next
lt er on half of the overall population.
. A NOT clause (NOT or !) is executed on a single statement immediately to it's right, after analyzing the statement. A single
statement can hold several conditions inside parentheses.
. Date ranges are calculated much more efficiently using a timestamp eld rather than a date eld.
. Use of regex is computationally intensive and can signicantly increase response time.
. AND clauses take precedence over OR clauses (i.e., AND clauses are executed before OR clauses).
. Use parentheses to modify default precedence (e.g., to execute an OR operation before an AND operation).

Pagination

When running long queries (>5,000 records returned), it's best practice to paginate your results using cursors. If you do not use

cursors, results are limited to a total of 5,000 records per query (not just per page).

To use cursors, during the rst request, pass query= and openCursor=true. The response will include the

nextCursorId eld, containing a cursor ID to be used in the next request. On subsequent requests, pass cursorId=<last response's

nextCursorId> and do not submit the query again. The absence of the nextCursorId eld in a response indicates the end of the

result set.

When using openCursor, you cannot use 'START'.

 Note

When implementing paging, there is no guarantee that there will be no duplications or that recently added data will show up in
the query results.

 Note

Always prefer accessing data objects directly using their IDs (with ds.get) rather than using search, whenever possible.
Accessing data objects directly using their OIDs is faster and optimal for run-time.
After data is published to the DS, building the indexes is done asynchronously for performance reasons, and may take
up to one second to complete.
Please note, when using a cursor, the number of results in a batch (limit) is not guaranteed.
When querying for large numbers of results (>500) it is Best Practice to use the openCursor and then the cursorId with
the nextCursorId value rather than attempting to page through results using timestamps of the user records.
SELECT * FROM data.userAccounts where gender="male" AND age > 25

Request URL

https://ds./ds.search

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

Where is:

us1.gigya.com - For the US data center.

eu1.gigya.com - For the European data center.

au1.gigya.com - For the Australian data center.

eu2.gigya.com - For the European Azure data center.

cn1.sapcdm.cn - For the Chinese data center.

global.gigya.com - For all Global site groups.

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

Parameters

Required Name Type Description
query string A SQL-like query specifying the
data to retrieve. Please refer to
the Query language
specication section above.
querySig string An HMAC_SHA1 signature
proving that the search call is in
fact coming from your client
application, in order to prevent
fraud. Follow the instructions in
Constructing a Signature using
the following base-string: query
+ "_" + expTime. When using
cursors, this parameter should
only be sent with the initial
request and omitted from
subsequent requests.
This parameter is required only
when calling the search method
from client side (i.e., Mobile
SDKs)
expTime string The GMT time when the
querySig parameter should
expire. The expected format is
the Unix time format (i.e., the
number of seconds since Jan.
1st 1970). Gigya checks the time
when the search request is
received. If the time succeeds
expTime, the request is
considered forged.

Required Name Type Description

This parameter is required only
when calling the search method
from client side (i.e., Mobile
SDKs)
openCursor Boolean When set to true, the search
response will include, in
addition to the rst page,
another eld named
nextCursorId, which is used to
fetch the next batch of results.
This parameter should only be
used on the rst request and
later should be removed from
the request. When openCursor
is true, the Limit clause sets the
number of results returned in
the batch.
cursorId string The cursor ID that contains the
nextCursorId value received in
the rst search call. Note: You
cannot pass both cursorId and
query on the same request -
cursorId brings the next page
for the search for which it was
opened. Also, the time between
search requests using a
cursorId must not exceed 5
minutes.
timeout integer The timeout for the request (in
milliseconds). Default value is
20000 (20 seconds). Maximum

 Note

You cannot use a cursor if
you have a 'group by' or
when using 'start'.

 Note

Each request should contain
a different cursorId obtained
from the response of the
previous request (not the
rst) using the nextCursorId
eld. The exception to this
rule is when a request fails
or when a particular result
set needs to be resent; in
this case, resend the same
cursorID (as long as it has
not expired) to receive its
associated result set.
Required Name Type Description
allowed value is 60000 (60
seconds).
format string Determines the format of the
response.
json (default)
context string/JSON This parameter may be used to
pass data through the current
method and return it,
unchanged, within the
response.
ignoreInterruptions Boolean This may be used in some cases
to suppress logic applied by the
Web SDK, such as automatic
opening of screens (e.g., in a
registration completion
scenario). This parameter may
not be used with REST APIs.
httpStatusCodes Boolean The default value of this
parameter is false, which means
that the HTTP status code in
SAP Customer Data Cloud'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
SAP Customer Data Cloud's
response would reect an error,
if one occurred.

Authorization Parameters

Each REST API request must contain identication and authorization parameters.

Some REST APIs may function without these authorization parameters, however, when that occurs, these calls are treated as

client-side calls and all client-side rate limits will apply. In order to not reach client-side IP rate limits that may impact your

implementation when using server-to-server REST calls, it is Recommended Best Practice to always use an application key and

secret or a bearer token when sending requests. A non-exhaustive list of REST APIs that this may apply to are as follows:

accounts.login
socialize.login
accounts.notifyLogin
socialize.notifyLogin
accounts.nalizeRegistration
accounts.linkAccounts

Please refer to the Authorization Parameters section for details.

Sample Requests

Response Data

Field Type Description
apiVersion integer Denes the API version that returned the
response and may not always be returned.
callId string Unique identier of the transaction, for
debugging purposes.
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.

 Note

As of January 31, 2023, you may no longer use a Partner Secret as a valid authentication method for requests to SAP Customer
Data Cloud servers.
Copyright Disclaimer Privacy Statement Legal Disclosure Trademark Terms of Use
Field Type Description
errorDetails string This eld will appear in the response only in
case of an error and will contain the
exception info, if available.
errorMessage string A short textual description of an error,
associated with the errorCode, for logging
purposes. This eld will appear in the
response only in case of an error.
fullEventName string The full name of the event that triggered
the response. This is an internally used
parameter that is not always returned and
should not be relied upon by your
implementation.
time string The time of the response represented in
ISO 8601 format: yyyy-mm-dd-
Thh:MM:ss.SSSZ (for example, 2021-03-
05T06:11:31.513Z)
statusCode integer The HTTP response code of the operation.
Code '200' indicates success.
This property is deprecated and only
returned for backward compatibility.
statusReason string A brief explanation of the status code.
This property is deprecated and only
returned for backward compatibility.
data Array An array of data objects retrieved from the
DS.
objectsCount integer The number of objects returned in the
"data" array.
totalCount integer The total number of object that satisfy the
query in the DB. This is useful for knowing
how many objects are in the DB, when
fetching limited amount using the "limit"
parameter.
nextCursorId string Used to fetch the next batch of results. This
parameter is not returned on the last batch
of results, its absence means that the result
set is nished.

Response Example

{
"results": [{
"oid": "050",
"lastUpdated": 1344151787611,
"lastUpdatedTime": "2012-08-05T07:29:47Z",
"created": 1344151532974,
"createdTime": "2012-08-05T07:25:32Z",
"data": {
"FN": 7,
"Fn": 7,

"field1": 7, "field2": 7, "field3": 7, "field4": "7", "field5": "7", "field6": "7", "field7": "7", "field8": "7", "field10": "d1_0", "field11": "d1_0", "field12": "d1_0", "field13": "d1_0", "fn": 7 }}, { "oid": "1c675e20f7724c93b9ca82aa7b206b41", "lastUpdated": 1344172297960, "lastUpdatedTime": "2012-08-05T13:11:37Z", "created": 1344172297960, "createdTime": "2012-08-05T13:11:37Z", "data": { "BloodType": "A", "Dislikes": "Evil", "EyeColor": "Brown", "HairColor": "Brown", "Height": "179 cms", "Likes": "Justice", "Occupation": "QA", "Weight": "94.1 kgs" }}, { "UID": "_gid_t6BWv8yeJG6QZyq7Wtav1Q==", "oid": "51b5d8e72c664520a27c7020ff2f1494", "lastUpdated": 1344414722808, "lastUpdatedTime": "2012-08-08T08:32:02Z", "created": 1344414722808, "createdTime": "2012-08-08T08:32:02Z", "data": { "BloodType": "A", "Dislikes": "Evil", "EyeColor": "Brown", "HairColor": "Brown", "Height": "179 cms", "Likes": "Justice", "Occupation": "QA", "Weight": "94.1 kgs" }}, { "oid": "677cc8b3437b40959b9b1288add0a2ec", "lastUpdated": 1344172153286, "lastUpdatedTime": "2012-08-05T13:09:13Z", "created": 1344172153286, "createdTime": "2012-08-05T13:09:13Z", "data": { "BloodType": "A", "Dislikes": "Evil", "EyeColor": "Brown", "HairColor": "Brown", "Height": "179 cms", "Likes": "Justice", "Occupation": "QA", "Weight": "94.1 kgs" }}, { "oid": "8b8972c3b3114db2a0acdfa2617693bf", "lastUpdated": 1344428184385, "lastUpdatedTime": "2012-08-08T12:16:24Z", "created": 1344428184385, "createdTime": "2012-08-08T12:16:24Z", "data": { "BloodType": "A", "Dislikes": "Evil", "EyeColor": "Brown", "HairColor": "Brown",

More Information

ds.search Examples

ds.search Examples REST

Description

This page shows examples using the ds.search REST API.

Examples

. Examples of searching objects by UID:
1.1 First associate an object to a UID using ds.store:
1.2 Search objects by UID:
"Height": "179 cms",
"Likes": "Justice",
"Occupation": "QA",
"Weight": "94.1 kgs"
}},
{
"oid": "super1",
"lastUpdated": 1344172332701,
"lastUpdatedTime": "2012-08-05T13:12:12Z",
"created": 1344172332701,
"createdTime": "2012-08-05T13:12:12Z",
"data": {
"BloodType": "A",
"Dislikes": "Evil",
"EyeColor": "Brown",
"HairColor": "Brown",
"Height": "179 cms",
"Likes": "Justice",
"Occupation": "QA",
"Weight": "94.1 kgs"
}}],
"objectsCount": 9,
"totalCount": 9,
"statusCode": 200,
"errorCode": 0,
"statusReason": "OK",
"callId": "fb5e8b258afc4016ad454cc9fd1d64ec",
"time": "2015-03-22T11:42:25.943Z"
}
ds.store({
data:{bands:{rock:'zeppelin', jazz:'coltrain'}},
type:'music',
oid:'auto',
UID='_gid_PJwNlJ5N11BLPAXIls8ty6mDdjQD6XzMT2+N/zrztsM='
});
SELECT * FROM music WHERE UID='_gid_PJwNlJ5N11BLPAXIls8ty6mDdjQD6XzMT2+N/zrztsM='
1.3 Response to the query:

. Example of a count of objects:

Response to the query:

. Example of a query using limit and start. The query lists 3 elds in a music object where the musician is "U2". The query is limited to 5 results, starting with the 100th valid user.

Response to the query:

. Example of a query using as. The query lists 3 elds in a music object where the musician is "U2". The query will return 5 results, starting with the 100th valid user.

Response to the query:
{
"results": [
{
"data": {
"bands": {
"jazz": "coltrain",
"rock": "zeppelin"
}
},
"lastUpdated": 1419426021590,
"created": 1419426021590,
"lastUpdatedTime": "2014-12-24T13:00:21Z",
"createdTime": "2014-12-24T13:00:21Z",
"UID": "_gid_PJwNlJ5N11BLPAXIls8ty6mDdjQD6XzMT2+N/zrztsM=",
"oid": "3dfaa6836ac64711837cb98e3893007a"
}
],
"objectsCount": 1,
"totalCount": 1,
"statusCode": 200,
"errorCode": 0,
"statusReason": "OK",
"callId": "d126af8d2d21446d867fa67f61cef832"
}
SELECT COUNT(*) FROM music
{"results": [{ "count(*)": 1527}],
"objectsCount": 1,
"totalCount": 1527,
"statusCode": 200,
"errorCode": 0,
"statusReason": "OK",
"callId": "11111"}
SELECT music.trackName, music.album, music.format FROM music WHERE music.musician="U2" LIMIT
{"results": [
{"music": {"trackName": "I will follow", "format": "mp3"} },
{"music": {"trackName": "Into the Heart", "album": "Boy", "format": "mp3" } },
{"music": {"trackName": "The Ocean", "album": "Boy" } },
{"music": {"trackName": "A Day Without Me", "album": "Boy", "format": "mp3" } },
{"music": {"trackName": "Shadowns and Tall Trees", "album": "Boy", "format": "mp3" } } ],
"objectsCount": 5,
"totalCount": 1840,
"statusCode": 200,
"errorCode": 0,
"statusReason": "OK",
"callId": "2222" }
SELECT music.trackName AS Track, music.album AS Disk, music.format AS Extension FROM music WH
Response to the query:

. Example of a query using contains. This query counts pictures of "Madrid":

Response to the query

. Example of a query using regex. This query searches for photos starting with the letter "A".

Response to the query:
{"results": [
{"music": {"Track": "I will follow", "Extension": "mp3" } },
{"music": {"Track": "Into the Heart", "Disk": "Boy", "Extension": "mp3" } },
{"music": {"Track": "The Ocean", "Disk": "Boy" } },
{"music": {"Track": "A Day Without Me", "Disk": "Boy", "Extension": "mp3" } },
{"music": {"Track": "Shadows and Trees","Disk": "Boy", "Extension": "mp3" } } ],
"objectsCount": 5,
"totalCount": 1840,
"statusCode": 200,
"errorCode": 0,
"statusReason": "OK",
"callId": "2222" }
{"results": [
{"music": {"Track": "I will follow", "Extension": "mp3" } },
{"music": {"Track": "Into the Heart", "Disk": "Boy", "Extension": "mp3" } },
{"music": {"Track": "The Ocean", "Disk": "Boy" } },
{"music": {"Track": "A Day Without Me", "Disk": "Boy", "Extension": "mp3" } },
{"music": {"Track": "Shadows and Trees","Disk": "Boy", "Extension": "mp3" } } ],
"objectsCount": 5,
"totalCount": 1840,
"statusCode": 200,
"errorCode": 0,
"statusReason": "OK",
"callId": "2222" }
SELECT COUNT(*) FROM album WHERE album.photo.title CONTAINS "Madrid"
{ "results": [ { "count(*)": 28 } ],
"objectsCount": 1,
"totalCount": 28,
"statusCode": 200,
"errorCode": 0,
"statusReason": "OK",
"callId": "3333" }
SELECT album.photo.title FROM album WHERE album.photo.title = regex('A.*')
{
"results": [{
"album": {
"photo": {
"title:"At the party",
"title": "At the sea",
"industry": "Computer Software" }
}
}, {
"profile": {
"name": "Andy Goslan",
"religion": "Atea",
"industry": "Computer Software" }
}
],
"objectsCount": 2,
"totalCount": 2,
"statusCode": 200,
"errorCode": 0,
"statusReason": "OK",

ds.setSchema REST

Description

This method allows specifying a schema for a data type in Gigya's Data Store (DS). The schema sets eld names, data types,

formatting and encryption as well as client side access restrictions. Data object schemas act as meta-data, guiding Gigya how to

handle the data in the specied elds.

Depending on schema setting, other elds can be added to the storage outside the schema, Gigya will add them as is
without special treatment.
Field deletion: a eld in the Data object schema is eligible for deletion if no data has been saved to it. To delete a eld in the
schema call ds.deleteSchemaFields.
Changes to schema are incremental, when setting the schema for part of the elds, the properties of the omitted elds
remain unchanged.
Unless specied otherwise, schema dened elds are only accessible from the server.

Request URL

https://ds./ds.setSchema

Where is:

us1.gigya.com - For the US data center.

eu1.gigya.com - For the European data center.

au1.gigya.com - For the Australian data center.

eu2.gigya.com - For the European Azure data center.

cn1.sapcdm.cn - For the Chinese data center.

global.gigya.com - For all Global site groups.

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

Parameters

"callId": "1234567"
}

 Note

For security reasons this method is not available for client side SDKs, only for server side SDKs.

 Note

If you plan on integrating the DS, we highly recommend reading the Data Store Guide.
The DS is a premium platform that requires separate activation. If the DS is not part of your site package contact your Gigya
Customer Engagement Executive or email support@gigya-inc.com.
Required Name Type Description
type string A string indicating the type of
the object, equivalent to a
schema name. The objective of
this eld is to classify objects as
sharing the same schema.
dataSchema JSON object A JSON object dening the
schema to be set. See the
format denition of the Schema
Object, below.
format string Determines the format of the
response.
json (default)
httpStatusCodes Boolean The default value of this
parameter is false, which means
that the HTTP status code in
SAP Customer Data Cloud'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
SAP Customer Data Cloud's
response would reect an error,
if one occurred.

Authorization Parameters

Each REST API request must contain identication and authorization parameters.

Some REST APIs may function without these authorization parameters, however, when that occurs, these calls are treated as

client-side calls and all client-side rate limits will apply. In order to not reach client-side IP rate limits that may impact your

implementation when using server-to-server REST calls, it is Recommended Best Practice to always use an application key and

secret or a bearer token when sending requests. A non-exhaustive list of REST APIs that this may apply to are as follows:

accounts.login
socialize.login
accounts.notifyLogin
socialize.notifyLogin
accounts.nalizeRegistration
accounts.linkAccounts

Please refer to the Authorization Parameters section for details.

 Note

As of January 31, 2023, you may no longer use a Partner Secret as a valid authentication method for requests to SAP Customer
Data Cloud servers.

Schema Object

Field Type Description
elds JSON object This object denes properties per data
elds. The object contains eld names and
their corresponding list of properties (see
the example below). The eld name should
be the full path name with dots, i.e.
"work.address".
The properties in option are:
type - Denes the data type of this
eld. The supported values are
"integer", "oat", "boolean",
"string", "date", "long", "text" and
"binary".
When the 'type' property is not
specied the type will be deduced
from the eld name extension or
automatically according to the
content of the rst item. When
dening a 'binary' eld type, it is not
inferred from the data must be
declared explicitly through the
'type' parameter.
Please note that eld's type cannot
be changed after it contains data.
writeAccess - Species whether to
allow unsigned requests to write
into this eld. 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 eld, only if it
wasn't set before.
"clientModify" - Unsigned
requests coming from the
client are allowed to write
into this eld and modify
existing values.
format - Allows assigning a regular
expression that denes the format
of this data eld. Gigya will verify
that data set in this data eld
matches the format. If the data set
in this eld doesn't match the
format, Gigya will not set the data

Field Type Description

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 eld 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 eld, and if
the total number exceeds four
languages, the operation fails.
encrypt - May be applied to string,
basic-string. Passing a value of
'AES' (the encryption standard
applied) sets the eld to encrypted.
When string elds are encrypted,
you may use them in a search (e.g.
using accounts.search) only by
passing an exact match (such as x =
"ABCDE"), and not partial matches
(x CONTAINS "ABC"). String search
values are case sensitive.
If you set the encrypt
property on a eld that
already contains data, the
existing data will remain un-
encrypted. Only new data
will be encrypted.
Once a eld is set to
encrypt, it cannot be
undone.
To encrypt a eld that is not
string or basic-string, use
the
encryptedNonSearchable
parameter instead
To delete a eld from the schema, you
must ensure that data has never been
saved to it (even if said data has been
deleted), it has no dened type, and then

 Note

The only language currently
supported for this functionality
is Japanese.
Field Type Description
set it to null (see "eld6" in the example
below). Saving data to a eld automatically
assigns a type.
Setting a eld's properties to null will reset
the writeAccess property to "serverOnly"
(without deleting the eld), if the eld
contains/contained data and/or has a type
setting.
dynamicSchema Boolean Species 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 elds
that are not dened in the schema to the
DS. The new elds are automatically added
to the dynamic schema. In a strict schema
you can only write into elds that are
already dened in the schema.

Schema Object Example

Sample Requests

{
fields: {
"field1": {
writeAccess:"clientCreate",
format:"regex('/^[a-z0-9_-]{3,16}$/')"
},
"field4": {
type:"float"
},
"field5": {
type:"string",
encrypt:"AES"
},
"field6": null,
"field7": {
type:"text",
languages:["ja"]
}
},
dynamicSchema: false
}

Response Data

Field Type Description
apiVersion integer Denes the API version that returned the
response and may not always be returned.
callId string Unique identier of the transaction, for
debugging purposes.
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.
errorDetails string This eld will appear in the response only in
case of an error and will contain the
exception info, if available.
errorMessage string A short textual description of an error,
associated with the errorCode, for logging
purposes. This eld will appear in the
response only in case of an error.
Copyright Disclaimer Privacy Statement Legal Disclosure Trademark Terms of Use
Field Type Description
fullEventName string The full name of the event that triggered
the response. This is an internally used
parameter that is not always returned and
should not be relied upon by your
implementation.
time string The time of the response represented in
ISO 8601 format: yyyy-mm-dd-
Thh:MM:ss.SSSZ (for example, 2021-03-
05T06:11:31.513Z)
statusCode integer The HTTP response code of the operation.
Code '200' indicates success.
This property is deprecated and only
returned for backward compatibility.
statusReason string A brief explanation of the status code.
This property is deprecated and only
returned for backward compatibility.

Response Example

ds.store REST

Description

Stores an object data in SAP Customer Data Cloud's Data Store (DS). The Data Store is only available for use with fully registered

accounts.

Request URL

https://ds./ds.store

Where is:

us1.gigya.com - For the US data center.

{
"statusCode": 200,
"errorCode": 0,
"statusReason": "OK",
"callId": "31ba039fb8d340ceb2f43d52c89bf187",
"time": "2015-03-22T11:42:25.943Z"
}

 Note

If you plan on integrating the DS, we highly recommend reading the Data Store Guide. The DS is part of the Customer Identity
premium package that requires separate activation. If the DS is not part of your site package contact your SAP Customer Data
Cloud Customer Engagement Executive or email support@gigya-inc.com.

eu1.gigya.com - For the European data center.

au1.gigya.com - For the Australian data center.

eu2.gigya.com - For the European Azure data center.

cn1.sapcdm.cn - For the Chinese data center.

global.gigya.com - For all Global site groups.

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

Parameters

Required Name Type Description
data JSON object Species the data to store. The data object
should be specied as a JSON object
complying with the following restrictions:
A maximum size of 512K of data.
User dened eld names must
begin with a character and may
contain characters, digits and
underscores.
We highly recommend that you give
every eld a type specication by
appending the type to the eld
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 oating point number,
allows exact matching or
range searches.
s - a string only allows
exact matching.
t - a full text search eld,
allows for partial searching
based on keywords.
b - Boolean.
d - a date eld, 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 specied

Required Name Type Description

without a time at all
or without a time
zone)
"YYYY-MM-DD
HH:MM:SS"
When the eld type is not specied
explicitly we will try to auto detect
it. Fields that fail auto detection will
be considered strings.
For example:
{ rstName_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"]}
Important
When saving data as a nested eld, it is
important to save the object in the format
below:
and not as:
DS always returns an object as it was
submitted, this is different than other SAP
Customer Data Cloud schemas, which
expand nested objects automatically.
type string 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.

 Note

When dening a 'binary' eld
type, it is not inferred from the
data, and must be set explicitly
using the 'setSchema' method.
// Correct
{
'a': {
'b': 'value'
}
}
// Incorrect
{
a.b:'value'
}
Required Name Type Description
oid string A unique object identier. If this parameter
is set with the "auto" value, SAP Customer
Data Cloud will generate a unique ID for the
object.
UID string A unique ID of a user. Setting this
parameter associates the data object with
the specied user. The identier of this
object is the compound of oid and UID.
updateBehavior string This parameter denes how to handle
conicting 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.
json (default)
context string/JSON This parameter may be used to pass data
through the current method and return it,
unchanged, within the response.
ignoreInterruptions Boolean This may be used in some cases to
suppress logic applied by the Web SDK,
such as automatic opening of screens (e.g.,
in a registration completion scenario). This
parameter may not be used with REST
APIs.
httpStatusCodes Boolean The default value of this parameter is false,
which means that the HTTP status code in
SAP Customer Data Cloud'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 SAP Customer Data Cloud's
response would reect an error, if one
occurred.

Authorization Parameters

Each REST API request must contain identication and authorization parameters.

Some REST APIs may function without these authorization parameters, however, when that occurs, these calls are treated as

client-side calls and all client-side rate limits will apply. In order to not reach client-side IP rate limits that may impact your

implementation when using server-to-server REST calls, it is Recommended Best Practice to always use an application key and

secret or a bearer token when sending requests. A non-exhaustive list of REST APIs that this may apply to are as follows:

accounts.login
socialize.login
accounts.notifyLogin
socialize.notifyLogin
accounts.nalizeRegistration
accounts.linkAccounts

Please refer to the Authorization Parameters section for details.

Sample Requests

 Note

As of January 31, 2023, you may no longer use a Partner Secret as a valid authentication method for requests to SAP Customer
Data Cloud servers.

Response Data

Field Type Description
apiVersion integer Denes the API version that returned the
response and may not always be returned.
callId string Unique identier of the transaction, for
debugging purposes.
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.
errorDetails string This eld will appear in the response only in
case of an error and will contain the
exception info, if available.
errorMessage string A short textual description of an error,
associated with the errorCode, for logging
purposes. This eld will appear in the
response only in case of an error.
Copyright Disclaimer Privacy Statement Legal Disclosure Trademark Terms of Use
Field Type Description
fullEventName string The full name of the event that triggered
the response. This is an internally used
parameter that is not always returned and
should not be relied upon by your
implementation.
time string The time of the response represented in
ISO 8601 format: yyyy-mm-dd-
Thh:MM:ss.SSSZ (for example, 2021-03-
05T06:11:31.513Z)
statusCode integer The HTTP response code of the operation.
Code '200' indicates success.
This property is deprecated and only
returned for backward compatibility.
statusReason string A brief explanation of the status code.
This property is deprecated and only
returned for backward compatibility.
oid string The object's unique identier. The value is
either the oid parameter that you specied
in the API call or a unique string generated
by SAP Customer Data Cloud (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"
}
Go to top
X (Twitter)
Discord community
GitHub discussions
YouTube channel
Bluesky
Product
FeaturesPricing
Developers
DocsStatusAPI ExamplesNPM Package Examples
Explore
ShowcaseTemplatesNewest ValsTrending ValsNewsletter
Company
AboutBlogCareersBrandhi@val.town
Terms of usePrivacy policyAbuse contact
© 2025 Val Town, Inc.