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
- POST
- URI
- /zosConnect/services/{serviceName}?status=started|stopped
If the service name contains forward slashes, they must be escaped by using
%2F
. For example, if the service name isMyService/v1
, it must be provided asMyService%2Fv1
. - Description
- 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. Note:
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.
- Security
- If the authorization interceptor provided by z/OS Connect
EE is enabled in the service provider, users with
Admin
orOperations
authority can change the status of a service. Users withInvoke
orReader
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>" } }
- Errors
-
400 Bad request Unknown status specified