Uploads site for a specified subdomain.
POST/api/site
Warning: Old files will be removed after successful upload.
The cleanup task is configured with CLEAN_OBSOLETE_INTERVAL
env
If upload fails then old files will be preserved.
If upload fails on th stage of extracting zips then
new subdomain will be associated with user
Upload guard checks amount of uploads available for user.
The guard is configured with MAX_SITES_PER_USER
env.
Request
Header Parameters
x-subdomain header represents name of subdomain to call action on
- multipart/form-data
Body
required
Responses
- 204
- 400
- 401
- 403
- 404
- 500
Site was successfully uploaded
The 'x-subdomain' header is missing or contains invalid characters.
- application/json
- Schema
- Example (from schema)
Schema
This field will contain error information
{
"reason": "string"
}
Unauthorized: The JWT in the header is invalid or expired.
- application/json
- Schema
- Example (from schema)
Schema
This field will contain error information
{
"reason": "string"
}
Forbidden: The subdomain is owned by another user.
- application/json
- Schema
- Example (from schema)
Schema
This field will contain error information
{
"reason": "string"
}
Not Found: The login or subdomain was not found. See details for more information.
- application/json
- Schema
- Example (from schema)
Schema
This field will contain error information
{
"reason": "string"
}
Internal Server Error: An error occurred on the server.
- application/json
- Schema
- Example (from schema)
Schema
This field will contain error information
{
"reason": "string"
}