This is the API documentation for the Mendix Studio Pro Web Extensibility APIs.
To interact with the Extensibility API, obtain a reference to the Studio Pro API object using the getStudioProApi
factory function.
This function requires a ComponentContext
argument, which uniquely identifies the caller of the APIs.
You should use the ComponentContext
instance provided by Studio Pro in the loaded
method of your extension.
The example below demonstrates the recommended approach for accessing and using the Extensibility API.
import { getStudioProApi, IComponent } from "@mendix/extensions-api";
export const component : IComponent = {
async loaded(componentContext) {
const studioPro = getStudioProApi(componentContext);
await studioPro.ui.messageBoxes.show("info", "Hello World from my extension!");
}
}
We also provide an extension project generator. This generator will help you get started with your first extension and setup the launch configuration of VS Code so that the extension can be debugged directly from VS Code. For more information, follow the documentation provided with the generator.