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
WSDelete
In order to remove an existing resource, you set the WSDelete attribute.
WSGet
In order to retrieve a resource, you set the WSGet attribute.
WSHead
In order to retrieve resource headers, you define the WSHead attribute.
WSPatch
In order to partially update an existing resource, you define the WSPatch attribute.
WSPost
In order to create a new resource, you set the WSPost attribute.
WSPut
Update an existing resource with the WSPut attribute.
WSTrace
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
WSParam
Specifies a value for a template path to a REST Web service resource.
WSCookie
Allows cookies to be passed to Web service REST function.
WSQuery
Specifies the query string that appears after a question mark (?) in the request URL.
Table 4. Input parameters and return values attributes
Attribute Description
WSHeader
Defines custom headers in the request and response of Web service functions.
WSAttachment [= "regexp_pattern"]
Defines file attachments in the REST message.
Table 5. Module level attributes
Attribute Description
WSContext
WSContext 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.
WSInfo
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.
WSVersionMode = "{ uri | header | query }"
Defines the method of access when the GWS generates the OpenAPI documentation.
WSTypeDescription=" description "
Describes a user-defined type.
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.
WSErrorHeader= "{ code } [,...]"
Defines custom headers in the error response of web service functions.
Table 7. Security handling attributes
Attribute Description
WSScope = "{ scope } [,...]"
Specify security in the REST service via scopes.