View .md

Spell Versions endpoints (Admin API)

10 FeatherPanel Admin API endpoints from admin/spell-versions.php: methods, paths, auth, permissions, rate limits, parameters and responses.

Last synced from FeatherPanel 8318da2 on .

On this page

Defined in backend/app/routes/admin/spell-versions.php. Authentication used here: Admin. Read Authentication for how to send credentials and Rate limits and errors for the response envelope.

Paths, methods, permissions and rate limits come from the route file. Summaries, parameters and response codes come from the OpenAPI annotations on the controllers; endpoints without annotations show only what the route file declares.

Endpoints

GET/api/admin/spells/{id}/versions

Auth: AdminPermission: admin.spells.viewRoute name: admin-spell-versionsController: SpellVersionsController::indexroute source

Spell version state and revision history

ParameterInTypeRequiredDescription
idpathintegeryes
curl -X GET "$PANEL_URL/api/admin/spells/$ID/versions" \
  -H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
  -H "Accept: application/json"

Responses: 200 Version state and revisions · 404 Spell not found

POST/api/admin/spells/{id}/versions/check

Auth: AdminPermission: admin.spells.editRoute name: admin-spell-versions-checkController: SpellVersionsController::checkroute source

Check FeatherCloud or the update URL for a newer version

ParameterInTypeRequiredDescription
idpathintegeryes
curl -X POST "$PANEL_URL/api/admin/spells/$ID/versions/check" \
  -H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
  -H "Accept: application/json"

Responses: 200 Version state

GET/api/admin/spells/{id}/versions/update/preview

Auth: AdminPermission: admin.spells.editRoute name: admin-spell-versions-update-previewController: SpellVersionsController::previewUpdateroute source

Preview the update: changed fields, variables and the effect on every server

ParameterInTypeRequiredDescription
idpathintegeryes
curl -X GET "$PANEL_URL/api/admin/spells/$ID/versions/update/preview" \
  -H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
  -H "Accept: application/json"

Responses: 200 Update preview

POST/api/admin/spells/{id}/versions/update

Auth: AdminPermission: admin.spells.editRoute name: admin-spell-versions-updateController: SpellVersionsController::applyUpdateroute source

Apply the previewed update

ParameterInTypeRequiredDescription
idpathintegeryes
Body fieldTypeRequiredDescription
hashstringnoHash returned by the preview
removed_variablesstringno
notify_serversbooleanno
changelogstringno
curl -X POST "$PANEL_URL/api/admin/spells/$ID/versions/update" \
  -H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{"hash":"","removed_variables":"","notify_servers":false,"changelog":""}'

Responses: 200 Updated · 409 Pinned, or a newer version appeared since the preview

PATCH/api/admin/spells/{id}/versions/settings

Auth: AdminPermission: admin.spells.editRoute name: admin-spell-versions-settingsController: SpellVersionsController::settingsroute source

Pin a spell to its version or link it to a FeatherCloud egg

ParameterInTypeRequiredDescription
idpathintegeryes
Body fieldTypeRequiredDescription
pinnedbooleanno
upstream_identifierstringnoFeatherCloud egg id, null to unlink
curl -X PATCH "$PANEL_URL/api/admin/spells/$ID/versions/settings" \
  -H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{"pinned":false,"upstream_identifier":""}'

Responses: 200 Saved

GET/api/admin/spells/{id}/versions/{revision}

Auth: AdminPermission: admin.spells.viewRoute name: admin-spell-versions-showController: SpellVersionsController::showroute source

One spell revision with its changes

ParameterInTypeRequiredDescription
idpathintegeryes
revisionpathintegeryes
curl -X GET "$PANEL_URL/api/admin/spells/$ID/versions/$REVISION" \
  -H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
  -H "Accept: application/json"

Responses: 200 Revision · 404 Not found

GET/api/admin/spells/{id}/versions/{revision}/rollback/preview

Auth: AdminPermission: admin.spells.editRoute name: admin-spell-versions-rollback-previewController: SpellVersionsController::previewRollbackroute source

Preview a rollback to an older revision

ParameterInTypeRequiredDescription
idpathintegeryes
revisionpathintegeryes
curl -X GET "$PANEL_URL/api/admin/spells/$ID/versions/$REVISION/rollback/preview" \
  -H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
  -H "Accept: application/json"

Responses: 200 Rollback preview

POST/api/admin/spells/{id}/versions/{revision}/rollback

Auth: AdminPermission: admin.spells.editRoute name: admin-spell-versions-rollbackController: SpellVersionsController::rollbackroute source

Roll the spell back to an older revision

ParameterInTypeRequiredDescription
idpathintegeryes
revisionpathintegeryes
Body fieldTypeRequiredDescription
removed_variablesstringno
notify_serversbooleanno
curl -X POST "$PANEL_URL/api/admin/spells/$ID/versions/$REVISION/rollback" \
  -H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{"removed_variables":"","notify_servers":false}'

Responses: 200 Rolled back

GET/api/admin/spell-versions/status

Auth: AdminPermission: admin.spells.viewRoute name: admin-spell-versions-statusController: SpellVersionsController::statusAllroute source

Last known update state of every spell

curl -X GET "$PANEL_URL/api/admin/spell-versions/status" \
  -H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
  -H "Accept: application/json"

Responses: 200 Update states keyed by spell id

POST/api/admin/spell-versions/check

Auth: AdminPermission: admin.spells.editRoute name: admin-spell-versions-check-allController: SpellVersionsController::checkAllroute source

Check every spell that has an update source (oldest check first)

curl -X POST "$PANEL_URL/api/admin/spell-versions/check" \
  -H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
  -H "Accept: application/json"

Responses: 200 Results per spell