Network Actions
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 |
Example
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
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 |
Example
hostname = getHostName()
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 NoteA bridge must be in the DEPLOYED state to get connection information from it |
Example
bridgeConnection = getIdBridgeConnectInfo('bridge-name') if (bridgeConnection) { log("host=" + bridgeConnection.host, "INFO") log("port=" + bridgeConnection.port, "INFO") } else { log("Bridge not available", "INFO") }
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 |
Example
ipAddress = getIPAddress()
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 |
Example
dssWADL = readURL("http://127.0.0.1:8080/dss/ws/dss?_wadl");