GraphQL queries
Last updated
Was this helpful?
Was this helpful?
# Return the UserPoint creation_ts field
query MyQuery {
user_point(user_point_id: "xxxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx") {
creation_ts
}
}# Return profiles, accounts, segments and scenarios data of a UserPoint
# Warning: This query relies on a customer defined schema so it may not
# work as-is on your datamart.
query MyQuery {
user_point(user_point_id: "xxxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx") {
id
creation_ts
profiles {
gender
birth_date
}
accounts {
compartment_id
user_account_id
}
segments {
id
}
scenarios {
scenario_id
}
}
}# Select by UserPoint ID
query MyQuery {
user_point(user_point_id: "xxxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx") {
id
creation_ts
}
}
# Select by email hash
query MyQuery {
user_point_by_email_hash(email_hash: "xxxxxxxxxxxxxxxxxxx") {
id
creation_ts
}
}
# Select by user account
# Both compartment ID and user account ID are mandatory
query MyQuery {
user_point_by_user_account_id(
compartment_id: "XXXX",
user_account_id: "xxxx-xxx-xx-xxxxx"
) {
id
creation_ts
}
}
# Select by user agent ID
query MyQuery {
user_point_by_user_agent_id(user_agent_id: "xxxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx"){
id
creation_ts
}
}query micsQuery {
user_point(user_point_id:"xxx") {
activities {
#only return events with the name "$home_view"
events @filter(clause: "name == \"$home_view\""){
ts
}
}
}
}