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
- 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
Content-Type: application/json
Custom headers
None.
Request content
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. |
Usage considerations
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
Example 1: 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."}}}
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
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."}}}]
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
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."}}}
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
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."}}}
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
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."}}}
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
}