diff --git a/.changeset/wet-bars-report.md b/.changeset/wet-bars-report.md index d556f6cc61..019f1f2f6c 100644 --- a/.changeset/wet-bars-report.md +++ b/.changeset/wet-bars-report.md @@ -2,4 +2,30 @@ '@backstage/backend-plugin-api': minor --- -Added `coreServices.actionsRegistry` and `coreServices.actions` to allow registration of distributed actions from plugins, and the ability to invoke these actions +Added `actionsRegistry` and `actions` experimental services to `/alpha` to allow registration of distributed actions from plugins, and the ability to invoke these actions. You can use these services by including them like the following: + +```ts +import { + actionsRegistryServiceRef, + actionsServiceRef, +} from '@backstage/backend-plugin-api/alpha'; + +createBackendPlugin({ + pluginId: 'test-plugin', + register({ registerInit }) { + registerInit({ + deps: { + actions: actionsServiceRef, + actionsRegistry: actionsRegistryServiceRef, + }, + async init({ actions, actionsRegistry }) { + actionsRegistry.register({ + ..., + }); + + await actions.invoke(...); + }, + }); + }, +}); +```