diff --git a/system_admin_account_operations.yaml b/system_admin_account_operations.yaml index 99adad6..725b12c 100644 --- a/system_admin_account_operations.yaml +++ b/system_admin_account_operations.yaml @@ -236,6 +236,23 @@ components: type: boolean example: "false" description: Set this to `true` to export the base without assets. Default is `false`. + group_by: + name: group_by + in: query + schema: + type: string + enum: [owner, org_id] + required: true + description: Query by owner or organization + example: "owner" + date_YYYY_MM_DD: + name: date + in: query + schema: + type: string + required: true + description: A date string in YYYY-MM-DD format + example: "2025-01-01" #=======================Path parameters=======================# base_uuid: @@ -468,6 +485,9 @@ components: asset_quota_mb: type: string description: The asset quota in MB. + automation_limit_per_month: + type: integer + description: Monthly limit on the number of automated rules file: type: string format: binary @@ -808,6 +828,8 @@ paths: $ref: "#/components/schemas/quota_total" asset_quota_mb: $ref: "#/components/schemas/asset_quota_mb" + automation_limit_per_month: + $ref: "#/components/schemas/automation_limit_per_month" security: - AccountTokenAuth: [] parameters: @@ -834,6 +856,7 @@ paths: create_time: "2020-11-18T12:30:31+00:00" role: default update_status_tip: "" + automation_limit_per_month: 1000 delete: tags: - Users @@ -1969,6 +1992,8 @@ paths: $ref: "#/components/schemas/max_user_number" asset_quota_mb: $ref: "#/components/schemas/asset_quota_mb" + automation_limit_per_month: + $ref: "#/components/schemas/automation_limit_per_month" security: - AccountTokenAuth: [] parameters: @@ -1995,6 +2020,7 @@ paths: max_user_number: 3 rows_count: 7185 row_limit: -1 + automation_limit_per_month: 1000 get: tags: - Teams @@ -4096,6 +4122,51 @@ paths: latest_visit_at: "2022-07-02T14:09:37+00:00" org_name: SeaTable GmbH count: 1 + /api/v2.1/admin/statistics/ai/: + get: + tags: + - Statistics + summary: Get AI statistics by owner/team + operationId: getOwnerOrTeamAIStatistics + description: Get AI usage statistics monthly by owner/team. + security: + - AccountTokenAuth: [] + parameters: + - $ref: "#/components/parameters/group_by" + - $ref: "#/components/parameters/date_YYYY_MM_DD" + - $ref: "#/components/parameters/page" + - $ref: "#/components/parameters/per_page" + responses: + "200": + description: OK + content: + application/json: + schema: + type: object + examples: + group_by_owner: + summary: Query group by owner + value: + results: + - org_id: 176 + org_name: SeaTable + owner: 1@seafile_group + group_name: group-11 + total_cost: 0.25 + is_department_v2_group: false + - org_id: 176 + org_name: SeaTable + owner: d15ebe61bd684b868344498c73bdeac4@auth.local + nickname: test + count: 2 + group_by_team: + summary: Query group by organization + value: + results: + - org_id: 176 + org_name: SeaTable + total_cost: 0.25 + count: 1 # Maintenance /api/v2.1/admin/dtable/{base_uuid}/repair/: diff --git a/team_admin_account_operations.yaml b/team_admin_account_operations.yaml index b24dd47..2e3afca 100644 --- a/team_admin_account_operations.yaml +++ b/team_admin_account_operations.yaml @@ -121,6 +121,23 @@ components: example: user description: Filter by a specific operation group. By default, all operations are returned. required: false + group_by: + name: group_by + in: query + schema: + type: string + enum: [owner, dtable_uuid] + required: true + description: Query by owner or Base + example: "owner" + date: + name: date + in: query + schema: + type: string + required: true + description: A date string in YYYY-MM-DD format + example: "2025-01-01" #=======================Path parameters=======================# org_id: @@ -2434,6 +2451,49 @@ paths: successful_runs: 4 unsuccessful_runs: 0 total_count: 2 + /api/v2.1/org/{org_id}/admin/statistics/ai/: + get: + tags: + - Statistics + summary: Get AI statistics by user/base + operationId: getUserOrBaseAIStatistics + description: Get AI usage statistics monthly by user/base. + security: + - AccountTokenAuth: [] + parameters: + - $ref: "#/components/parameters/group_by" + - $ref: "#/components/parameters/date" + - $ref: "#/components/parameters/page" + - $ref: "#/components/parameters/per_page" + - $ref: "#/components/parameters/org_id" + responses: + "200": + description: OK + content: + application/json: + schema: + type: object + examples: + group_by_owner: + summary: Query group by owner + value: + results: + - owner: 1@seafile_group + total_cost: 0.15 + group_name: group-11 + - owner: d15ebe61bd684b868344498c73bdeac4@auth.local + total_cost: 0.2 + nickname: test + count: 2 + group_by_base: + summary: Query group by base + value: + results: + - dtable_uuid: f0e6f53caee749b1a5eb65cb2991d6bb + owner: 1@seafile_group + total_cost: 0.04 + group_name: group-11 + count: 1 /api/v2.1/org/{org_id}/admin/org-logo/: post: