CICS DA POST clone requests

You can use the CICS® DA RESTful API to clone a CICS TS region.

Clone POST request sample

CICS DA provides a Clone.rexx sample, which you can use as a template to invoke the clone function.

POST to run the clone function

You can run the clone function by using the CICS DA API. The following example shows a POST clone request:

POST /CICSTopology/v1/managedCICSRegions/APPLID1/clones HTTP/1.1
Host : example.com:port
Content-Type: application/json
Accept : application/json

Where example.com:port is the host address and port number of your CICS DA server and APPLID1 is the APPLID of the CICS TS region that you want to clone.

POST message body

The following example shows the format for a POST message body, which is a simple clone request of a managed region that runs as a started task:
{

  "applid": "IYK3Z17K", 
  "systemID": "T17K", 
  "MASName": "IYK3Z17K", 
  "MASDescription": "POST test. Region cloned from IYK3Z17J", 
  "startPolicy": { 
  "type" : "COMMAND", 
  "command" : "RO MV28,S FVFNT17,JOBNAME=FVFNT17K,TYPE=0,SUFFIX=K" 
   } 
 } 
Important: The CICS DA RESTful API requires a message body element for a POST request to clone a CICS region.

Output formats

The GET request can return either Extensible Markup Language (XML) or JavaScript Object Notation (JSON). By default, JSON is returned. However, you can request a particular media type by using the HTTP Accept header, as shown in previous examples. The media types that you can use are listed in the following table:
Table 1. Supported output types and HTTP headers
Data output format HTTP header
JSON Accept : application/json
XML Accept : application/xml

Response to a POST clone request

On the completion of a POST clone request, the client receives a response from the CICS DA server. The response consists of one or more HTTP headers, such as a description of the content type, and the details about the cloned CICS region in the response body.

For example, the response to the request:
POST /CICSTopology/v1/managedCICSRegions/IYK3Z17J/clones HTTP/1.1
Host : example.com:port
Content-Type: application/json
Accept : application/json
With the following message body:
{

  "applid": "IYK3Z17K", 
  "systemID": "T17K", 
  "MASName": "IYK3Z17K", 
  "MASDescription": "POST test. Region cloned from IYK3Z17J", 
  "startPolicy": { 
  "type" : "COMMAND", 
  "command" : "RO MV28,S FVFNT17,JOBNAME=FVFNT17K,TYPE=0,SUFFIX=K" 
   } 
 } 
Might return the following response:
HTTP/1.1 201 Created
Content-Type : application/json

{
   "links":[{
      "rel":"self",
      "href":"/CICSTopology/v1/managedCICSRegions/IYK3Z17K"
   },
   {
      "rel":"tags",
      "href":"/CICSTopology/v1/managedCICSRegions/IYK3Z17K/tags"
   },
   {
      "rel":"TCPIPPorts",
      "href":"/CICSTopology/v1/managedCICSRegions/IYK3Z17K/TCPIPPorts"
   },
   {
      "rel":"CICSSystemGroups",
      "href":"/CICSTopology/v1/managedCICSRegions/IYK3Z17K/CICSSystemGroups"
   },
   {
      "rel":"connections",
      "href":"/CICSTopology/v1/managedCICSRegions/IYK3Z17K/connections"
   },
   {
      "rel":"MROConnections",
      "href":"/CICSTopology/v1/managedCICSRegions/IYK3Z17K/connections?connectionType=MRO"
   },
   {
      "rel":"IPICConnections",
      "href":"/CICSTopology/v1/managedCICSRegions/IYK3Z17K/connections?connectionType=IPIC"
   },
   {
      "rel":"ISCConnections",
      "href":"/CICSTopology/v1/managedCICSRegions/IYK3Z17K/connections?connectionType=ISC"
   },
   {
      "rel":"DB2s",
      "href":"/CICSTopology/v1/managedCICSRegions/IYK3Z17K/connections?connectionType=DB2"
   },
   {
      "rel":"MQs",
      "href":"/CICSTopology/v1/managedCICSRegions/IYK3Z17K/connections?connectionType=MQ"
   },
   {
      "rel":"IMSs",
      "href":"/CICSTopology/v1/managedCICSRegions/IYK3Z17K/connections?connectionType=IMS"
   },
   {
      "rel":"clones",
      "href":"/CICSTopology/v1/managedCICSRegions/IYK3Z17K/clones"
   }],
   "systemID":"T17K",
   "applid":"IYK3Z17K",
   "version":"0700",
   "startPolicy":{
      "type":"COMMAND",
      "command":"RO MV28,S FVFNT17,JOBNAME=FVFNT17K,TYPE=0,SUFFIX=K"
   },
   "stopPolicy":{
      "type":"DEFAULT",
      "command":"F jobname,CEMT P SHUT"
   },
   "groupLists":[
      "*FHLIST",
      "DFHPGADX"
   ],
   "program":"DFHSIP",
   "status":"NOT_AVAILABLE",
   "jobName":"FVFNT17K",
   "CICSplex":{
      "link":{
         "rel":"CICSplex",
         "href":"/CICSTopology/v1/CMASNetworks/IYK3Z17A/CICSplexes/T17PLEX"
      },
      "name":"T17PLEX"
   },
   "MASName":"IYK3Z17K",
   "managingCMAS":{
      "link":{
         "rel":"CMAS",
         "href":"/CICSTopology/v1/CMASs/IYK3Z17A"
      },
      "applid":"IYK3Z17A",
      "jobName":"FVFNT17A",
      "CMASName":"IYK3Z17A"
   },
   "RTASpec":{
      "link":{
         "rel":"RTASpec",
         "href":"/CICSTopology/v1/CMASNetworks/IYK3Z17A/CICSplexes/T17PLEX/RTASpecs/RTASPEC"
      },
      "name":"RTASPEC"
   },
   "WLMSpec":{
      "link":{
         "rel":"WLMSpec",
         "href":"/CICSTopology/v1/CMASNetworks/IYK3Z17A/CICSplexes/T17PLEX/WLMSpecs/XMC4RUN1"
      },
      "name":"XMC4RUN1"
   },
   "creationReport":{
      "link":{
         "rel":"creationReport",
         "href":"/CICSTopology/v1/creationReports/IYK3Z17K"
      }
   },
   "zOSSystem":{
      "link":{
         "rel":"zOSSystem",
         "href":"/CICSTopology/v1/zOSSystems/MV28"
      },
      "name":"MV28"
   }
} 
 


api_post_clone.html | Timestamp icon Last updated: Friday, 11 December 2015