Package dev.galasa.zosrseapi
Interface IRseapi
public interface IRseapi
Represents a RSE API server
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumEnumeration of RSE API request types -
Method Summary
Modifier and TypeMethodDescriptionvoidClear the existing HTTP Headers ready for the next RSE API request@NotNull IRseapiResponseIssue an HTTP DELETE request to the RSE API server with no request body@NotNull IRseapiResponseIssue an HTTP PUT request to the RSE API server with no request bodygetImage()Get the zOS image associated with the RSE API server@NotNull IRseapiResponseIssue an HTTP POST request to the RSE API server with no request body@NotNull IRseapiResponseIssue an HTTP POST request to the RSE API server with a request body of content type ofapplication/json@NotNull IRseapiResponseIssue an HTTP PUT request to the RSE API server with a request body of content type oftext/plain@NotNull IRseapiResponseIssue an HTTP PUT request to the RSE API server with a request body of content type ofapplication/json@NotNull IRseapiResponseIssue an HTTP PUT request to the RSE API server with text request bodytext/plain@NotNull com.google.gson.JsonObjectReturn the JSON response from the RSE API server Server Information requestvoidSet an HTTP Header for the pending RSE API request
-
Method Details
-
setHeader
Set an HTTP Header for the pending RSE API request- Parameters:
name- header namevalue- header value
-
clearHeaders
void clearHeaders()Clear the existing HTTP Headers ready for the next RSE API request -
get
@NotNull @NotNull IRseapiResponse get(String path, List<Integer> validStatusCodes, boolean convert) throws RseapiException Issue an HTTP PUT request to the RSE API server with no request body- Parameters:
path- identifies the RSE API REST API servervalidStatusCodes- aListof acceptable HTTP Status codes. Default toHttpStatus.SC_OKwhen nullconvert- is a data conversion required. If true, data will be converted betwen EBCDIC to ISO8859-1. If false, no data conversion will take place.- Returns:
- the RSE API server response
- Throws:
RseapiException
-
putText
@NotNull @NotNull IRseapiResponse putText(String path, String body, List<Integer> validStatusCodes) throws RseapiException Issue an HTTP PUT request to the RSE API server with text request bodytext/plain- Parameters:
path- identifies the RSE API REST API serverbody- the request bodyvalidStatusCodes- aListof acceptable HTTP Status codes. Default toHttpStatus.SC_OKwhen null- Returns:
- the RSE API server response
- Throws:
RseapiException
-
putJson
@NotNull @NotNull IRseapiResponse putJson(String path, com.google.gson.JsonObject body, List<Integer> validStatusCodes) throws RseapiException Issue an HTTP PUT request to the RSE API server with a request body of content type ofapplication/json- Parameters:
path- identifies the RSE API REST API serverbody- the request bodyvalidStatusCodes- aListof acceptable HTTP Status codes. Default toHttpStatus.SC_OKwhen null- Returns:
- the RSE API server response
- Throws:
RseapiException
-
putBinary
@NotNull @NotNull IRseapiResponse putBinary(String path, byte[] body, List<Integer> validStatusCodes) throws RseapiException Issue an HTTP PUT request to the RSE API server with a request body of content type oftext/plain- Parameters:
path- identifies the RSE API REST API serverbody- the request bodyvalidStatusCodes- aListof acceptable HTTP Status codes. Default toHttpStatus.SC_OKwhen null- Returns:
- the RSE API server response
- Throws:
RseapiException
-
post
@NotNull @NotNull IRseapiResponse post(String path, List<Integer> validStatusCodes) throws RseapiException Issue an HTTP POST request to the RSE API server with no request body- Parameters:
path- identifies the RSE API REST API servervalidStatusCodes- aListof acceptable HTTP Status codes. Default toHttpStatus.SC_OKwhen null- Returns:
- the RSE API server response
- Throws:
RseapiException
-
postJson
@NotNull @NotNull IRseapiResponse postJson(String path, com.google.gson.JsonObject requestBody, List<Integer> validStatusCodes) throws RseapiException Issue an HTTP POST request to the RSE API server with a request body of content type ofapplication/json- Parameters:
path- identifies the RSE API REST API serverrequestBody- the request bodyvalidStatusCodes- aListof acceptable HTTP Status codes. Default toHttpStatus.SC_OKwhen null- Returns:
- the RSE API server response
- Throws:
RseapiException
-
delete
@NotNull @NotNull IRseapiResponse delete(String path, List<Integer> validStatusCodes) throws RseapiException Issue an HTTP DELETE request to the RSE API server with no request body- Parameters:
path- identifies the RSE API REST API servervalidStatusCodes- aListof acceptable HTTP Status codes. Default toHttpStatus.SC_OKwhen null- Returns:
- the RSE API server response
- Throws:
RseapiException
-
serverInfo
Return the JSON response from the RSE API server Server Information request- Returns:
- the RSE API server JSON response
- Throws:
RseapiException
-
getImage
IZosImage getImage()Get the zOS image associated with the RSE API server- Returns:
- the zOS image
-