- 03 Jun 2022
- 1 Minute to read
- Print
- DarkLight
Network Actions
- Updated on 03 Jun 2022
- 1 Minute to read
- Print
- DarkLight
Network Actions
createRESTPointResponse
Create a new RESTPoint Response.
Property | Value | Description |
statusCode | text, expression, variable | the HTTP status code (default: OK) |
data | text, expression, variable | the content data of the HTTP response (default: empty content) |
contentType | choice (application/json, application/xml, text/xml, text/plain, application/octet-stream), text, expression, variable | the MIME type of the data (default: whatever is defined by the RESTPoint) |
headers | expression, variable | Record or Object containing HTTP header fields |
cookies | expression, variable | Record or Object containing HTTP cookies |
returnVariable | expression, variable | name of the variable to be assigned to the return value |
response = null
if(record == null) {
recordJSON = toJSON(recordJSON)
response = createRESTPointResponse(200, recordJSON,
"application/json")
} else {
response = createRESTPointResponse(404, '{"status": "Not Found"}',
"application/json")
}
return response
getHostName
Gets the hostname of the server hosting the current process.
Property | Value | Description |
returnVariable | expression, variable | name of the variable to be assigned to the return value |
hostname = getHostName()
getIdBridgeConnectInfo
Gets the host and port for a particular Identity Bridge.
Property | Value | Description |
returnVariable | expression, variable | name of the variable to be assigned to the return value |
name | text, expression, variable | The name of the Identity Bridge to find connection information for Note A bridge must be in the DEPLOYED state to get connection information from it |
bridgeConnection = getIdBridgeConnectInfo('bridge-name')
if (bridgeConnection) {
log("host=" + bridgeConnection.host, "INFO")
log("port=" + bridgeConnection.port, "INFO")
} else {
log("Bridge not available", "INFO")
}
getIPAddress
Gets the IP address of the server hosting the current process.
Property | Value | Description |
returnVariable | expression, variable | name of the variable to be assigned to the return value |
ipAddress = getIPAddress()
readURL
Read the contents of a URL.
Property | Value | Description |
url* | text, expression, variable | the URL |
returnVariable | expression, variable | name of the variable to be assigned to the return value |
dssWADL = readURL("http://127.0.0.1:8080/dss/ws/dss?_wadl");