|
Groovy Documentation | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | METHOD | DETAIL: FIELD | METHOD |
public interface IMoabRestService
The Moab REST service gives easy access to all supported REST resources in Moab Web Services. The isAPIVersionSupported(int) method may also be used to determine which API versions may be used for the current running instance of MWS.
Methods are provided to perform each HTTP method: GET, POST, PUT, and DELETE. Several variations are given of each method in order to utilize simpler or more complicated requests. Each operation is performed internally. In other words, no external network connection is utilized to perform these calls. The methods for each HTTP method may be called as follows (using the post method as an example):// String url moabRestService.post("/rest/jobs") // Map options, String url moabRestService.post("/rest/jobs", hooks:true) // String url, Closure data moabRestService.post("/rest/jobs") { [data:"here"] } // Map options, String url, Closure data moabRestService.post("/rest/jobs", hooks:true) { [data:"here"] }For more information on how to use this service, see the MWS Quick Reference page on Moab Rest Service.
Method Summary | |
---|---|
MoabRestResponse
|
delete(String url)
Shortcut for calling delete(Map, String, Closure) with no options or data. |
MoabRestResponse
|
delete(Map options, String url)
Shortcut for calling delete(Map, String, Closure) with no data. |
MoabRestResponse
|
delete(String url, Closure data)
Shortcut for calling delete(Map, String, Closure) with no options. |
MoabRestResponse
|
delete(Map options, String url, Closure data)
Performs an internal HTTP DELETE operation for the requested URL with optional options and/or data. |
MoabRestResponse
|
get(String url)
Shortcut for calling get(Map, String, Closure) with no options or data. |
MoabRestResponse
|
get(Map options, String url)
Shortcut for calling get(Map, String, Closure) with no data. |
MoabRestResponse
|
get(String url, Closure data)
Shortcut for calling get(Map, String, Closure) with no options. |
MoabRestResponse
|
get(Map options, String url, Closure data)
Performs an internal HTTP GET operation for the requested URL with optional options and/or data. |
boolean
|
isAPIVersionSupported(int apiVersion)
Returns whether or not the specified API version is supported by this version of Moab Web Services. |
MoabRestResponse
|
post(String url)
Shortcut for calling post(Map, String, Closure) with no options or data. |
MoabRestResponse
|
post(Map options, String url)
Shortcut for calling post(Map, String, Closure) with no data. |
MoabRestResponse
|
post(String url, Closure data)
Shortcut for calling post(Map, String, Closure) with no options. |
MoabRestResponse
|
post(Map options, String url, Closure data)
Performs an internal HTTP POST operation for the requested URL with optional options and/or data. |
MoabRestResponse
|
put(String url)
Shortcut for calling put(Map, String, Closure) with no options or data. |
MoabRestResponse
|
put(Map options, String url)
Shortcut for calling put(Map, String, Closure) with no data. |
MoabRestResponse
|
put(String url, Closure data)
Shortcut for calling put(Map, String, Closure) with no options. |
MoabRestResponse
|
put(Map options, String url, Closure data)
Performs an internal HTTP PUT operation for the requested URL with optional options and/or data. |
Method Detail |
---|
public MoabRestResponse delete(String url)
url
- The URL to call
public MoabRestResponse delete(Map options, String url)
url
- The URL to call
public MoabRestResponse delete(String url, Closure data)
url
- The URL to call
public MoabRestResponse delete(Map options, String url, Closure data)
options
- Map of options to use for the requesturl
- The URL to calldata
- A closure which returns a valid request body
public MoabRestResponse get(String url)
url
- The URL to call
public MoabRestResponse get(Map options, String url)
url
- The URL to call
public MoabRestResponse get(String url, Closure data)
url
- The URL to call
public MoabRestResponse get(Map options, String url, Closure data)
options
- Map of options to use for the requesturl
- The URL to call RESTfullydata
- A closure which returns a valid request body
public boolean isAPIVersionSupported(int apiVersion)
apiVersion
- The API version as an integer (i.e. 1, 2, etc)
public MoabRestResponse post(String url)
url
- The URL to call
public MoabRestResponse post(Map options, String url)
url
- The URL to call
public MoabRestResponse post(String url, Closure data)
url
- The URL to call
public MoabRestResponse post(Map options, String url, Closure data)
options
- Map of options to use for the requesturl
- The URL to calldata
- A closure which returns a valid request body
public MoabRestResponse put(String url)
url
- The URL to call
public MoabRestResponse put(Map options, String url)
url
- The URL to call
public MoabRestResponse put(String url, Closure data)
url
- The URL to call
public MoabRestResponse put(Map options, String url, Closure data)
options
- Map of options to use for the requesturl
- The URL to calldata
- A closure which returns a valid request body
Groovy Documentation