RestOperation Class

A class that represents a REST operation.


Constructors

|Name | Description | |------| |RestOperation(String, String[], String[], OperationHandler)| Creates a new RestOperation instance. | | RestOperation(String, String[], String[], OperationHandler, Boolean) | Creates a new RestOperation instance. | | RestOperation(String, String[], String[], OperationHandler, String) | Creates a new RestOperation instance. | | RestOperation(String, String[], String[], OperationHandler, String, Boolean) | Creates a new RestOperation instance. |

RestOperation(String, String[], String[], OperationHandler) Constructor

Creates a new RestOperation instance.

Use dark colors for code blocksCopy
1
2
3
4
public RestOperation(string name,
    string[] parameters,
    string[] supportedFormats,
    OperationHandler handler)
ParameterDescription
nameThe name of the operation.
parametersThe parameters for the operation.
supportedFormatsThe output formats supported by the operation (e.g. "json").
handlerThe operation handler function that should be called when requests for this operation are received.

RestOperation(String, String[], String[], OperationHandler, Boolean) Constructor

Creates a new RestOperation instance.

Use dark colors for code blocksCopy
1
2
3
4
5
public RestOperation(string name,
    string[] parameters,
    string[] supportedFormats,
    OperationHandler handler,
    bool postOnly)
ParameterDescription
nameThe name of the operation.
parametersThe parameters for the operation.
supportedFormatsThe output formats supported by the operation (e.g. "json").
handlerThe operation handler function that should be called when requests for this operation are received.
postOnlyIndicates if the operation should be supported only for HTTP POST requests (not GET).

RestOperation(String, String[], String[], OperationHandler, String) Constructor

Creates a new RestOperation instance.

Use dark colors for code blocksCopy
1
2
3
4
5
public RestOperation(string name,
    string[] parameters,
    string[] supportedFormats,
    OperationHandler handler,
    string requiredCapability)
ParameterDescription
nameThe name of the operation.
parametersThe parameters for the operation.
supportedFormatsThe output formats supported by the operation (e.g. "json").
handlerThe operation handler function that should be called when requests for this operation are received.
requiredCapabilityThe capability required in a configuration for an operation to be executable.

RestOperation(String, String[], String[], OperationHandler, String, Boolean) Constructor

Creates a new RestOperation instance.

Use dark colors for code blocksCopy
1
2
3
4
5
6
public RestOperation(string name,
    string[] parameters,
    string[] supportedFormats,
    OperationHandler handler,
    string requiredCapability,
    bool postOnly)
ParameterDescription
nameThe name of the operation.
parametersThe parameters for the operation.
supportedFormatsThe output formats supported by the operation (e.g. "json").
handlerThe operation handler function that should be called when requests for this operation are received.
requiredCapabilityThe capability required in a configuration for an operation to be executable.
postOnlyIndicates if the operation should be supported only for HTTP POST requests (not GET).

Fields

FieldField valueDescription
RestOperation.nameStringThe name of the operation.
RestOperation.parametersString[]The parameters for the operation.
RestOperation.supportedOutputFormatsString[]The output formats supported by an operation (e.g. "json").
RestOperation.postOnlyBooleanIndicates if the operation should be supported only for HTTP POST requests (not GET).

Properties

PropertyProperty valueDescription
RestOperation.RequiredCapabilityStringThe capability required in a configuration for an operation to be executable.

Methods

NameDescription
RestOperation.ToJsonObject()Converts the RestOperation to a JsonObject instance.

RestOperation.ToJsonObject() Method

Converts the RestOperation to a JsonObject instance.

Use dark colors for code blocksCopy
1
public JsonObject ToJsonObject()

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.