Skip to main content

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

ParameterTypeRequiredDescription
namestringYesThe name of the workspace.
packageLimitnumberNoMaximum number of packages allowed. If left null, there is no package limit.
bandwidthLimitnumberNoBandwidth limit in bytes for the workspace. If left null, there is no limit.
storageLimitnumberNoStorage limit in bytes for the workspace. If left null, there is no limit.
commentsstringNoOptional 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, or storageLimit 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.