Main Content

restFunctionServices

List of function services in current MATLAB session

Since R2024a

    Description

    example

    serviceDict = restFunctionServices returns a list of all the REST function services in the current MATLAB® session.

    Examples

    collapse all

    Create REST services EL and ER.

    serviceL = restFunctionService("EL",["myAdd" "myMagic" "mySub"]);
    serviceR = restFunctionService("ER",["myMult" "myDiv"],ClientAccessMode=remote);

    Then get the list of function services in the current MATLAB session.

    serviceDict = restFunctionServices
    serviceDict =  
      dictionary (string ⟼ RESTFunctionService) with 2 entries: 
        "EL" ⟼ 1×1 RESTFunctionService 
        "ER" ⟼ 1×1 RESTFunctionService

    Output Arguments

    collapse all

    REST function services, specified as a dictionary, where the key is the service name specified as a string scalar and the value is the RESTFunctionService object. The function returns an empty dictionary if there are no REST function services in the current MATLAB session. To create a service, call restFunctionService.

    Version History

    Introduced in R2024a

    See Also

    Objects