Git

Create a durable source workspace

Create a workspace without a local checkout. Send a unique operationId in the request body. Reuse that operationId and the exact input after an uncertain response. Read the workspace ID from data.workspace.id in the API response. Use this ID as workspaceId in later requests.

The API uses saved source when it exists. Otherwise, omit originalUploadVersionId to import the current eligible direct upload. Send the field only to pin a known eligible upload. If neither source exists, the API creates an empty baseline. This action does not deploy or change the live version.

post/v1/spaces/{spaceId}/source/workspaces

Request

  • Base URL: https://api.spacefast.com
  • URL: https://api.spacefast.com/v1/spaces/{spaceId}/source/workspaces
  • Auth: one of:
    • HTTP bearer
    • OAuth 2 (authorization code, authorization URL https://api.spacefast.com/v1/auth/oauth2/authorize, token URL https://api.spacefast.com/v1/auth/oauth2/token; client credentials, token URL https://api.spacefast.com/v1/auth/oauth2/token, scopes: spaces:write, spaces:read)

Path parameters

spaceIdstring required

Request body

operationIdstring required

Unique ID for this operation. Reuse this ID and the same input after an uncertain response.

namestring
targetBranchstring

Existing project branch. Defaults to the production branch.

originalUploadVersionIdstring

Pinned eligible direct upload to import if this Space has no saved source. Omit to import the current eligible direct upload automatically. Never send a build output version.

Response

Response for status 200

$schemastring uri

Canonical JSON Schema URL for this response body. The server also sends it in the Link: rel="describedby" response header.

Changes

No recorded changes to this operation across all 1 revision of this API.