Create Workspace
Create a new workspace with optional limits on packages, bandwidth, and storage.
- Endpoint:
https://api.repoflow.io/workspace
- Method: POST
- Authorization: System admin only
Request Parameters
Parameter | Type | Required | Description |
---|---|---|---|
name | string | Yes | The name of the workspace. |
packageLimit | number | No | Maximum number of packages allowed. If left null, there is no package limit. |
bandwidthLimit | number | No | Bandwidth limit in bytes for the workspace. If left null, there is no limit. |
storageLimit | number | No | Storage limit in bytes for the workspace. If left null, there is no limit. |
comments | string | No | Optional comments or notes about the workspace (maximum 50 characters allowed). |
Example Request
POST https://api.repoflow.io/workspace
Content-Type: application/json
Authorization: Bearer <admin-token>
{
"name": "example-workspace",
"packageLimit": 100,
"bandwidthLimit": 5000000,
"storageLimit": 1000000
}
Example Response
{
"workspaceId": "92bbfdcf-78e9-43ac-be77-0076c718b295"
}
Error Response
-
Status Code: 401 UNAUTHORIZED
- Description: Unauthorized access. Only system admins are allowed to create workspaces.
-
Status Code: 500 INTERNAL SERVER ERROR
- Description: An error occurred while creating the workspace.
Notes
- Leaving
packageLimit
,bandwidthLimit
, orstorageLimit
as null will result in no limit being set for that parameter. - Ensure the user has system admin privileges to use this endpoint.
- Invalid parameters or missing required fields will result in validation errors.