Default¶
Index¶
GET /
Responses¶
| Status | Meaning | Description |
|---|---|---|
| 200 | OK | Successful Response |
Ready¶
GET /health/ready
Readiness probe endpoint.
Responses¶
| Status | Meaning | Description |
|---|---|---|
| 200 | OK | Successful Response |
Hub Names¶
GET /hub-names
Endpoint to query hub names.
Parameters¶
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| from | query | any | false | Start date in YYYY-MM-DDTHH:MMZ format |
| to | query | any | false | End date in YYYY-MM-DDTHH:MMZ format |
Responses¶
| Status | Meaning | Description |
|---|---|---|
| 200 | OK | Successful Response |
| 422 | Unprocessable Entity | Validation Error |
Component Names¶
GET /component-names
Endpoint to serve component names.
Responses¶
| Status | Meaning | Description |
|---|---|---|
| 200 | OK | Successful Response |
Total Costs¶
GET /total-costs
Endpoint to query total costs.
Parameters¶
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| from | query | any | false | Start date in YYYY-MM-DDTHH:MMZ format |
| to | query | any | false | End date in YYYY-MM-DDTHH:MMZ format |
Responses¶
| Status | Meaning | Description |
|---|---|---|
| 200 | OK | Successful Response |
| 422 | Unprocessable Entity | Validation Error |
User Groups¶
GET /user-groups
Endpoint to serve user group memberships.
Parameters¶
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| from | query | any | false | Start date in YYYY-MM-DDTHH:MMZ format |
| to | query | any | false | End date in YYYY-MM-DDTHH:MMZ format |
| hub | query | any | false | Name of the hub to filter results |
| username | query | any | false | Name of the user to filter results |
| usergroup | query | any | false | Name of the group to filter results |
Responses¶
| Status | Meaning | Description |
|---|---|---|
| 200 | OK | Successful Response |
| 422 | Unprocessable Entity | Validation Error |
Users With Multiple Groups¶
GET /users-with-multiple-groups
Endpoint to serve users with multiple groups.
Parameters¶
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| hub_name | query | any | false | Name of the hub to filter results |
| user_name | query | any | false | Name of the user to filter results |
Responses¶
| Status | Meaning | Description |
|---|---|---|
| 200 | OK | Successful Response |
| 422 | Unprocessable Entity | Validation Error |
Users With No Groups¶
GET /users-with-no-groups
Endpoint to serve users with no groups.
Parameters¶
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| hub_name | query | any | false | Name of the hub to filter results |
| user_name | query | any | false | Name of the user to filter results |
Responses¶
| Status | Meaning | Description |
|---|---|---|
| 200 | OK | Successful Response |
| 422 | Unprocessable Entity | Validation Error |
Total Costs Per Hub¶
GET /total-costs-per-hub
Endpoint to query total costs per hub.
Parameters¶
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| from | query | any | false | Start date in YYYY-MM-DDTHH:MMZ format |
| to | query | any | false | End date in YYYY-MM-DDTHH:MMZ format |
Responses¶
| Status | Meaning | Description |
|---|---|---|
| 200 | OK | Successful Response |
| 422 | Unprocessable Entity | Validation Error |
Total Costs Per Component¶
GET /total-costs-per-component
Endpoint to query total costs per component.
Parameters¶
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| from | query | any | false | Start date in YYYY-MM-DDTHH:MMZ format |
| to | query | any | false | End date in YYYY-MM-DDTHH:MMZ format |
| hub | query | any | false | Name of the hub to filter results |
| component | query | any | false | Name of the component to filter results |
Responses¶
| Status | Meaning | Description |
|---|---|---|
| 200 | OK | Successful Response |
| 422 | Unprocessable Entity | Validation Error |
Total Costs Per Group¶
GET /total-costs-per-group
Endpoint to query total costs per user group.
Parameters¶
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| from | query | any | false | Start date in YYYY-MM-DDTHH:MMZ format |
| to | query | any | false | End date in YYYY-MM-DDTHH:MMZ format |
Responses¶
| Status | Meaning | Description |
|---|---|---|
| 200 | OK | Successful Response |
| 422 | Unprocessable Entity | Validation Error |
Costs Per User¶
GET /costs-per-user
Endpoint to query costs per user by combining AWS costs with Prometheus usage data.
This endpoint calculates individual user costs by:
Getting total AWS costs per component (compute, storage) from Cost Explorer
Getting usage fractions per user from Prometheus metrics
Multiplying total costs by each user’s usage fraction
Query Parameters: from (str): Start date in YYYY-MM-DD format (defaults to 30 days ago) to (str): End date in YYYY-MM-DD format (defaults to current date) hub (str, optional): Filter to specific hub namespace component (str, optional): Filter to specific component (compute, home storage) user (str, optional): Filter to specific user usergroup (str, optional): Filter to specific user group limit (int, optional): Limit number of results to top N users by total cost.
Returns: List of dicts with keys: date, hub, component, user, value (cost in USD) Results are sorted by date, hub, component, then value (highest cost first)
Parameters¶
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| from | query | any | false | Start date in YYYY-MM-DDTHH:MMZ format |
| to | query | any | false | End date in YYYY-MM-DDTHH:MMZ format |
| hub | query | any | false | Name of the hub to filter results |
| component | query | any | false | Name of the component to filter results |
| user | query | any | false | Name of the user to filter results |
| usergroup | query | any | false | Name of user group to filter results |
| limit | query | any | false | Limit number of results to top N users by total cost. |
Responses¶
| Status | Meaning | Description |
|---|---|---|
| 200 | OK | Successful Response |
| 422 | Unprocessable Entity | Validation Error |
Total Usage¶
GET /total-usage
Endpoint to query total usage. Expects ‘from’ and ‘to’ query parameters in the api_provider YYYY-MM-DD. Optionally accepts ‘hub’, ‘component’ and ‘user’, query parameters.
Parameters¶
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| from | query | any | false | Start date in YYYY-MM-DDTHH:MMZ format |
| to | query | any | false | End date in YYYY-MM-DDTHH:MMZ format |
| hub | query | any | false | Name of the hub to filter results |
| component | query | any | false | Name of the component to filter results |
| user | query | any | false | Name of the user to filter results |
Responses¶
| Status | Meaning | Description |
|---|---|---|
| 200 | OK | Successful Response |
| 422 | Unprocessable Entity | Validation Error |