Execute Function

Execute a NEXUS function.

HTTP Request

POST /icweb.dll/function/{functionName}/?format={format}

URI Parameters

Name

In

Required

Type

Description

functionName | functionKey

Path

Yes

String | Integer

Specify the function name or function key to be executed .

format

Path

No

String

Possible values are value or png. value is the default if omitted, and ensures the result of the function is returned. If png is specified then the result will be a png containing the function preview with results.

Request Body

This contains parameters and their values to use to execute the function. For simplicity, you should only include fields that have a value other than null.

Name

Type

Description

Optional

Default

{parameterName}

Any

Should contain the new value for the specified field, see FunctionParameter.

Yes

You can omit a parameter if the value is null.

Responses

Name

Type

Description

200 OK

FunctionResult

OK

200 OK

image/png

An image containing the function layout with results

403

Not authorised

An attempt was made to access a function when you do not have permissions.

FunctionResult

The Function result, contains the result of the function execution, or if an error occurred the message.

Name

Type

Description

Optional

state

string

State of the function call, ok or error.

No

value

Any

If state is ok then this will hold the result of the function execution.

Yes

message

String

If state is error then this will contain the error message returned from the function.

Yes

Example

Request

POST /icweb.dll/function/Compare A = B/

{
        "A": 5,
        "B": 3.4
}

Response

{
        "state": "ok",
        "value": false
}

Request

POST /icweb.dll/function/Compare A = B/?format=png
{
        "A": true
        "B": 4
}

Response

_images/rest_function_example.png