Update data for one or more systems

You can use this operation to request that the primary z/OSMF instance submit an HTTPS request to update data for one system, for a list of systems, or for all the systems in a group, sysplex, or central processor complex (CPC).

HTTP method and URI path

POST /zosmf/gateway/system
POST /zosmf/gateway/systems
POST /zosmf/gateway/group
POST /zosmf/gateway/sysplex
POST /zosmf/gateway/cpc
PUT /zosmf/gateway/system
PUT /zosmf/gateway/systems
PUT /zosmf/gateway/group
PUT /zosmf/gateway/sysplex
PUT /zosmf/gateway/cpc
where:
  • zosmf/gateway identifies the multisystem routing services.
  • system informs the service that the request will be routed to only one system.
  • systems informs the service that the request will be routed to a list of systems.
  • group informs the service that the request will be routed to all of the systems in a group.
  • sysplex informs the service that the request will be routed to all of the systems in a sysplex.
  • cpc informs the service that the request will be routed to all of the systems in a CPC.

Standard headers

Use the following standard HTTP header with this request:

Content-Type: application/json

Custom headers

None.

Request content

Your request must include a JSON object or JSON object stream that describes the objects to be created, updated, or modified for each system. Table 1 lists the supported parameters.
Table 1. Supported input parameters for the multisystem routing services
Parameter Required Description
target Yes If the request is being sent to a system or a list of systems, the target is the nickname of the system. If the request is being sent to all the systems in a group, sysplex, or CPC, the target is the name of the group, sysplex, or CPC. The specified target must be defined in the Systems task. Otherwise, the request will fail.
resourcePath Yes Path to the z/OSMF REST service that will process the request. The resource path must be within the z/OSMF context. For example, to ping a TSO/E address space on the target system, you would use the TSO/E address space services to process the request. Therefore, you would specify the following resourcePath: /tsoApp/ping/<servletKey>, where <servletKey> identifies the TSO/E address space for the service to ping.

When sending an HTTPS request to a list of systems, you can specify a different resource path and different parameters for each system included in the list. When sending an HTTPS request to all the systems in a group, sysplex, or CPC, you can specify only one resource path and one set of parameters, which will be used for all the systems in the specified group, sysplex, or CPC.

requestProperties No HTTP headers to be included in the HTTP request. Specify the HTTP headers as name and value pairs. If HTTP headers are omitted or are null, default values will be used, which are valid for most installations.
timeout No Amount of time in milliseconds allowed to process a request. The value can range from 1 to 5601000 milliseconds. If omitted, the default value of 20000 milliseconds is used.
content Yes if the HTTP method is POST or PUT. Parameters or JSON object to include in the body of the HTTPS request that will be sent to the z/OSMF REST interface that will process the request.

Required authorizations

See Required authorizations.

Expected response

On completion, the service returns an HTTP response, which includes a status code indicating whether your request completed. Status code 200 indicates success. A status code of 4nn or 5nn indicates that an error has occurred. For more details, see Error handling.

The response also includes a JSON object that contains the requested information. For more details, see Content type used for HTTP response data.

Examples

To obtain sample HTTPS requests and responses for updating data for one system, for a list of systems, or for all the systems in a group, sysplex, or CPC, see the following sections:

Example 1: Update data for one system

To create event type IBM.ZOSMF.VIEW_JOB_STATUS on system sys057, submit the following request:
Figure 1. Sample request to update data for one system
POST /zosmf/gateway/system HTTP/1.1
Host: zosmf1.yourco.com

{"target":"sys057","resourcePath":"/izual/rest/eventtype","content":
{"id":"IBM.ZOSMF.VIEW_JOB_STATUS","displayName":"View Job Status",
"desc":"View the status of a job.","owner":"SDSF","params":{"jobName":
"Name of the job for which to view status."}}}
A sample response is shown in Figure 2.
Figure 2. Sample response from a request to update data for one system
HTTP/1.1 200 OK
Date: Thu, 15 Jan 2015 05:39:28 +0000GMT
Connection: close

{
  "primaryAPIVersion":1.0,
  "systemsOutput":
    {
      "systemOutput":
        {
          "error":null,
          "result":null,
        },
      "rc":"Ok",
      "secondaryApiVersion":1.0,
      "systemVersion":"{"zosNode":"SY1","zosVrm":"04.24.00","zosSysplex":"PLEX1"}",
	    "systemName":"sys057"
    },
  "numOfSystems":1
}

Example 2: Update data for a list of systems

To create event type IBM.ZOSMF.VIEW_JOB_STATUS on system sys057 and event type IBM.ZOSMF.VIEW_WLM_STATUS on system sys060, submit the following request:
Figure 3. Sample request to update data for a list of systems
POST /zosmf/gateway/systems HTTP/1.1
Host: zosmf1.yourco.com

[{"target":"sys057","resourcePath":"/izual/rest/eventtype","content":
{"id":"IBM.ZOSMF.VIEW_JOB_STATUS","displayName":"View Job Status",
"desc":"View the status of a job.","owner":"SDSF","params":{"jobName":
"Name of the job for which to view status."}}},
{"target":"sys060","resourcePath":"/izual/rest/eventtype",
"content":{"id"="IBM.ZOSMF.VIEW_WLM_STATUS","displayName":"View WLM Status",
"desc":"View the status of WLM.","owner":"IBM","params":{"sysplex:"Name of the sysplex."}}}]
A sample response is shown in Figure 4.
Figure 4. Sample response from a request to update data for a list of systems
HTTP/1.1 200 OK
Date: Thu, 15 Jan 2015 05:39:28 +0000GMT
Connection: close

{
  "primaryAPIVersion":1.0,
  "systemsOutput":[
    {
      "systemOutput":
        {
          "error":null,
          "result":null,
        },
      "rc":"Ok",
      "secondaryApiVersion":1.0,
      "systemVersion":"{"zosNode":"SY1","zosVrm":"04.24.00","zosSysplex":"PLEX1"}",
	    "systemName":"sys057"
    },
    {
      "systemOutput":
        {
          "error":null,
          "result":null,
        },
      "rc":"Ok",
      "secondaryApiVersion":1.0,
      "systemVersion":"{"zosNode":"SY4","zosVrm":"04.24.00","zosSysplex":"PLEX4"}",
	    "systemName":"sys060"
    }],
  "numOfSystems":2
}

Example 3: Update data for all the systems in a group

To create event type IBM.ZOSMF.VIEW_JOB_STATUS for all the systems in group mygroup, submit the following request:
Figure 5. Sample request to update data for all the systems in a group
POST /zosmf/gateway/group HTTP/1.1
Host: zosmf1.yourco.com

{"target":"mygroup","resourcePath":"/izual/rest/eventtype","content":
{"id":"IBM.ZOSMF.VIEW_JOB_STATUS","displayName":"View Job Status",
"desc":"View the status of a job.","owner":"SDSF","params":{"jobName":
"Name of the job for which to view status."}}}
A sample response is shown in Figure 6.
Figure 6. Sample response from a request to update data for all the systems in a group
HTTP/1.1 200 OK
Date: Thu, 15 Jan 2015 05:39:28 +0000GMT
Connection: close

{
  "primaryAPIVersion":1.0,
  "systemsOutput":[
    {
      "systemOutput":
        {
          "error":null,
          "result":null,
        },
      "rc":"Ok",
      "secondaryApiVersion":1.0,
      "systemVersion":"{"zosNode":"SY1","zosVrm":"04.24.00","zosSysplex":"PLEX1"}",
	    "systemName":"sys057"
    },
    {
      "systemOutput":
        {
          "error":null,
          "result":null,
        },
      "rc":"Ok",
      "secondaryApiVersion":1.0,
      "systemVersion":"{"zosNode":"SY2","zosVrm":"04.24.00","zosSysplex":"PLEX2"}",
      "systemName":"sys058"
    },
    {
      "systemOutput":
        {
          "error":null,
          "result":null,
        },
      "rc":"Ok",
      "secondaryApiVersion":1.0,
      "systemVersion":"{"zosNode":"SY3","zosVrm":"04.24.00","zosSysplex":"PLEX3"}",
      "systemName":"sys059"
    }],
  "numOfSystems":3
}

Example 4: Update data for all the systems in a sysplex

To create event type IBM.ZOSMF.VIEW_JOB_STATUS for all the systems in sysplex PLEX1, submit the following request:
Figure 7. Sample request to update data for all the systems in a sysplex
POST /zosmf/gateway/sysplex HTTP/1.1
Host: zosmf1.yourco.com

{"target":"PLEX1","resourcePath":"/izual/rest/eventtype","content":
{"id":"IBM.ZOSMF.VIEW_JOB_STATUS","displayName":"View Job Status",
"desc":"View the status of a job.","owner":"SDSF","params":{"jobName":
"Name of the job for which to view status."}}}
A sample response is shown in Figure 8.
Figure 8. Sample response from a request to update data for all the systems in a sysplex
HTTP/1.1 200 OK
Date: Thu, 15 Feb 2015 05:39:28 +0000GMT
Connection: close

{
  "primaryAPIVersion":1.0,
  "systemsOutput":[
    {
      "systemOutput":
        {
          "error":null,
          "result":null,
        },
      "rc":"Ok",
      "secondaryApiVersion":1.0,
      "systemVersion":"{"zosNode":"SY1","zosVrm":"04.24.00","zosSysplex":"PLEX1"}",
	    "systemName":"sys057"
    },
    {
      "systemOutput":
        {
          "error":null,
          "result":null,
        },
      "rc":"Ok",
      "secondaryApiVersion":1.0,
      "systemVersion":"{"zosNode":"SY1","zosVrm":"04.24.00","zosSysplex":"PLEX1"}",
      "systemName":"sys077"
    },
    {
      "systemOutput":
        {
          "error":null,
          "result":null,
        },
      "rc":"Ok",
      "secondaryApiVersion":1.0,
      "systemVersion":"{"zosNode":"SY1","zosVrm":"04.24.00","zosSysplex":"PLEX1"}",
      "systemName":"sys195"
    }],
  "numOfSystems":3
}

Example 5: Update data for all the systems in a CPC

To create event type IBM.ZOSMF.VIEW_JOB_STATUS for all the systems in CPC CPC1, submit the following request:
Figure 9. Sample request to update data for all the systems in a CPC
POST /zosmf/gateway/cpc HTTP/1.1
Host: zosmf1.yourco.com

{"target":"CPC1","resourcePath":"/izual/rest/eventtype","content":
{"id":"IBM.ZOSMF.VIEW_JOB_STATUS","displayName":"View Job Status",
"desc":"View the status of a job.","owner":"SDSF","params":{"jobName":
"Name of the job for which to view status."}}}
A sample response is shown in Figure 10.
Figure 10. Sample response from a request to update data for all the systems in a CPC
HTTP/1.1 200 OK
Date: Thu, 15 Feb 2015 05:39:28 +0000GMT
Connection: close

{
  "primaryAPIVersion":1.0,
  "systemsOutput":[
    {
      "systemOutput":
        {
          "error":null,
          "result":null,
        },
      "rc":"Ok",
      "secondaryApiVersion":1.0,
      "systemVersion":"{"zosNode":"SY1","zosVrm":"04.24.00","zosSysplex":"PLEX1"}",
	    "systemName":"sys057"
    },
    {
      "systemOutput":
        {
          "error":null,
          "result":null,
        },
      "rc":"Ok",
      "secondaryApiVersion":1.0,
      "systemVersion":"{"zosNode":"SY5","zosVrm":"04.24.00","zosSysplex":"PLEX5"}",
      "systemName":"sys289"
    }],
  "numOfSystems":2
}