High-level RESTful Web service attributes

Attributes for high-level RESTful Genero Web Services.

The attributes listed in Table 1 cannot have values.

Table 1. HTTP verb attributes
Attribute Description
In order to remove an existing resource, you set the WSDelete attribute.
In order to retrieve a resource, you set the WSGet attribute.
In order to retrieve resource headers, you define the WSHead attribute.
In order to partially update an existing resource, you define the WSPatch attribute.
In order to create a new resource, you set the WSPost attribute.
Update an existing resource with the WSPut attribute.
You define the WSTrace attribute for debugging purposes.
Table 2. URL path attributes
Attribute Description
WSPath = "/{ path-element | value-template } [/...]"
Specifies a path to a REST Web service resource that identifies its function and allows parameters to be passed in the URL.
Table 3. Input parameters attributes (only)
Attribute Description
Specifies a value for a template path to a REST Web service resource.
Allows cookies to be passed to Web service REST function.
Specifies the query string that appears after a question mark (?) in the request URL.
Table 4. Input parameters and return values attributes
Attribute Description
Defines custom headers in the request and response of Web service functions.
Defines file attachments in the REST message.
Table 5. Module level attributes
Attribute Description
Defines an injection variable to retrieve REST operation context values at the service level.
WSError= "description"
Specifies a description of the status-code that is returned in the HTTP response.
Specify information about the Web service such as title, version, contact details, scopes, etc.
WSScope = "{ scope } [,...]"
Specify access via scopes that applies at the whole Web service level (the module).
WSVersion = "{ version }"
Set a default set of operations to display in the OpenAPI documentation.
Table 6. Error handling attributes
Attribute Description
WSThrows = "{ code | code:description | code:@variable } [,...]"
Defines a list of errors that may be encountered accessing a REST resource.
WSRetCode= "{ code | code:description } "
Defines the HTTP success status sent in the REST response.
Table 7. Security handling attributes
Attribute Description
WSScope = "{ scope } [,...]"
Specify security in the REST service via scopes.