Working copy id of the current opened model (read only)
The Mendix meta model version related to the project.
The Mendix product version the model was created with/in. Note: this does not have to equal the meta model version.
The actual contents of the model.
The meta data of the model.
Returns all units in the project, including modules, folders etc. To retrieve all "real" documents (pages, microflows etc.), use allDocuments().
Ends the connection with the Model API client. Flushes any pending deltas and invokes the callback once complete. If a callback is provided but no error callback is provided, errors will be handled through the default modelstore error handler.
Deletes the file with the specified filepath.
Deletes this model from the server, and the (SDK) client. If you are altering the model before deleting it, make sure to call this method in the callback of closeConnection.
Exports the module as MPK. If you are altering the model before running an export make sure to call this method in the callback of closeConnection. If outFilePath is empty, the raw request response will be provided in the callback
Exports this model as MPK. If you are altering the model before running an export make sure to call this method in the callback of closeConnection. If outFilePath is empty, the raw request response will be provided in the callback
Returns a list of unitIds that contains a specific custom widget
Given a qualified name, returns a Module.
Get the deployment status of the working copy. Can be STAGING, STARTED, STARTING, UPDATING, STOPPED, FAILED_STAGING, FAILED and APP_NOT_FOUND. Contains other deployment info as well.
Get the deployment status of the working copy. Can be STAGING, STARTED, STARTING, UPDATING, STOPPED, FAILED_STAGING, FAILED, APP_NOT_FOUND, INVALID_PROJECTID, INVALID_OPENID, UNKNOWN_DEPLOYER, UNKNOWN_PROJECT, UNKNOWN_ACCOUNT, BUSY_PROVISIONIN, UNLINKED, NO_WEBMODELER_TARGET_SELECTED. Contains other deployment info as well.
Retrieves App Job by jobId. See also startAppUpdate.
In the response the most important field is status.
Polling for job status should stop once it has reeached "started" | "failed" | "consistencyerrors". Jobs will be cleaned up 10 minutes after the have reached one of this states.
Downloads the file specified by the supplied filepath. If filePath is empty, the raw request response will be provided in the callback
Returns an array of all filepaths in the working copy.
Returns all files or a subset of files options.filter: glob pattern to limit the set of files options.format: "json" or "zip" options.path: useful if format is "zip". If provided the zip will be stored on disk
Imports the given module MPK.
Importing a module overwrites existing files in the project.
Gives error if
Given an id, fetches a complete unit. The result might be returned from the cache. Use this method if you have just a unit Id, otherwise, unit.fetch() is a simpler alternative.
Uploads the supplied file to the specified filepath.
Sets the callback that is invoked when an error occurs in an asynchronous operation for which no error callback is specified.
Examples of such operations are making changes to the model and loading elements.
Start async deploy flow, creates new app job and returns it. This call immediately returns after successfully initiating the deployment job, and it's progress can be tracked using `getAppUpdateStates.
A start update packs the mpk and sends it to the cloud environment to update the application, a new application will be provisioned if needed.
The update job will always converge to a stable state (one of "started" | "failed" | "consistencyerrors"). Use the returned job id to poll for this.
Generated using TypeDoc
This interface exposes a single Mendix Model. This interface contains the parts of the Model that are exposed through the SDK.