Contenuto principale

stop

R2026b

Stop REST function service from MATLAB

Since R2024a

    Description

    stop(service) stops a running MATLAB® REST function service and updates the Status property of the RESTFunctionService object to notrunning.

    example

    Examples

    collapse all

    Suppose you have a MATLAB REST function service containing multiple MATLAB functions. Stop the service.

    stop(service)

    Confirm that the service is no longer running by checking the Status property of the service.

    service
    service = 
    
      RESTFunctionService with properties:
    
                     Name: "myService"
                Functions: ["myAdd" "myMagic" "mySub"]
         ClientAccessMode: local
        FunctionConnector: [1×1 matlab.engine.rest.RESTFunctionConnector]
        ClientRequestInfo: [0×0 matlab.engine.rest.ClientRequestInfo]
                   Status: notrunning

    Input Arguments

    collapse all

    REST function service, specified as a RESTFunctionService object.

    Version History

    Introduced in R2024a