TIDRestFunctions::RestDeleteBinary
TIDRestFunctions::RestDeleteCSS
TIDRestFunctions::RestDeleteCustom
Perform the "DELETE" method on a REST service with headers defined by user.
This action will send the "DELETE" method with Headers defined by user.
If the field SessionIDItem is provided in the map, the keyword RestStartServiceSession SHOULD be executed
before executing this action, which will be handled within a session.
Otherwise, it will be considered as a one-shot connection,
and NO RestStartServiceSession needs to be called and user may need to provide authentication information.
Fields: [ ]=
Optional with Default Value
-
relativeURI
The relative URI combined with a base-URL (stored in a session) to form a REST service URL.
This is normally a relative URI (the base-URL is provided in a session).
BUT it should be full path URL if the field SessionIDItem is not provided or invalid.
-
responseIdVar
The name of the variable holding "response ID", which is used by rest driver commands to verify/delete response.
The ID is generated internally, and it is used to get the Response Object from the internal Map.
-
headers
The headers to be included in this REST request.
It can be
- a literal string, such as "If-Modified-Since: Sat, 29 OCT 1994 19:43:31 GMT".
- a map item holding the literal-string or header-file-path.
- a project-relative-path or full-path to a file holding the literal header string.
- [ body = ]
The body to send with this REST request.
It can be
- a literal text string for something simple.
- a project-relative or full path to a file of larger body content in the proper format.
The body's content-type could be defined in the headers.
- [ authentication = ]
The custom authentication/authorization information.
It can be
- a project-relative-path or full-path to a file holding the authentication/authorization information.
- a map item holding the auth-file-path.
This custom authentication/authorization information will override the global settings (in .ini file or by VM parameter.)
and take effect only in this keyword execution. In the next keyword execution, the global authentication/authorization setting
will still be taken in account if no custom auth information is specified.
Examples:
-
T, SAFSREST, ServiceIdItem, RestDeleteCustom, "relativeURL", "ResponseIDVariable", customHeader
Within a session, execute a DELETE method on REST service URL formed by prepending the base-URL to
the relative-URI "relativeURL", the method will be requested with custom header defined by map item 'customHeader'
The item "ServiceIdItem" and "customHeader" MUST be defined in the map such as:
[SAFSREST]
ServiceIdItem=ServiceSession001
customHeader=Accept : application/octet-stream
The session is identified by sessionID "ServiceSession001", according to which the base-URL is gotten.
If the base-URL is "http://www.service.com/", then the full REST Service URL is "http://www.service.com/relativeURL/".
The Response Object will be stored in an internal Map with a generated ID, which will be saved to a variable ResponseIDVariable.
-
T, SAFSREST, ServiceIdItemNonExist, RestDeleteCustom, "http://www.service.com/relativeURL/", "GetResponseIDVariable", "rest\customHeader.txt"
Without session, execute a DELETE method on REST service URL "http://www.service.com/relativeURL/".
The item "ServiceIdItemNonExist" should NOT be defined, or defined with an empty value in the map:
[SAFSREST]
ServiceIdItemNonExist=
This action is handled as one-shot connection.
The parameter "relativeURI" is provided as a full path URL "http://www.service.com/relativeURL/".
The file "<project>\rest\customHeader.txt" holds the header information with which to make request.
The Response Object will be stored in an internal Map with a generated ID, which will be saved to a variable GetResponseIDVariable.
[How To Read This Reference]
TIDRestFunctions::RestDeleteHTML
TIDRestFunctions::RestDeleteImage
TIDRestFunctions::RestDeleteJSON
TIDRestFunctions::RestDeleteScript
TIDRestFunctions::RestDeleteText
TIDRestFunctions::RestDeleteXML
TIDRestFunctions::RestEndServiceSession
Stop a session for a REST service.
Stop a session for a REST service.
Fields: [ ]=
Optional with Default Value
Examples:
-
T, SAFSREST, BayerSessionID, RestEndServiceSession
Stop a session identified by value of map item BayerSessionID for a REST service.
Stop a session identified by value of map item BayerSessionID for a REST service.
[How To Read This Reference]
TIDRestFunctions::RestGetBinary
Perform the "GET" method on a REST service, and try to get back the binary content.
This action will send the "GET" method with Headers containing "Accept : application/octet-stream".
It only tells the server what type of content is expected, and it is not guarantee that the server will return it.
If the field SessionIDItem is provided in the map, the keyword RestStartServiceSession SHOULD be executed
before executing this action, which will be handled within a session.
Otherwise, it will be considered as a one-shot connection,
and NO RestStartServiceSession needs to be called and user may need to provide authentication information by keyword's parameter.
Fields: [ ]=
Optional with Default Value
-
relativeURI
The relative URI combined with a base-URL (stored in a session) to form a REST service URL.
This is normally a relative URI (the base-URL is provided in a session).
BUT it should be full path URL if the field SessionIDItem is not provided or invalid.
-
responseIdVar
The name of the variable holding "response ID", which is used by rest driver commands to verify/delete response.
The "response ID" is generated internally, and it is used to get the Response Object from the internal Map.
- [ body = ]
The body to send with this REST request.
It can be
- a literal text string for something simple.
- a project-relative or full path to a file of larger body content in the proper format.
The body's content-type could be defined in the headers.
- [ headers = ]
The headers to be included in this REST request.
It can be
- a literal string, such as "If-Modified-Since: Sat, 29 OCT 1994 19:43:31 GMT".
- a map item holding the literal-string or header-file-path.
- a project-relative-path or full-path to a file holding the literal header string.
- [ authentication = ]
The custom authentication/authorization information.
It can be
- a project-relative-path or full-path to a file holding the authentication/authorization information.
- a map item holding the auth-file-path.
This custom authentication/authorization information will override the global settings (in .ini file or by VM parameter.)
and take effect only in this keyword execution. In the next keyword execution, the global authentication/authorization setting
will still be taken in account if no custom auth information is specified.
Examples:
-
T, SAFSREST, BayerServiceIdItem, RestGetBinary, "sqlrest/CUSTOMER/", "BayerCustomerGetResponseIDVariable"
Within a session, execute a GET method on REST service URL formed by prepending the base-URL to the relative-URI "sqlrest/CUSTOMER/"
The item "BayerServiceIdItem" MUST be defined in the map such as:
[SAFSREST]
BayerServiceIdItem=BayerServiceSession001
The session is identified by sessionID "BayerServiceSession001", according to which the base-URL is gotten.
If the base-URL is "http://www.thomas-bayer.com/", then the full REST Service URL is "http://www.thomas-bayer.com/sqlrest/CUSTOMER/".
The Response Object will be stored in an internal Map with a generated ID, which will be saved to a variable BayerCustomerGetResponseIDVariable.
-
T, SAFSREST, BayerServiceIdItemNonExist, RestGet, "http://www.thomas-bayer.com/sqlrest/CUSTOMER/", "BayerCustomerGetResponseIDVariable"
Without session, execute a GET method on REST service URL "http://www.thomas-bayer.com/sqlrest/CUSTOMER/".
The item "BayerServiceIdItemNonExist" should NOT be defined, or defined with an empty value in the map:
[SAFSREST]
BayerServiceIdItemNonExist=
This action is handled as one-shot connection.
The parameter "relativeURI" is provided a full path URL "http://www.thomas-bayer.com/sqlrest/CUSTOMER/".
The Response Object will be stored in an internal Map with a generated ID, which will be saved to a variable BayerCustomerGetResponseIDVariable.
[How To Read This Reference]
TIDRestFunctions::RestGetCSS
Perform the "GET" method on a REST service, and try to get back the css text content.
This action will send the "GET" method with Headers containing "Accept : text/css".
It only tells the server what type of content is expected, and it is not guarantee that the server will return it.
If the field SessionIDItem is provided in the map, the keyword RestStartServiceSession SHOULD be executed
before executing this action, which will be handled within a session.
Otherwise, it will be considered as a one-shot connection,
and NO RestStartServiceSession needs to be called and user may need to provide authentication information.
Fields: [ ]=
Optional with Default Value
-
relativeURI
The relative URI combined with a base-URL (stored in a session) to form a REST service URL.
This is normally a relative URI (the base-URL is provided in a session).
BUT it should be full path URL if the field SessionIDItem is not provided or invalid.
-
responseIdVar
The name of the variable holding "response ID", which is used by rest driver commands to verify/delete response.
The ID is generated internally, and it is used to get the Response Object from the internal Map.
- [ body = ]
The body to send with this REST request.
It can be
- a literal text string for something simple.
- a project-relative or full path to a file of larger body content in the proper format.
The body's content-type could be defined in the headers.
- [ headers = ]
The headers to be included in this REST request.
It can be
- a literal string, such as "If-Modified-Since: Sat, 29 OCT 1994 19:43:31 GMT".
- a map item holding the literal-string or header-file-path.
- a project-relative-path or full-path to a file holding the literal header string.
- [ authentication = ]
The custom authentication/authorization information.
It can be
- a project-relative-path or full-path to a file holding the authentication/authorization information.
- a map item holding the auth-file-path.
This custom authentication/authorization information will override the global settings (in .ini file or by VM parameter.)
and take effect only in this keyword execution. In the next keyword execution, the global authentication/authorization setting
will still be taken in account if no custom auth information is specified.
Examples:
-
T, SAFSREST, ServiceIdItem, RestGetCSS, "relativeURL", "ResponseIDVariable"
Within a session, execute a GET method on REST service URL formed by prepending the base-URL to the relative-URI "relativeURL"
The item "ServiceIdItem" MUST be defined in the map such as:
[SAFSREST]
ServiceIdItem=ServiceSession001
The session is identified by sessionID "ServiceSession001", according to which the base-URL is gotten.
If the base-URL is "http://www.service.com/", then the full REST Service URL is "http://www.service.com/relativeURL/".
The Response Object will be stored in an internal Map with a generated ID, which will be saved to a variable ResponseIDVariable.
-
T, SAFSREST, ServiceIdItemNonExist, RestGetCSS, "http://www.service.com/relativeURL/", "GetResponseIDVariable"
Without session, execute a GET method on REST service URL "http://www.service.com/relativeURL/".
The item "ServiceIdItemNonExist" should NOT be defined, or defined with an empty value in the map:
[SAFSREST]
ServiceIdItemNonExist=
This action is handled as one-shot connection.
The parameter "relativeURI" is provided as a full path URL "http://www.service.com/relativeURL/".
The Response Object will be stored in an internal Map with a generated ID, which will be saved to a variable GetResponseIDVariable.
[How To Read This Reference]
TIDRestFunctions::RestGetCustom
Perform the "GET" method on a REST service with headers defined by user.
This action will send the "GET" method with Headers defined by user.
If the field SessionIDItem is provided in the map, the keyword RestStartServiceSession SHOULD be executed
before executing this action, which will be handled within a session.
Otherwise, it will be considered as a one-shot connection,
and NO RestStartServiceSession needs to be called and user may need to provide authentication information.
Fields: [ ]=
Optional with Default Value
-
relativeURI
The relative URI combined with a base-URL (stored in a session) to form a REST service URL.
This is normally a relative URI (the base-URL is provided in a session).
BUT it should be full path URL if the field SessionIDItem is not provided or invalid.
-
responseIdVar
The name of the variable holding "response ID", which is used by rest driver commands to verify/delete response.
The ID is generated internally, and it is used to get the Response Object from the internal Map.
-
headers
The headers to be included in this REST request.
It can be
- a literal string, such as "If-Modified-Since: Sat, 29 OCT 1994 19:43:31 GMT".
- a map item holding the literal-string or header-file-path.
- a project-relative-path or full-path to a file holding the literal header string.
- [ body = ]
The body to send with this REST request.
It can be
- a literal text string for something simple.
- a project-relative or full path to a file of larger body content in the proper format.
The body's content-type could be defined in the headers.
- [ authentication = ]
The custom authentication/authorization information.
It can be
- a project-relative-path or full-path to a file holding the authentication/authorization information.
- a map item holding the auth-file-path.
This custom authentication/authorization information will override the global settings (in .ini file or by VM parameter.)
and take effect only in this keyword execution. In the next keyword execution, the global authentication/authorization setting
will still be taken in account if no custom auth information is specified.
Examples:
-
T, SAFSREST, ServiceIdItem, RestGetCustom, "relativeURL", "ResponseIDVariable", customHeader
Within a session, execute a GET method on REST service URL formed by prepending the base-URL to
the relative-URI "relativeURL", the method will be requested with custom header defined by map item 'customHeader'
The item "ServiceIdItem" and "customHeader" MUST be defined in the map such as:
[SAFSREST]
ServiceIdItem=ServiceSession001
customHeader=Accept : application/octet-stream
The session is identified by sessionID "ServiceSession001", according to which the base-URL is gotten.
If the base-URL is "http://www.service.com/", then the full REST Service URL is "http://www.service.com/relativeURL/".
The Response Object will be stored in an internal Map with a generated ID, which will be saved to a variable ResponseIDVariable.
-
T, SAFSREST, ServiceIdItemNonExist, RestGetCustom, "http://www.service.com/relativeURL/", "GetResponseIDVariable", "rest\customHeader.txt"
Without session, execute a GET method on REST service URL "http://www.service.com/relativeURL/".
The item "ServiceIdItemNonExist" should NOT be defined, or defined with an empty value in the map:
[SAFSREST]
ServiceIdItemNonExist=
This action is handled as one-shot connection.
The parameter "relativeURI" is provided as a full path URL "http://www.service.com/relativeURL/".
The file "<project>\rest\customHeader.txt" holds the header information with which to make request.
The Response Object will be stored in an internal Map with a generated ID, which will be saved to a variable GetResponseIDVariable.
[How To Read This Reference]
TIDRestFunctions::RestGetHTML
Perform the "GET" method on a REST service, and try to get back the html text content.
This action will send the "GET" method with Headers containing "Accept : text/html".
It only tells the server what type of content is expected, and it is not guarantee that the server will return it.
If the field SessionIDItem is provided in the map, the keyword RestStartServiceSession SHOULD be executed
before executing this action, which will be handled within a session.
Otherwise, it will be considered as a one-shot connection,
and NO RestStartServiceSession needs to be called and user may need to provide authentication information.
Fields: [ ]=
Optional with Default Value
-
relativeURI
The relative URI combined with a base-URL (stored in a session) to form a REST service URL.
This is normally a relative URI (the base-URL is provided in a session).
BUT it should be full path URL if the field SessionIDItem is not provided or invalid.
-
responseIdVar
The name of the variable holding "response ID", which is used by rest driver commands to verify/delete response.
The ID is generated internally, and it is used to get the Response Object from the internal Map.
- [ body = ]
The body to send with this REST request.
It can be
- a literal text string for something simple.
- a project-relative or full path to a file of larger body content in the proper format.
The body's content-type could be defined in the headers.
- [ headers = ]
The headers to be included in this REST request.
It can be
- a literal string, such as "If-Modified-Since: Sat, 29 OCT 1994 19:43:31 GMT".
- a map item holding the literal-string or header-file-path.
- a project-relative-path or full-path to a file holding the literal header string.
- [ authentication = ]
The custom authentication/authorization information.
It can be
- a project-relative-path or full-path to a file holding the authentication/authorization information.
- a map item holding the auth-file-path.
This custom authentication/authorization information will override the global settings (in .ini file or by VM parameter.)
and take effect only in this keyword execution. In the next keyword execution, the global authentication/authorization setting
will still be taken in account if no custom auth information is specified.
Examples:
-
T, SAFSREST, ServiceIdItem, RestGetCustom, "relativeURL", "ResponseIDVariable"
Within a session, execute a GET method on REST service URL formed by prepending the base-URL to the relative-URI "relativeURL"
The item "ServiceIdItem" MUST be defined in the map such as:
[SAFSREST]
ServiceIdItem=ServiceSession001
The session is identified by sessionID "ServiceSession001", according to which the base-URL is gotten.
If the base-URL is "http://www.service.com/", then the full REST Service URL is "http://www.service.com/relativeURL/".
The Response Object will be stored in an internal Map with a generated ID, which will be saved to a variable ResponseIDVariable.
-
T, SAFSREST, ServiceIdItemNonExist, RestGetCustom, "http://www.service.com/relativeURL/", "GetResponseIDVariable"
Without session, execute a GET method on REST service URL "http://www.service.com/relativeURL/".
The item "ServiceIdItemNonExist" should NOT be defined, or defined with an empty value in the map:
[SAFSREST]
ServiceIdItemNonExist=
This action is handled as one-shot connection.
The parameter "relativeURI" is provided as a full path URL "http://www.service.com/relativeURL/".
The Response Object will be stored in an internal Map with a generated ID, which will be saved to a variable GetResponseIDVariable.
[How To Read This Reference]
TIDRestFunctions::RestGetImage
Perform the "GET" method on a REST service, and try to get back the image content.
This action will send the "GET" method with Headers containing "Accept : image".
It only tells the server what type of content is expected, and it is not guarantee that the server will return it.
If the field SessionIDItem is provided in the map, the keyword RestStartServiceSession SHOULD be executed
before executing this action, which will be handled within a session.
Otherwise, it will be considered as a one-shot connection,
and NO RestStartServiceSession needs to be called and user may need to provide authentication information.
Fields: [ ]=
Optional with Default Value
-
relativeURI
The relative URI combined with a base-URL (stored in a session) to form a REST service URL.
This is normally a relative URI (the base-URL is provided in a session).
BUT it should be full path URL if the field SessionIDItem is not provided or invalid.
-
responseIdVar
The name of the variable holding "response ID", which is used by rest driver commands to verify/delete response.
The ID is generated internally, and it is used to get the Response Object from the internal Map.
- [ body = ]
The body to send with this REST request.
It can be
- a literal text string for something simple.
- a project-relative or full path to a file of larger body content in the proper format.
The body's content-type could be defined in the headers.
- [ headers = ]
The headers to be included in this REST request.
It can be
- a literal string, such as "If-Modified-Since: Sat, 29 OCT 1994 19:43:31 GMT".
- a map item holding the literal-string or header-file-path.
- a project-relative-path or full-path to a file holding the literal header string.
- [ authentication = ]
The custom authentication/authorization information.
It can be
- a project-relative-path or full-path to a file holding the authentication/authorization information.
- a map item holding the auth-file-path.
This custom authentication/authorization information will override the global settings (in .ini file or by VM parameter.)
and take effect only in this keyword execution. In the next keyword execution, the global authentication/authorization setting
will still be taken in account if no custom auth information is specified.
Examples:
-
T, SAFSREST, ServiceIdItem, RestGetImage, "relativeURL", "ResponseIDVariable"
Within a session, execute a GET method on REST service URL formed by prepending the base-URL to the relative-URI "relativeURL"
The item "ServiceIdItem" MUST be defined in the map such as:
[SAFSREST]
ServiceIdItem=ServiceSession001
The session is identified by sessionID "ServiceSession001", according to which the base-URL is gotten.
If the base-URL is "http://www.service.com/", then the full REST Service URL is "http://www.service.com/relativeURL/".
The Response Object will be stored in an internal Map with a generated ID, which will be saved to a variable ResponseIDVariable.
-
T, SAFSREST, ServiceIdItemNonExist, RestGetImage, "http://www.service.com/relativeURL/", "GetResponseIDVariable"
Without session, execute a GET method on REST service URL "http://www.service.com/relativeURL/".
The item "ServiceIdItemNonExist" should NOT be defined, or defined with an empty value in the map:
[SAFSREST]
ServiceIdItemNonExist=
This action is handled as one-shot connection.
The parameter "relativeURI" is provided as a full path URL "http://www.service.com/relativeURL/".
The Response Object will be stored in an internal Map with a generated ID, which will be saved to a variable GetResponseIDVariable.
[How To Read This Reference]
TIDRestFunctions::RestGetJSON
Perform the "GET" method on a REST service, and try to get back the json text content.
This action will send the "GET" method with Headers containing "Accept : application/json".
It only tells the server what type of content is expected, and it is not guarantee that the server will return it.
If the field SessionIDItem is provided in the map, the keyword RestStartServiceSession SHOULD be executed
before executing this action, which will be handled within a session.
Otherwise, it will be considered as a one-shot connection,
and NO RestStartServiceSession needs to be called and user may need to provide authentication information.
Fields: [ ]=
Optional with Default Value
-
relativeURI
The relative URI combined with a base-URL (stored in a session) to form a REST service URL.
This is normally a relative URI (the base-URL is provided in a session).
BUT it should be full path URL if the field SessionIDItem is not provided or invalid.
-
responseIdVar
The name of the variable holding "response ID", which is used by rest driver commands to verify/delete response.
The ID is generated internally, and it is used to get the Response Object from the internal Map.
- [ body = ]
The body to send with this REST request.
It can be
- a literal text string for something simple.
- a project-relative or full path to a file of larger body content in the proper format.
The body's content-type could be defined in the headers.
- [ headers = ]
The headers to be included in this REST request.
It can be
- a literal string, such as "If-Modified-Since: Sat, 29 OCT 1994 19:43:31 GMT".
- a map item holding the literal-string or header-file-path.
- a project-relative-path or full-path to a file holding the literal header string.
- [ authentication = ]
The custom authentication/authorization information.
It can be
- a project-relative-path or full-path to a file holding the authentication/authorization information.
- a map item holding the auth-file-path.
This custom authentication/authorization information will override the global settings (in .ini file or by VM parameter.)
and take effect only in this keyword execution. In the next keyword execution, the global authentication/authorization setting
will still be taken in account if no custom auth information is specified.
Examples:
-
T, SAFSREST, ServiceIdItem, RestGetJSON, "relativeURL", "ResponseIDVariable"
Within a session, execute a GET method on REST service URL formed by prepending the base-URL to the relative-URI "relativeURL"
The item "ServiceIdItem" MUST be defined in the map such as:
[SAFSREST]
ServiceIdItem=ServiceSession001
The session is identified by sessionID "ServiceSession001", according to which the base-URL is gotten.
If the base-URL is "http://www.service.com/", then the full REST Service URL is "http://www.service.com/relativeURL/".
The Response Object will be stored in an internal Map with a generated ID, which will be saved to a variable ResponseIDVariable.
-
T, SAFSREST, ServiceIdItemNonExist, RestGetJSON, "http://www.service.com/relativeURL/", "GetResponseIDVariable"
Without session, execute a GET method on REST service URL "http://www.service.com/relativeURL/".
The item "ServiceIdItemNonExist" should NOT be defined, or defined with an empty value in the map:
[SAFSREST]
ServiceIdItemNonExist=
This action is handled as one-shot connection.
The parameter "relativeURI" is provided as a full path URL "http://www.service.com/relativeURL/".
The Response Object will be stored in an internal Map with a generated ID, which will be saved to a variable GetResponseIDVariable.
[How To Read This Reference]
TIDRestFunctions::RestGetScript
Perform the "GET" method on a REST service, and try to get back the javascript text content.
This action will send the "GET" method with Headers containing "Accept : application/javascript".
It only tells the server what type of content is expected, and it is not guarantee that the server will return it.
If the field SessionIDItem is provided in the map, the keyword RestStartServiceSession SHOULD be executed
before executing this action, which will be handled within a session.
Otherwise, it will be considered as a one-shot connection,
and NO RestStartServiceSession needs to be called and user may need to provide authentication information.
Fields: [ ]=
Optional with Default Value
-
relativeURI
The relative URI combined with a base-URL (stored in a session) to form a REST service URL.
This is normally a relative URI (the base-URL is provided in a session).
BUT it should be full path URL if the field SessionIDItem is not provided or invalid.
-
responseIdVar
The name of the variable holding "response ID", which is used by rest driver commands to verify/delete response.
The ID is generated internally, and it is used to get the Response Object from the internal Map.
- [ body = ]
The body to send with this REST request.
It can be
- a literal text string for something simple.
- a project-relative or full path to a file of larger body content in the proper format.
The body's content-type could be defined in the headers.
- [ headers = ]
The headers to be included in this REST request.
It can be
- a literal string, such as "If-Modified-Since: Sat, 29 OCT 1994 19:43:31 GMT".
- a map item holding the literal-string or header-file-path.
- a project-relative-path or full-path to a file holding the literal header string.
- [ authentication = ]
The custom authentication/authorization information.
It can be
- a project-relative-path or full-path to a file holding the authentication/authorization information.
- a map item holding the auth-file-path.
This custom authentication/authorization information will override the global settings (in .ini file or by VM parameter.)
and take effect only in this keyword execution. In the next keyword execution, the global authentication/authorization setting
will still be taken in account if no custom auth information is specified.
Examples:
-
T, SAFSREST, ServiceIdItem, RestGetScript, "relativeURL", "ResponseIDVariable"
Within a session, execute a GET method on REST service URL formed by prepending the base-URL to the relative-URI "relativeURL"
The item "ServiceIdItem" MUST be defined in the map such as:
[SAFSREST]
ServiceIdItem=ServiceSession001
The session is identified by sessionID "ServiceSession001", according to which the base-URL is gotten.
If the base-URL is "http://www.service.com/", then the full REST Service URL is "http://www.service.com/relativeURL/".
The Response Object will be stored in an internal Map with a generated ID, which will be saved to a variable ResponseIDVariable.
-
T, SAFSREST, ServiceIdItemNonExist, RestGetScript, "http://www.service.com/relativeURL/", "GetResponseIDVariable"
Without session, execute a GET method on REST service URL "http://www.service.com/relativeURL/".
The item "ServiceIdItemNonExist" should NOT be defined, or defined with an empty value in the map:
[SAFSREST]
ServiceIdItemNonExist=
This action is handled as one-shot connection.
The parameter "relativeURI" is provided as a full path URL "http://www.service.com/relativeURL/".
The Response Object will be stored in an internal Map with a generated ID, which will be saved to a variable GetResponseIDVariable.
[How To Read This Reference]
TIDRestFunctions::RestGetText
Perform the "GET" method on a REST service, and try to get back the plain text content.
This action will send the "GET" method with Headers containing "Accept : text/plain".
It only tells the server what type of content is expected, and it is not guarantee that the server will return it.
If the field SessionIDItem is provided in the map, the keyword RestStartServiceSession SHOULD be executed
before executing this action, which will be handled within a session.
Otherwise, it will be considered as a one-shot connection,
and NO RestStartServiceSession needs to be called and user may need to provide authentication information.
Fields: [ ]=
Optional with Default Value
-
relativeURI
The relative URI combined with a base-URL (stored in a session) to form a REST service URL.
This is normally a relative URI (the base-URL is provided in a session).
BUT it should be full path URL if the field SessionIDItem is not provided or invalid.
-
responseIdVar
The name of the variable holding "response ID", which is used by rest driver commands to verify/delete response.
The ID is generated internally, and it is used to get the Response Object from the internal Map.
- [ body = ]
The body to send with this REST request.
It can be
- a literal text string for something simple.
- a project-relative or full path to a file of larger body content in the proper format.
The body's content-type could be defined in the headers.
- [ headers = ]
The headers to be included in this REST request.
It can be
- a literal string, such as "If-Modified-Since: Sat, 29 OCT 1994 19:43:31 GMT".
- a map item holding the literal-string or header-file-path.
- a project-relative-path or full-path to a file holding the literal header string.
- [ authentication = ]
The custom authentication/authorization information.
It can be
- a project-relative-path or full-path to a file holding the authentication/authorization information.
- a map item holding the auth-file-path.
This custom authentication/authorization information will override the global settings (in .ini file or by VM parameter.)
and take effect only in this keyword execution. In the next keyword execution, the global authentication/authorization setting
will still be taken in account if no custom auth information is specified.
Examples:
-
T, SAFSREST, ServiceIdItem, RestGetText, "relativeURL", "ResponseIDVariable"
Within a session, execute a GET method on REST service URL formed by prepending the base-URL to the relative-URI "relativeURL"
The item "ServiceIdItem" MUST be defined in the map such as:
[SAFSREST]
ServiceIdItem=ServiceSession001
The session is identified by sessionID "ServiceSession001", according to which the base-URL is gotten.
If the base-URL is "http://www.service.com/", then the full REST Service URL is "http://www.service.com/relativeURL/".
The Response Object will be stored in an internal Map with a generated ID, which will be saved to a variable ResponseIDVariable.
-
T, SAFSREST, ServiceIdItemNonExist, RestGetText, "http://www.service.com/relativeURL/", "GetResponseIDVariable"
Without session, execute a GET method on REST service URL "http://www.service.com/relativeURL/".
The item "ServiceIdItemNonExist" should NOT be defined, or defined with an empty value in the map:
[SAFSREST]
ServiceIdItemNonExist=
This action is handled as one-shot connection.
The parameter "relativeURI" is provided as a full path URL "http://www.service.com/relativeURL/".
The Response Object will be stored in an internal Map with a generated ID, which will be saved to a variable GetResponseIDVariable.
[How To Read This Reference]
TIDRestFunctions::RestGetXML
Perform the "GET" method on a REST service, and try to get back the xml text content.
This action will send the "GET" method with Headers containing "Accept : text/xml".
It only tells the server what type of content is expected, and it is not guarantee that the server will return it.
If the field SessionIDItem is provided in the map, the keyword RestStartServiceSession SHOULD be executed
before executing this action, which will be handled within a session.
Otherwise, it will be considered as a one-shot connection,
and NO RestStartServiceSession needs to be called and user may need to provide authentication information.
Fields: [ ]=
Optional with Default Value
-
relativeURI
The relative URI combined with a base-URL (stored in a session) to form a REST service URL.
This is normally a relative URI (the base-URL is provided in a session).
BUT it should be full path URL if the field SessionIDItem is not provided or invalid.
-
responseIdVar
The name of the variable holding "response ID", which is used by rest driver commands to verify/delete response.
The ID is generated internally, and it is used to get the Response Object from the internal Map.
- [ body = ]
The body to send with this REST request.
It can be
- a literal text string for something simple.
- a project-relative or full path to a file of larger body content in the proper format.
The body's content-type could be defined in the headers.
- [ headers = ]
The headers to be included in this REST request.
It can be
- a literal string, such as "If-Modified-Since: Sat, 29 OCT 1994 19:43:31 GMT".
- a map item holding the literal-string or header-file-path.
- a project-relative-path or full-path to a file holding the literal header string.
- [ authentication = ]
The custom authentication/authorization information.
It can be
- a project-relative-path or full-path to a file holding the authentication/authorization information.
- a map item holding the auth-file-path.
This custom authentication/authorization information will override the global settings (in .ini file or by VM parameter.)
and take effect only in this keyword execution. In the next keyword execution, the global authentication/authorization setting
will still be taken in account if no custom auth information is specified.
Examples:
-
T, SAFSREST, ServiceIdItem, RestGetXML, "relativeURL", "ResponseIDVariable"
Within a session, execute a GET method on REST service URL formed by prepending the base-URL to the relative-URI "relativeURL"
The item "ServiceIdItem" MUST be defined in the map such as:
[SAFSREST]
ServiceIdItem=ServiceSession001
The session is identified by sessionID "ServiceSession001", according to which the base-URL is gotten.
If the base-URL is "http://www.service.com/", then the full REST Service URL is "http://www.service.com/relativeURL/".
The Response Object will be stored in an internal Map with a generated ID, which will be saved to a variable ResponseIDVariable.
-
T, SAFSREST, ServiceIdItemNonExist, RestGetXML, "http://www.service.com/relativeURL/", "GetResponseIDVariable"
Without session, execute a GET method on REST service URL "http://www.service.com/relativeURL/".
The item "ServiceIdItemNonExist" should NOT be defined, or defined with an empty value in the map:
[SAFSREST]
ServiceIdItemNonExist=
This action is handled as one-shot connection.
The parameter "relativeURI" is provided as a full path URL "http://www.service.com/relativeURL/".
The Response Object will be stored in an internal Map with a generated ID, which will be saved to a variable GetResponseIDVariable.
[How To Read This Reference]
TIDRestFunctions::RestHeadBinary
TIDRestFunctions::RestHeadCSS
TIDRestFunctions::RestHeadCustom
TIDRestFunctions::RestHeadHTML
TIDRestFunctions::RestHeadImage
TIDRestFunctions::RestHeadJSON
TIDRestFunctions::RestHeadScript
TIDRestFunctions::RestHeadText
TIDRestFunctions::RestHeadXML
TIDRestFunctions::RestPatchBinary
TIDRestFunctions::RestPatchCSS
TIDRestFunctions::RestPatchCustom
TIDRestFunctions::RestPatchHTML
TIDRestFunctions::RestPatchImage
TIDRestFunctions::RestPatchJSON
TIDRestFunctions::RestPatchScript
TIDRestFunctions::RestPatchText
TIDRestFunctions::RestPatchXML
TIDRestFunctions::RestPostBinary
TIDRestFunctions::RestPostCSS
TIDRestFunctions::RestPostCustom
TIDRestFunctions::RestPostHTML
TIDRestFunctions::RestPostImage
TIDRestFunctions::RestPostJSON
TIDRestFunctions::RestPostScript
TIDRestFunctions::RestPostText
TIDRestFunctions::RestPostXML
TIDRestFunctions::RestPutBinary
TIDRestFunctions::RestPutCSS
TIDRestFunctions::RestPutCustom
TIDRestFunctions::RestPutHTML
TIDRestFunctions::RestPutImage
TIDRestFunctions::RestPutJSON
TIDRestFunctions::RestPutScript
TIDRestFunctions::RestPutText
TIDRestFunctions::RestPutXML
TIDRestFunctions::RestRequest
Perform an HTTP method on a REST service.
If the test field SessionIDItem is provided, the keyword RestStartServiceSession SHOULD be executed
before executing this action, which will be handled within a session.
Otherwise, it will be considered as a one-shot connection,
and NO RestStartServiceSession needs to be called and user may need to provide authentication information.
Fields: [ ]=
Optional with Default Value
-
HTTPMethod
The HTTP method to execute.
It can be one of "GET" "DELETE" "POST" "PUT" "PATCH" "HEAD".
-
relativeURI
The relative URI combined with a base-URL (stored in a session) to form a REST service URL.
This is normally a relative URI as the base-URL is provided in a session.
BUT it should be full path URL if the parameter sessionID is not provided.
-
responseIdVar
The name of the variable holding the ID (generated internally), which is used to
get the Response Object from the internal Map.
- [ body = ]
The body to send with this REST request.
The body could be a literal text string for something simple.
The body could also be a project-relative or full path to a file of larger body content in the proper format.
- [ headers = ]
The headers to be included in this REST request.
It can be a literal string, such as "If-Modified-Since: Sat, 29 OCT 1994 19:43:31 GMT".
It can also be a project-relative-path or full-path to a file holding the literal header string.
It can also be a map item holding the literal-string or header-file-path.
- [ authentication = ]
The custom authentication/authorization information.
It can be a project-relative-path or full-path to a file holding the authentication/authorization information.
It can also be a map item holding the auth-file-path.
This custom authentication/authorization information will override the global settings (in .ini file or by VM parameter.)
and take effect in this keyword execution. In the next keyword execution, the global authentication/authorization setting
will still be taken in account if no custom auth information is specified.
Examples:
-
T, SAFSREST, BayerServiceItem, RestRequest, PUT, "sqlrest/PRODUCT/61/", "BayerProductPutResponseIDVariable", "<resource><NAME>CarSeat</NAME><PRICE>125.00</PRICE></resource>", "Content-Type: text/xml"
Execute a PUT method on REST service URL formed by prepending the base-URL to the relative-URI "sqlrest/PRODUCT/61/"
Execute a PUT method on REST service URL formed by prepending the base-URL to the relative-URI "sqlrest/PRODUCT/61/"
It will send XML body "<resource><NAME>CarSeat</NAME><PRICE>125.00</PRICE></resource>" to sever so that "product #61" will be created.
The base-URL is gotten according to sessionID "BayerProductService" (assigned when executing keyword RestStartServiceSession).
If it is "http://www.thomas-bayer.com/", then the full REST Service URL is "http://www.thomas-bayer.com/sqlrest/PRODUCT/61/".
The Response Object will be stored in an internal Map with a generated ID, which will be saved to a variable BayerProductPutResponseIDVariable.
-
T, SAFSREST, BayerServiceItemNonExist, RestPut, PUT, "http://www.thomas-bayer.com/sqlrest/PRODUCT/61/", "BayerProductPutResponseIDVariable", "<resource><NAME>CarSeat</NAME><PRICE>125.00</PRICE></resource>", "Content-Type: text/xml"
Execute a PUT method on REST service URL "http://www.thomas-bayer.com/sqlrest/PRODUCT/61/".
Execute a PUT method on REST service URL "http://www.thomas-bayer.com/sqlrest/PRODUCT/61/".
It will send XML body "<resource><NAME>CarSeat</NAME><PRICE>125.00</PRICE></resource>" to sever so that "product #61" will be created.
The map item BayerServiceItemNonExist does NOT exist, this action is handled as one-shot connection.
The parameter relativeURI is provided a full path URL "http://www.thomas-bayer.com/sqlrest/PRODUCT/61/".
The Response Object will be stored in an internal Map with a generated ID, which will be saved to a variable BayerProductPutResponseIDVariable.
[How To Read This Reference]
TIDRestFunctions::RestStartServiceSession
Start a session for a REST service.
Currently the "base URL" and "authentication information" will be stored for the opened session.
Fields: [ ]=
Optional with Default Value
-
baseURL
The base URL to be stored with a session.
This base URL will be prepended to a relative URI to form a REST service URL for the
later invocation of other REST actions.
- [ authentication = ]
The file holding authentication information to be used during this session.
Normally, the authentication information will be loaded from "JVM -D parameters", "Map", or global
external file, those settings are considered to be global. This parameter can
be used to alternate the authentication information, it will override the global settings.
It is normally provided as a file name holding the authentication information. The file is relative
to the project's root directory, and it can contain sub directories.
If it is provided as NOAUTHENTICATION, then no authentication is needed during the session
even the global settings are set.
Examples:
-
T, SAFSREST, BayerSessionID, RestStartServiceSession, "http://www.thomas-bayer.com/"
Start a session for a REST service based on URL "http://www.thomas-bayer.com/".
This session will be assigned with ID as value of map item BayerSessionID under section SAFSREST.
-
T, SAFSREST, BayerSessionID, RestStartServiceSession, "http://www.thomas-bayer.com/", configure/simpleauth.xml
Start a session for a REST service based on URL "http://www.thomas-bayer.com/", and this session will use
authentication information stored in file <project>/configure/simpleauth.xml.
This session will be identified by ID, which is already defined by map-item BayerSessionID under section SAFSREST.
The file <project>/configure/simpleauth.xml contains authentication information, example as below:
<SimpleAuth classname="org.safs.auth.SimpleAuth">
<password>unitA123</password>
<userName>Mark</userName>
</SimpleAuth>
[How To Read This Reference]