![]() |
Qorus Integration Engine® Enterprise Edition 7.1.0_prod
|
base class for accessing the system REST API More...
Public Member Methods | |
| constructor (*hash< auto > opts, *softbool do_not_connect) | |
| Creates the object with the given options. | |
| setSchema () | |
| Sets the REST validator to the latest version of the schema for the Qorus API. | |
| setPublicSchema () | |
| Sets the REST validator to the latest version of the public schema for the Qorus API. | |
Public Attributes | |
| const | Defaults |
| default values for connection options | |
| hash | conn_opts |
| connection params | |
| *string | api_version |
| api version | |
| *string | name |
| connection name if known | |
Private:Internal Member Methods | |
| abstract | autoSetUrl (*hash< auto > opts) |
| sets the URL automatically; must be reimplemented in subclasses | |
| setURL (string url) | |
| sets the URL for the object | |
| hash< auto > | restDoWithInfo (string m, string path, auto args, *hash< auto > hdr, *hash< auto > opt) |
| executes the remote REST call and returns the response | |
| abstract auto | restDo (string m, string path, auto args, *hash< auto > hdr, *hash< auto > opt, *reference< hash< auto > > info) |
| executes the remote REST call and returns the response | |
| abstract nothing | warning (string fmt,...) |
| issue a warning on the console (for the client) or in the current log file (for the server) | |
| auto | get (string path, auto args, *hash< auto > hdr, *reference< hash< auto > > info) |
executes a GET call on the remote REST service and returns the response | |
| hash< auto > | getWithInfo (string path, auto args, *hash< auto > hdr) |
executes a GET call on the remote REST service and returns the response | |
| auto | put (string path, auto args, *hash< auto > hdr, *reference< hash< auto > > info) |
executes a PUT call on the remote REST service and returns the response | |
| hash< auto > | putWithInfo (string path, auto args, *hash< auto > hdr) |
executes a PUT call on the remote REST service and returns the response | |
| auto | post (string path, auto args, *hash< auto > hdr, *reference< hash< auto > > info) |
executes a POST call on the remote REST service and returns the response | |
| hash< auto > | postWithInfo (string path, auto args, *hash< auto > hdr) |
executes a POST call on the remote REST service and returns the response | |
| auto | del (string path, auto args, *hash< auto > hdr, *reference< hash< auto > > info) |
executes a DELETE call on the remote REST service and returns the response | |
| hash< auto > | delWithInfo (string path, auto args, *hash< auto > hdr) |
executes a DELETE call on the remote REST service and returns the response | |
| hash< auto > | doRequest (string m, string path, auto body, *reference< hash< auto > > info, softbool decode_errors=True, *hash< auto > hdr) |
| sends an HTTP request to the REST server and returns the response | |
Static Private:Internal Member Methods | |
| static hash< auto > | toConfig (hash< auto > info) |
| returns a hash of configuration information for the object | |
base class for accessing the system REST API
| OMQ::QorusSystemRestHelperBase::constructor | ( | *hash< auto > | opts, |
| *softbool | do_not_connect | ||
| ) |
Creates the object with the given options.
A connection is automatically made unless the do_not_connect argument is False
| opts | options as follows: |
| do_not_connect | if True, then the object will be created in an unconnected state |
|
private:internal |
executes a DELETE call on the remote REST service and returns the response
| path | the URI path for the request |
| args | any arguments to the REST request |
| hdr | a hash of optional HTTP header info to add to the request |
| info | an optional reference to a hash that will be used as an output variable giving a hash of request headers and other information about the HTTP request; if present the hash will contain the following keys:
|
|
private:internal |
executes a DELETE call on the remote REST service and returns the response
| path | the URI path for the request |
| args | any arguments to the REST request |
| hdr | a hash of optional HTTP header info to add to the request |
rv: the deserialized response bodyinfo: a hash of request headers and other information about the HTTP request; if present the hash will contain the following keys:headers: a hash of outgoing HTTP request headersrequest-uri: the request URI string sent (ex: "DELETE /users/olduser HTTP/1.1")body-content-type: the outgoing message body Mime Content-Type valueresponse-headers: a hash of incoming HTTP headers in the responsechunked: set to True if the response was received with chunked transfer encodingresponse-code: the HTTP response coderesponse-body: the raw message body in the response (after any content decoding)response-serialization: the type of message serialization in the response; see RestClient::RestClient::DataSerializationOptions for possible valuesrequest-body: the raw message body in the request (before any content encoding)request-serialization: the type of message serialization in the request; see RestClient::RestClient::DataSerializationOptions for possible values
|
private:internal |
sends an HTTP request to the REST server and returns the response
|
private:internal |
executes a GET call on the remote REST service and returns the response
| path | the URI path for the request |
| args | any arguments to the REST request |
| hdr | a hash of optional HTTP header info to add to the request |
| info | an optional reference to a hash that will be used as an output variable giving a hash of request headers and other information about the HTTP request; if present the hash will contain the following keys:
|
|
private:internal |
executes a GET call on the remote REST service and returns the response
| path | the URI path for the request |
| args | any arguments to the REST request |
| hdr | a hash of optional HTTP header info to add to the request |
rv: the deserialized response bodyinfo: a hash of request headers and other information about the HTTP request; if present the hash will contain the following keys:headers: a hash of outgoing HTTP request headersrequest-uri: the request URI string sent (ex: "GET /services/async/38.0/job HTTP/1.1")body-content-type: the outgoing message body Mime Content-Type valueresponse-headers: a hash of incoming HTTP headers in the responsechunked: set to True if the response was received with chunked transfer encodingresponse-code: the HTTP response coderesponse-body: the raw message body in the response (after any content decoding)response-serialization: the type of message serialization in the response; see RestClient::RestClient::DataSerializationOptions for possible valuesrequest-body: the raw message body in the request (before any content encoding)request-serialization: the type of message serialization in the request; see RestClient::RestClient::DataSerializationOptions for possible values
|
private:internal |
executes a POST call on the remote REST service and returns the response
| path | the URI path for the request |
| args | any arguments to the REST request |
| hdr | a hash of optional HTTP header info to add to the request |
| info | an optional reference to a hash that will be used as an output variable giving a hash of request headers and other information about the HTTP request; if present the hash will contain the following keys:
|
|
private:internal |
executes a POST call on the remote REST service and returns the response
| path | the URI path for the request |
| args | any arguments to the REST request |
| hdr | a hash of optional HTTP header info to add to the request |
rv: the deserialized response bodyinfo: a hash of request headers and other information about the HTTP request; if present the hash will contain the following keys:headers: a hash of outgoing HTTP request headersrequest-uri: the request URI string sent (ex: "POST /services/async/38.0/job HTTP/1.1")body-content-type: the outgoing message body Mime Content-Type valueresponse-headers: a hash of incoming HTTP headers in the responsechunked: set to True if the response was received with chunked transfer encodingresponse-code: the HTTP response coderesponse-body: the raw message body in the response (after any content decoding)response-serialization: the type of message serialization in the response; see RestClient::RestClient::DataSerializationOptions for possible valuesrequest-body: the raw message body in the request (before any content encoding)request-serialization: the type of message serialization in the request; see RestClient::RestClient::DataSerializationOptions for possible values
|
private:internal |
executes a PUT call on the remote REST service and returns the response
| path | the URI path for the request |
| args | any arguments to the REST request |
| hdr | a hash of optional HTTP header info to add to the request |
| info | an optional reference to a hash that will be used as an output variable giving a hash of request headers and other information about the HTTP request; if present the hash will contain the following keys:
|
|
private:internal |
executes a PUT call on the remote REST service and returns the response
| path | the URI path for the request |
| args | any arguments to the REST request |
| hdr | a hash of optional HTTP header info to add to the request |
rv: the deserialized response bodyinfo: a hash of request headers and other information about the HTTP request; if present the hash will contain the following keys:headers: a hash of outgoing HTTP request headersrequest-uri: the request URI string sent (ex: "PUT /services/async/38.0/job HTTP/1.1")body-content-type: the outgoing message body Mime Content-Type valueresponse-headers: a hash of incoming HTTP headers in the responsechunked: set to True if the response was received with chunked transfer encodingresponse-code: the HTTP response coderesponse-body: the raw message body in the response (after any content decoding)response-serialization: the type of message serialization in the response; see RestClient::RestClient::DataSerializationOptions for possible valuesrequest-body: the raw message body in the request (before any content encoding)request-serialization: the type of message serialization in the request; see RestClient::RestClient::DataSerializationOptions for possible values
|
private:internal |
executes the remote REST call and returns the response
| m | the HTTP method for the request (ex: "GET") |
| path | the URI path for the request |
| args | any arguments to the REST request |
| hdr | a hash of optional HTTP header info to add to the request |
| opt | output options; as defined in the child class |
| info | an optional reference to a hash that will be used as an output variable giving a hash of request headers and other information about the HTTP request; if present the hash will contain the following keys:
|
|
private:internal |
executes the remote REST call and returns the response
| m | the HTTP method for the request (ex: "GET") |
| path | the URI path for the request |
| args | any arguments to the REST request |
| hdr | a hash of optional HTTP header info to add to the request |
| opt | output options; as defined in the child class |
rv: the deserialized response bodyinfo: a hash of request headers and other information about the HTTP request; if present the hash will contain the following keys:headers: a hash of outgoing HTTP request headersrequest-uri: the request URI string sent (ex: "GET /services/async/38.0/job HTTP/1.1")body-content-type: the outgoing message body Mime Content-Type valueresponse-headers: a hash of incoming HTTP headers in the responsechunked: set to True if the response was received with chunked transfer encodingresponse-code: the HTTP response coderesponse-body: the raw message body in the response (after any content decoding)response-serialization: the type of message serialization in the response; see RestClient::RestClient::DataSerializationOptions for possible valuesrequest-body: the raw message body in the request (before any content encoding)request-serialization: the type of message serialization in the request; see RestClient::RestClient::DataSerializationOptions for possible values| OMQ::QorusSystemRestHelperBase::setPublicSchema | ( | ) |
Sets the REST validator to the latest version of the public schema for the Qorus API.
| OMQ::QorusSystemRestHelperBase::setSchema | ( | ) |
Sets the REST validator to the latest version of the schema for the Qorus API.
|
private:internal |
issue a warning on the console (for the client) or in the current log file (for the server)