Set the initial state of a service

Use the HTTP method POST and the status query string option to set the initial status of a service. If the service archive file is not usable, the operation fails.

The status of a service can be either started, or stopped. If the status information is not available from the service provider, the service would be in an unknown status.

HTTP method

If the service name contains forward slashes, they must be escaped by using %2F. For example, if the service name is MyService/v1, it must be provided as MyService%2Fv1.

Sets the initial status of a service upon service deployment or service updates. When a service is stopped, new requests will fail but existing requests will be allowed to complete. Administration requests to /zosConnect/services/{serviceName} will still function normally and the service will appear in the list returned by the /zosConnect/services request.

The Service Provider SPI is called by IBM® z/OS® Connect to notify it that these actions were requested. The method names that are in the SPI for these actions are stop(), start(), and status().

IBM z/OS Connect does not persist any state that is related to the service and instead delegates this state to the service provider.

If the authorization interceptor provided by z/OS Connect EE is enabled in the service provider, users with Admin or Operations authority can change the status of a service. Users with Invoke or Reader authority cannot. For more information about user authorization, see Overview of IBM z/OS Connect security.
Request body
To change the status of a service, the request body should have no content. If a service archive is in the request body, the request is to update the service and set the initial status after the update. For more information, see Update a service.
Response body
Note: The enhanced administration interface V1.2.0 includes version information for services in the response body.
    "zosConnect": {
        "serviceName": "<service name>",
        "serviceDescription": "<service description>",
        "serviceProvider": "<service provider>",
        “version”: “<version>”,
        "serviceURL": "<service URL>",
        "serviceInvokeURL": "<service invocation URL>",
        "dataXformProvider": "<data transformation provider>",
        "serviceStatus": "<service status>"
400 Bad request
Unknown status specified