Analysis API
SaaSus Analysis API Schema (1.0.0)
SaaSus Analysis API Schema
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
- Payload
Content type
application/json
{- "timestamp": 1640995200,
- "user_id": "69e732d6-8ecc-45c4-c2eb-8438f7ffe775",
}Response samples
- 500
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
- 200
- 500
Content type
application/json
{- "histories": [
- {
- "behaved_at": 1640995200,
}
]
}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
- 200
- 400
- 500
Content type
application/json
{- "metrics": [
- {
- "date": "2025-01-01",
- "count": 100,
- "details": {
- "19045586-d4b0-418a-8e51-b6346380cd63": 40,
- "fa3018b1-1be3-49ca-9ea7-d6d657d0f878": 60
}
}
]
}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
- 200
- 500
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
- 200
- 400
- 500
Content type
application/json
{- "metrics": [
- {
- "date": "2025-01-01",
- "details": {
- "00000000-0000-0000-0000-000000000000": 1460,
- "0d7de8a8-1234-5678-9abc-def012345678": 1040,
- "252a9f83-1234-5678-9abc-def012345678": 930
}
}
]
}