Skip to content

Startup Template routes: extend, promote, upgrade

The Startup Template Verbs extend, promote, upgrade as api.sb routes, with inputs, result, refusals and an example.

Reference for Startup Template, one group of Startup Template routes.

StartupTemplate.extend

Extend adds a Startup Template to a Startup’s bases, pinned to a Version, so the Startup inherits its definition. Verb page.

Text
POST /{namespace}/startup-templates/{startupTemplate}/extend

Path: startupTemplate. Body, as JSON: the other inputs. Emits StartupTemplate.extended.

Inputs

InputTypeRequiredDescription
startupTemplateStartup TemplaterequiredThe Startup Template to inherit.
startupStartuprequiredThe Startup that extends it.

Returns

OutputTypeRequiredDescription
startupStartuprequiredThe Startup, with the Startup Template among its bases.
startupTemplateStartup TemplaterequiredThe Startup Template extended.

Refuses when

CheckErrorFixThen call
The key is valid, but its scopes do not allow this operation.forbiddenUse a key whose scopes cover the operation, or ask an owner of the namespace to grant them.None.
A clash between two bases until the Startup settles itrefusedClear what the check names, then call it again.None.

Example

Terminal
curl -X POST https://api.sb/leaseline.app/startup-templates/stpl_9OivLWR17L/extend \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"startup":"startup_l3hr1EnUGY"}'
JSON
{
  "api": "https://api.sb/leaseline.app",
  "startup": {
    "$id": "https://api.sb/leaseline.app/startups/startup_l3hr1EnUGY",
    "$type": "Startup",
    "name": "Leaseline"
  },
  "startupTemplate": {
    "$id": "https://api.sb/leaseline.app/startup-templates/stpl_9OivLWR17L",
    "$type": "StartupTemplate",
    "slug": "leaseline",
    "operatingModel": "autonomous",
    "motions": [
      "Example motions"
    ]
  },
  "action": {
    "$id": "https://api.sb/leaseline.app/actions/act_br07HsG8MG",
    "operation": "StartupTemplate.extend",
    "status": "done"
  },
  "links": {
    "self": "https://api.sb/leaseline.app/actions/act_br07HsG8MG"
  }
}

StartupTemplate.promote

Promote moves one Startup’s refinement into a Startup Template, so every Startup that extends it inherits the refinement. Verb page.

Text
POST /{namespace}/startup-templates/{startupTemplate}/promote

Path: startupTemplate. Body, as JSON: the other inputs. Emits StartupTemplate.promoted.

Inputs

InputTypeRequiredDescription
startupTemplateStartup TemplaterequiredThe Startup Template that receives the refinement.
startupStartuprequiredThe Startup that holds the refinement.

Returns

OutputTypeRequiredDescription
changeChangerequiredThe Change against the Startup Template.
startupTemplateStartup TemplaterequiredThe Startup Template that received the refinement.

Refuses when

CheckErrorFixThen call
The key is valid, but its scopes do not allow this operation.forbiddenUse a key whose scopes cover the operation, or ask an owner of the namespace to grant them.None.

Example

Terminal
curl -X POST https://api.sb/leaseline.app/startup-templates/stpl_9OivLWR17L/promote \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"startup":"startup_l3hr1EnUGY"}'
JSON
{
  "api": "https://api.sb/leaseline.app",
  "change": {
    "$id": "https://api.sb/leaseline.app/changes/change_3Ex8uVSOyQ",
    "$type": "Change",
    "status": "Open",
    "base": "version_4HTEMs14G4"
  },
  "startupTemplate": {
    "$id": "https://api.sb/leaseline.app/startup-templates/stpl_9OivLWR17L",
    "$type": "StartupTemplate",
    "slug": "leaseline",
    "operatingModel": "autonomous",
    "motions": [
      "Example motions"
    ]
  },
  "action": {
    "$id": "https://api.sb/leaseline.app/actions/act_br07HsG8MG",
    "operation": "StartupTemplate.promote",
    "status": "done"
  },
  "links": {
    "self": "https://api.sb/leaseline.app/actions/act_br07HsG8MG"
  }
}

StartupTemplate.upgrade

Upgrade moves a Startup to a newer Version of a Startup Template it extends, through a Change it can review. Verb page.

Text
POST /{namespace}/startup-templates/{startupTemplate}/upgrade

Path: startupTemplate. Body, as JSON: the other inputs. Emits StartupTemplate.upgraded.

Inputs

InputTypeRequiredDescription
startupTemplateStartup TemplaterequiredThe Startup Template to upgrade.
startupStartuprequiredThe Startup that extends it.
versionVersionThe target Version; the latest when absent.

Returns

OutputTypeRequiredDescription
changeChangerequiredThe Change that moves the pin, with its three-way diff.
startupTemplateStartup TemplaterequiredThe Startup Template upgraded to.

Refuses when

CheckErrorFixThen call
The key is valid, but its scopes do not allow this operation.forbiddenUse a key whose scopes cover the operation, or ask an owner of the namespace to grant them.None.

Example

Terminal
curl -X POST https://api.sb/leaseline.app/startup-templates/stpl_9OivLWR17L/upgrade \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"startup":"startup_l3hr1EnUGY"}'
JSON
{
  "api": "https://api.sb/leaseline.app",
  "change": {
    "$id": "https://api.sb/leaseline.app/changes/change_3Ex8uVSOyQ",
    "$type": "Change",
    "status": "Open",
    "base": "version_4HTEMs14G4"
  },
  "startupTemplate": {
    "$id": "https://api.sb/leaseline.app/startup-templates/stpl_9OivLWR17L",
    "$type": "StartupTemplate",
    "slug": "leaseline",
    "operatingModel": "autonomous",
    "motions": [
      "Example motions"
    ]
  },
  "action": {
    "$id": "https://api.sb/leaseline.app/actions/act_br07HsG8MG",
    "operation": "StartupTemplate.upgrade",
    "status": "done"
  },
  "links": {
    "self": "https://api.sb/leaseline.app/actions/act_br07HsG8MG"
  }
}