openapi spec: add some documentation about the Vhost record

This commit is contained in:
Armaël Guéneau 2025-02-24 11:33:36 +01:00
parent af9d913dbb
commit a0e5c1020b

View file

@ -15,7 +15,21 @@ paths:
operationId: "ListWebsites"
summary: "List all websites"
description: |
List all the user's websites
List all the user's websites.
Also includes information about global quotas for the user, and for each website, bucket names and website URL.
- `username`: the name of the user making the request.
- `quota_website_count` indicates the quota of the number of websites that the user is allowed to create.
- Website size is set at 100MB by default, and users can increase this quota autonomously up to a certain value defined by `burst_bucket_quota_size`, by default it's set to 200MB but it can be overriden on a per-user basis.
- Each element of the `vhosts` array describes a website. A website is described by:
+ `name`: current main name of the website, which determines the URL it can be accessed from (specified in `domain`). This is also a name of the S3 bucket storing the website.
+ `alt_name`: an array of aliases for the website. These can also be used to access the S3 bucket storing the website (a bucket can have several aliased names), but cannot be used in a URL to access the website.
+ `expanded`: whether the bucket name already corresponds to a full URL for the website
+ `domain`: the URL at which the website can be reached
responses:
'500':
description: |
@ -23,7 +37,6 @@ paths:
'200':
description: |
Returns information about all the user's websites, and user information related to websites.
The website quota (`quota_website_count`) indicates a quota in number of websites that the user is allowed to create. Website size is set at 100MB by default, and users can increase this quota autonomously up to a certain value defined by `burst_bucket_quota_size`, by default it's set to 200MB but it can be overriden on a per-user basis.
content:
application/json:
schema:
@ -58,10 +71,13 @@ paths:
summary: "Details on a website"
description: |
Gets the configuration and status for the website `vhost`.
This includes information about domains, bucket access keys, and quotas.
This includes information about bucket names, domains, bucket access keys, and quotas.
`quota_size` is given in bytes.
`quota_files` indicates a number of files.
- `vhost` contains informations about bucket names and the website URL. See the documentation of the response of "List all websites" for more information
- `access_key_id`: the S3 access key id for the bucket
- `secret_access_key`: the S3 secret access key for the bucket
- `quota_size`: the quota for the size of the website, in bytes.
- `quota_files`: the quota for the number of files.
responses:
'500':
description: |
@ -97,7 +113,7 @@ paths:
Request forbidden, you have reached your quota of maximum number of websites allowed.
'200':
description: |
Returns information about the website that has been created.
Returns information about the website that has been created. (See the documentation of "Details on a website" for more info.)
content:
application/json:
schema:
@ -144,7 +160,7 @@ paths:
Website not found
'200':
description: |
Returns updated information about the website
Returns updated information about the website. (See the documentation of "Details on a website" for more info.)
content:
application/json:
schema: