Skip to main content

Create Platform

Create a new deployment platform for organizing application releases with configurable updaters.

warning

After creating the first platform, the platform field becomes required for all subsequent operations.

Endpoint

POST /platform/create

Authentication

HeaderValue
AuthorizationBearer <jwt_token>

Request Body

The request uses application/json format with the following fields:

FieldTypeRequiredDescription
platformstringName of the platform (e.g., linux, darwin, windows)
updatersarrayArray of updater configurations (see Updater Configuration below)

Updater Configuration

Each updater in the array should have the following structure:

FieldTypeRequiredDescription
typestringUpdater type: manual, squirrel_darwin, squirrel_windows, electron-builder
defaultbooleanWhether this updater is the default (only one can be default)

Supported Updater Types

TypeDescription
manualStandard FaynoSync update flow (default if none specified)
squirrel_darwinSquirrel macOS update mechanism
squirrel_windowsSquirrel Windows update mechanism
electron-builderElectron Builder update mechanism

Example Requests

Basic Platform Creation (Manual Updater Default)

curl --location 'http://localhost:9000/platform/create' \
--header 'Authorization: Bearer <jwt_token>' \
--header 'Content-Type: application/json' \
--data '{
"platform": "linux"
}'

Platform with Multiple Updaters

curl --location 'http://localhost:9000/platform/create' \
--header 'Authorization: Bearer <jwt_token>' \
--header 'Content-Type: application/json' \
--data '{
"platform": "windows",
"updaters": [
{"type": "manual", "default": true},
{"type": "squirrel_windows", "default": false},
{"type": "electron-builder"}
]
}'

Platform with Electron Builder as Default

curl --location 'http://localhost:9000/platform/create' \
--header 'Authorization: Bearer <jwt_token>' \
--header 'Content-Type: application/json' \
--data '{
"platform": "darwin",
"updaters": [
{"type": "manual"},
{"type": "squirrel_darwin", "default": true}
]
}'

Response

Success Response (200 OK)

{
"createPlatformResult.Created": "641459ffb8360d74164e7e3c"
}

Response Fields

FieldTypeDescription
createPlatformResult.CreatedstringThe unique identifier (ID) of the created platform

Notes

  • Default Updater: If no updaters are specified, manual will be automatically set as the default
  • Single Default: Only one updater can be set as default per platform
  • Updater Compatibility: Choose updaters that match your application's update mechanism
  • Platform Organization: Platforms help organize different operating system targets and update strategies