Creating a REST client service

Create a service for the REST client by configuring the properties file that the build toolkit needs to generate the service archive.

zosConnect-2.0 Applies to zosConnect-2.0.

To use the build toolkit to build your service archive for a REST client, the following properties must be defined.
Note: All JSON schema files must use UTF-8 encoding.
Table 1. Mandatory properties
Property Importance Description
provider Required Must be set to rest to build a service archive file for the REST client service provider.
name Required The name of the service.
version Required The version of the service.
The following properties are available for the REST client service provider:
Table 2. Properties for the REST client service provider
Property Importance Description
connectionRef Required The ID of the zosconnect_zosConnectServiceRestClientConnection that defines the connection to the remote service.
description Optional The description of the service.
requestSchemaFile Required The JSON schema file that defines the request object for this service.
Note: If you do not specify an absolute path, the build toolkit uses a relative path from the directory in which the zconbt command is run.
responseSchemaFile Required The JSON schema file that defines the response object for this service.
Note: If you do not specify an absolute path, the build toolkit uses a relative path from the directory in which the zconbt command is run.
verb Optional The HTTP verb that is used to call the service. If this verb is omitted, the verb that is used to invoke the service is used.
uri Required The resource that this service exposes. It must not contain the host name or port.

Sample properties file for the REST client


provider=rest
name=example
version=1.0
description=An example REST client service
requestSchemaFile=request.json
responseSchemaFile=response.json
verb=POST
uri=/resource/item
connectionRef=restConn 

You can now use the build toolkit to generate the service archive. See Generating service archives for DevOps for sample commands.