mattermost/api/v4/source/usage.yaml
Daniel Espino García 55496c07c1
Update API docs (#36302)
* Update API docs

* Coderabbit comments

* Address feedback

* Address feedback

* Coderabbit feedback
2026-05-11 12:29:25 +02:00

81 lines
2.4 KiB
YAML

/api/v4/usage/posts:
get:
tags:
- usage
summary: Get current usage of posts
description: >
Retrieve rounded off total no. of posts for this instance.
Example: returns 4000 instead of 4321
##### Permissions
Must be authenticated.
__Minimum server version__: 7.0
operationId: GetPostsUsage
responses:
"200":
description: Total no. of posts returned successfully
content:
application/json:
schema:
$ref: "#/components/schemas/PostsUsage"
"401":
$ref: "#/components/responses/Unauthorized"
"500":
$ref: "#/components/responses/InternalServerError"
/api/v4/usage/storage:
get:
tags:
- usage
summary: Get the total file storage usage for the instance in bytes.
description: >
Get the total file storage usage for the instance in bytes rounded down to the most significant digit.
Example: returns 4000 instead of 4321
##### Permissions
Must be authenticated.
__Minimum server version__: 7.1
operationId: GetStorageUsage
responses:
"200":
description: The total file storage usage for the instance in bytes rounded down to the most significant digit.
content:
application/json:
schema:
$ref: "#/components/schemas/StorageUsage"
"401":
$ref: "#/components/responses/Unauthorized"
"500":
$ref: "#/components/responses/InternalServerError"
/api/v4/usage/teams:
get:
tags:
- usage
summary: Get current usage of teams
description: >
Retrieve rounded total number of teams for this instance.
##### Permissions
Must be authenticated.
operationId: GetTeamsUsage
responses:
"200":
description: Total number of teams returned successfully
content:
application/json:
schema:
type: object
properties:
active:
type: integer
cloud_archived:
type: integer
teams:
type: integer
"401":
$ref: "#/components/responses/Unauthorized"
"500":
$ref: "#/components/responses/InternalServerError"