Skip to main content

Analysis API

SaaSus Analysis API Schema (1.0.0)

SaaSus Analysis API Schema

userAnalysis

User Behavior Analysis

Analysis of user behavior on the day

Analysis of user behavior on the day.

Authorizations:
Bearer
Request Body schema: application/json
timestamp
required
integer (Date subject to renewal)

Date subject to renewal

user_id
required
string (Uuid)
required
Array of objects (UserBehaviorHistory)

user behavior history list

Responses

Request samples

Content type
application/json
{
  • "timestamp": 1640995200,
  • "user_id": "69e732d6-8ecc-45c4-c2eb-8438f7ffe775",
  • "histories": []
}

Response samples

Content type
application/json
{
  • "type": "permission_denied",
  • "message": "Error message"
}

Acquisition of user behavior history

Obtain user activity history for the past month.

Authorizations:
Bearer
path Parameters
user_id
required
string
Example: f94bfffc-8be2-11ec-b41a-0242ac120004

User ID

Responses

Response samples

Content type
application/json
{}

Get daily or monthly active users

Get daily or monthly active users information.

Authorizations:
Bearer
query Parameters
type
required
string
Enum: "monthly" "daily"

Type of active users data (monthly or daily)

date_from
required
string
Example: date_from=2025-01

Start date (YYYY-MM for monthly, YYYY-MM-DD for daily)

date_to
string
Example: date_to=2025-12

End date (YYYY-MM for monthly, YYYY-MM-DD for daily). Optional.

tenant_id
string (Uuid)
Example: tenant_id=69e732d6-8ecc-45c4-c2eb-8438f7ffe775

Tenant ID (optional)

env_id
integer (Id)
Example: env_id=1

Environment ID (optional, requires tenant_id)

Responses

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Update or insert active users data

Update or insert daily or monthly active users data.

Authorizations:
Bearer
Request Body schema: application/json
required
type
required
string (Type)
Enum: "daily" "monthly"

Type of active users data (monthly or daily)

date
required
string (Date)

Date (YYYY-MM for monthly, YYYY-MM-DD for daily)

tenant_id
required
string (Uuid)
env_id
required
integer (Id)
active_users
required
integer (Active Users Count)

Number of active users

Responses

Request samples

Content type
application/json
{
  • "type": "daily",
  • "date": "2025-01-01",
  • "tenant_id": "69e732d6-8ecc-45c4-c2eb-8438f7ffe775",
  • "env_id": 1,
  • "active_users": 100
}

Response samples

Content type
application/json
{
  • "type": "permission_denied",
  • "message": "Error message"
}

metrics

Metrics Analysis

Get aggregated metrics

Get aggregated metrics by type and date range.

Authorizations:
Bearer
query Parameters
metrics_type
required
string
Enum: "create_tenant" "create_saas_user" "create_tenant_user"
Example: metrics_type=create_tenant

Metrics type

start_date
required
string
Example: start_date=2025-01-01

Start date (YYYY-MM-DD)

end_date
required
string
Example: end_date=2025-01-31

End date (YYYY-MM-DD)

tenant_ids
Array of strings
Example: tenant_ids=f94bfffc-8be2-11ec-b41a-0242ac120004

Tenant IDs

Responses

Response samples

Content type
application/json
{
  • "metrics": [
    ]
}

Get Page Statistics

Get page statistics for the specified period.

Authorizations:
Bearer
query Parameters
start_timestamp
required
integer
Example: start_timestamp=1701388800

Start timestamp of statistics period (UNIX timestamp)

end_timestamp
required
integer
Example: end_timestamp=1704067199

End timestamp of statistics period (UNIX timestamp)

Responses

Response samples

Content type
application/json
{
  • "start_date": 1701388800,
  • "end_date": 1704067199,
  • "total_page_views": 15420,
  • "total_unique_users": 1234,
  • "page_statistics": []
}

Get aggregated userinfo call count

Get aggregated userinfo API call count by date range and tenants.

Authorizations:
Bearer
query Parameters
start_date
required
string
Example: start_date=2025-01-01

Start date (YYYY-MM-DD)

end_date
required
string
Example: end_date=2025-01-31

End date (YYYY-MM-DD)

tenant_ids
Array of strings
Example: tenant_ids=f94bfffc-8be2-11ec-b41a-0242ac120004

Tenant IDs

Responses

Response samples

Content type
application/json
{
  • "metrics": [
    ]
}