Skip to main content
POST

Rate Limit

The rate limits are at the workspace level. A maximum of 5 requests per second, 15 requests per minute, and 100 requests per hour are allowed per workspace.

承認

Authorization
string
header
必須

Authentication is done via Basic Auth. This requires a Base64-encoded string of your credentials in the format username:password.

  • Username: Use your MoEngage Workspace ID (also known as the App ID). Find it in the MoEngage dashboard at Settings > Account > API keys.
  • Password: Use an API key from Settings > Account > API keys.

Refer to API Key Dashboard for details on creating and managing API keys.

ボディ

application/json

Request body for registering a User Property Analysis (UPA) query.

version
string
必須

Payload schema version.

例:

"2.0"

type
enum<string>
必須

The analysis type. Must be user_analysis for this endpoint.

利用可能なオプション:
user_analysis
analysis_type
enum<string>
必須

The user-property computation to run — total_count (all users in scope), distinct_count (distinct values of the attribute), distribution (how users are spread across the attribute's values, using automatic or custom buckets), aggregation (sum, minimum, maximum, average, median, or percentile), or email_domain_analysis.

利用可能なオプション:
total_count,
distinct_count,
distribution,
aggregation,
email_domain_analysis
例:

"distribution"

user_properties
object[]
必須

The user attributes to analyze. Include 1 to 5 properties. When more than one is provided, results are cross-tabulated across them.

Required array length: 1 - 5 elements
segmentation
object[]
必須

Segments used to scope the analysis to a subset of users. Include up to 5 segments. To analyze all users, pass a single segment with the All Users custom segment.

Maximum array length: 5
distribution
object
必須

Distribution configuration. Custom distributions apply to numerical attributes only. Use type: auto for automatic bucketing.

例:
timerange
object
必須

The time window the analysis runs over.

granularity
enum<string>
必須

Time bucket for the series — d (day), w (week), m (month), y (year), or e (entire range).

利用可能なオプション:
d,
w,
m,
y,
e
例:

"e"

chart_type
enum<string>
必須

Visual representation of the result.

利用可能なオプション:
line,
area,
bar,
column,
euler,
pie
例:

"column"

count_type
enum<string>
必須

Whether metrics are returned as absolute counts (number) or as percentages (percentage).

利用可能なオプション:
number,
percentage
例:

"number"

split_by
object[]
必須

Attributes to break the result down by. Include up to 10.

Maximum array length: 10
例:
chart_sort_type
enum<string>

Sort order applied to the result series.

利用可能なオプション:
ascending,
descending

レスポンス

Query registered. Poll status and fetch results with data.request_id.

Acknowledgement that a query was registered. Use data.request_id to poll status and fetch results.

response_id
string

A unique identifier for the response, useful for correlating logs and support requests.

例:

"fc803857-632e-4bf0-8df1-fbc2bdeedb66"

type
string

The analysis type echoed back for the registered query.

data
object