Call MATLAB Functions Using REST
R2026bYou can create MATLAB REST function services that allow client applications to call user-defined MATLAB functions over the HTTPS protocol. The service enables communication between your programs and MATLAB regardless of your platform and execution environment. You can call custom MATLAB functions using any programming language or application that can make a REST call, either locally or remotely.
Only you can execute functions in your MATLAB instance.
Objects
RESTFunctionService | Service for calling MATLAB functions from client applications (Since R2024a) |
ClientRequestInfo | Client to function service HTTPS request information (Since R2024a) |
RESTFunctionConnector | MATLAB to client application connection (Since R2024a) |
Functions
restFunctionServices | List of function services in current MATLAB session (Since R2024a) |
Python Client Class
matlab.rest_function_service.client.MWHttpClient | Python client interface for calling MATLAB REST function service |
REST Service Reference for MATLAB Function Execution
POST Synchronous
Request | Make synchronous request to MATLAB REST function service and wait for response |
Topics
- Create MATLAB REST Function Services
Enable licensed MATLAB users to make RESTful function calls to their MATLAB instance.
- Call MATLAB Functions from External Languages Using REST
Call user-defined MATLAB functions from Java®, C++, and other external language clients using the synchronous request-response model.
- Call MATLAB Functions from Python Using REST
Call user-defined MATLAB functions from Python® clients using native Python data types and the synchronous request-response model. (Since R2026b)
- JSON Representation of MATLAB Data Types
Represent supported MATLAB data types in JSON.
- Data Type Conversions Between MATLAB REST Function Services and Python
Learn how the MATLAB REST function service converts data types passed between Python and MATLAB.