Custom-Built Web Service Properties

Fabric Web Services properties include metadata that contributes to the definitions, functionalities and characteristics of the Web Service.

At Graphit, it is done at the Properties Panel, which opens when clicking on the icon at the top Graphit Editor toolbar. Some other settings are done via the nodes' types or properties.

These settings are available only when 'Expose as Endpoint' is checked.

At Java function, the Web Service Properties panel is located on the top right corner of the Web Service window.

drawing

At Java function, the Web Service properties setting is done using annotations, as explained here.

Some of the properties are available on both Java and Graphit, as follows:

Property

Description

Version

Representation of the web service versioning. A version number is incorporated into the web service’s URL and is used to enable several web service versions, for example to serve various clients. Version is not mandatory and can be omitted. The default population of Version is 1.

Versioning Logic 

  • If the version is not a part of the URL, the API will respond with the latest version.
  • If the version is a part of the URL and the API version exists, the API will respond with the specified version.
  • If the version is a part of the URL and the latest API version is lower, the API will respond with the latest version.
  • If the version is a part of the URL and is lower than the lowest API version, the API will return the correct error response code.
  • If the version is a part of the URL and is in between 2 API versions, the API will respond with the lower version.

At Graphit, the versioning setting is done by incorporating it as a part of the file name. For example: "a.v1.graphit".
At Java function, it is done via the Properties Panel. At Java function, it is done via the @version annotation.

Path

Enable overriding the URL path of a web service.

Note that in case where more than a single web service has the same path, the deployment will fail.
For both Graphit and Java function it is done via the Properties Panel. For Graphit it is done via the Properties Panel, whereas for Java function it is done using the path property of the @webservice annotation .

Verb

Methods supported by the web service, as follows: 

  • GET - get data. 
  • POST - create new data based on the data provided. 
  • PUT - update data. 
  • DELETE - delete data.

At Graphit, the verb setting is done by incorporating it as a part of the file name. For example: "a.POST.graphit". Only a single verb can be set. Yet, when a verb is omitted, the web service is exposed with GET and POST verbs.

  • The verb name is not case sensitive.
  • The verb name is not a part of the URL path of the web service. It is used to hint the server how to expose and serve it.
  • According to the name, a different URL preview is shown at the Properties Panel. For example, for POST and PUT verbs, a request body will be shown as an example of how parameters shall be sent, while for GET and DELETE verbs, only a URL path will be shown and parameters are a part of it.

At Java function, it is done via the Properties Panel, by selecting at least one method from the dropdown list and checking it. At Java function, it is done via the verb property of the @webservice annotation.

More than a single verb method can be set for a Java function web service.

Is Raw

Indicates whether the output structure should be automatically manipulated by Fabric.

Values are either True or False.

Default = False. When True, Fabric retrieves the data response 'as is', without parsing or formatting it, thus aligning it with the web service's output format.

At Graphit, it is done by setting a node type as "raw".

At Java function, it is done via the Properties Panel or by using the @isRaw annotation. At Java function, it is done via the isRaw property of the @webservice annotation.

Produce

Web Service’s output format.

Default format: JSON

Additional formats: XML, CSV.

To select a format at Graphit - that is, restricting it to a specific format - set this format property to the top root node. If no restriction is required, then do not set a format on the top root node.

To select a format at Java function, click the dropdown menu and enable it/them set the produce property of the @webservice annotation
In case formats are set, then when trying to call the web service with the 'format' parameter, which does not match the set format/s, an appropriate error response will be returned.

Serialize null

If True, display fields with a null value in the response. Else, ignore fields with null values. The default is True.

At Graphit, it is done by setting the 'show Null' node property .

At Java function, it is done via the Properties Panel. At Java function, it is done via the @serializeNull annotation.

Additional Permissions

When the web service caller is prohibited from making some Farbic acts according to his role permissions, and web service Elevated Permission (relevant for Java function) is set to False, the developer might still wish that the caller would be able to activate certain methods, only for this web service scope. An example of such method is running a BATCH command. In such case, the developer can grant the caller with a permission for the web service session only.

To apply these permissions, the developer should specify what methods are allowed. At the Web Service Properties pane:

  1. For Java fucntion: Set the "Elevated Permission" to False. The "Additional Permissions" property becomes enabled.
  2. Open the "Additional Permissions" and choose the methods that should be permitted, using the checkboxes.
Alternatively, the permissions can be set in a code, using the function 'additionalPermissions' annotation.


Permissions shall be granted carefully.
Added for Fabric release 6.5.8

Require Authentication

Indicates whether a web service requires authentication or not. Default is set to True.

When set to False, it will allow calling the web service by skipping the Authentication step. This mode should be carefully used; use it only when a Web Service should be accessible for everyone, without enforcing an API key, a user/password, etc.
Added for Fabric release 6.5.4

Description

Web Service’s description for Open API Spec.


Following are properties that are available only for Java function web services:

Property

Description

Return Type

Type of Output value returned from the web service, e.g., String, Long, Map, List, Customized Class or Object. These Output values can be overridden with new values.  When sent on the response (as either JSON or XML), Fabric knows how to automatically serialize complex structures.

Custom Payload

Indicates whether input parameters are automatically acquired by Fabric from the input stream as defined in the input parameters panel, or if they should be implemented by the implementor manually.
Default is False, whereby input parameters are automatically handled by Fabric. Click here to see a code snippet for an XML format payload or for a JSON format payload. This flag must be set to True in the properties panel in order to be activated.

Elevated Permission

Indicates if user permissions should be elevated to the Web Service. Default is set to False.

For example, when set to False and the user role has no WRITE permissions, the user will not be able to write into Fabric using the Web Service. However, when the Elevated Permission is set to True on a Web Service, this restriction is dismissed. Added for Fabric V6.5.3

Starting from Fabric V6.5.8, when a user role has a security profile that prevents him from accessing some LU tables, setting the Elevated Permission to True dismisses this restriction.
Click here for more information about Security Profiles.

Result Metadata

Response example to be displayed in Swagger before the web service call.

Set example-JSON, example-XML and example-CSV.


Previous

Custom-Built Web Service Properties

Fabric Web Services properties include metadata that contributes to the definitions, functionalities and characteristics of the Web Service.

At Graphit, it is done at the Properties Panel, which opens when clicking on the icon at the top Graphit Editor toolbar. Some other settings are done via the nodes' types or properties.

These settings are available only when 'Expose as Endpoint' is checked.

At Java function, the Web Service Properties panel is located on the top right corner of the Web Service window.

drawing

At Java function, the Web Service properties setting is done using annotations, as explained here.

Some of the properties are available on both Java and Graphit, as follows:

Property

Description

Version

Representation of the web service versioning. A version number is incorporated into the web service’s URL and is used to enable several web service versions, for example to serve various clients. Version is not mandatory and can be omitted. The default population of Version is 1.

Versioning Logic 

  • If the version is not a part of the URL, the API will respond with the latest version.
  • If the version is a part of the URL and the API version exists, the API will respond with the specified version.
  • If the version is a part of the URL and the latest API version is lower, the API will respond with the latest version.
  • If the version is a part of the URL and is lower than the lowest API version, the API will return the correct error response code.
  • If the version is a part of the URL and is in between 2 API versions, the API will respond with the lower version.

At Graphit, the versioning setting is done by incorporating it as a part of the file name. For example: "a.v1.graphit".
At Java function, it is done via the Properties Panel. At Java function, it is done via the @version annotation.

Path

Enable overriding the URL path of a web service.

Note that in case where more than a single web service has the same path, the deployment will fail.
For both Graphit and Java function it is done via the Properties Panel. For Graphit it is done via the Properties Panel, whereas for Java function it is done using the path property of the @webservice annotation .

Verb

Methods supported by the web service, as follows: 

  • GET - get data. 
  • POST - create new data based on the data provided. 
  • PUT - update data. 
  • DELETE - delete data.

At Graphit, the verb setting is done by incorporating it as a part of the file name. For example: "a.POST.graphit". Only a single verb can be set. Yet, when a verb is omitted, the web service is exposed with GET and POST verbs.

  • The verb name is not case sensitive.
  • The verb name is not a part of the URL path of the web service. It is used to hint the server how to expose and serve it.
  • According to the name, a different URL preview is shown at the Properties Panel. For example, for POST and PUT verbs, a request body will be shown as an example of how parameters shall be sent, while for GET and DELETE verbs, only a URL path will be shown and parameters are a part of it.

At Java function, it is done via the Properties Panel, by selecting at least one method from the dropdown list and checking it. At Java function, it is done via the verb property of the @webservice annotation.

More than a single verb method can be set for a Java function web service.

Is Raw

Indicates whether the output structure should be automatically manipulated by Fabric.

Values are either True or False.

Default = False. When True, Fabric retrieves the data response 'as is', without parsing or formatting it, thus aligning it with the web service's output format.

At Graphit, it is done by setting a node type as "raw".

At Java function, it is done via the Properties Panel or by using the @isRaw annotation. At Java function, it is done via the isRaw property of the @webservice annotation.

Produce

Web Service’s output format.

Default format: JSON

Additional formats: XML, CSV.

To select a format at Graphit - that is, restricting it to a specific format - set this format property to the top root node. If no restriction is required, then do not set a format on the top root node.

To select a format at Java function, click the dropdown menu and enable it/them set the produce property of the @webservice annotation
In case formats are set, then when trying to call the web service with the 'format' parameter, which does not match the set format/s, an appropriate error response will be returned.

Serialize null

If True, display fields with a null value in the response. Else, ignore fields with null values. The default is True.

At Graphit, it is done by setting the 'show Null' node property .

At Java function, it is done via the Properties Panel. At Java function, it is done via the @serializeNull annotation.

Additional Permissions

When the web service caller is prohibited from making some Farbic acts according to his role permissions, and web service Elevated Permission (relevant for Java function) is set to False, the developer might still wish that the caller would be able to activate certain methods, only for this web service scope. An example of such method is running a BATCH command. In such case, the developer can grant the caller with a permission for the web service session only.

To apply these permissions, the developer should specify what methods are allowed. At the Web Service Properties pane:

  1. For Java fucntion: Set the "Elevated Permission" to False. The "Additional Permissions" property becomes enabled.
  2. Open the "Additional Permissions" and choose the methods that should be permitted, using the checkboxes.
Alternatively, the permissions can be set in a code, using the function 'additionalPermissions' annotation.


Permissions shall be granted carefully.
Added for Fabric release 6.5.8

Require Authentication

Indicates whether a web service requires authentication or not. Default is set to True.

When set to False, it will allow calling the web service by skipping the Authentication step. This mode should be carefully used; use it only when a Web Service should be accessible for everyone, without enforcing an API key, a user/password, etc.
Added for Fabric release 6.5.4

Description

Web Service’s description for Open API Spec.


Following are properties that are available only for Java function web services:

Property

Description

Return Type

Type of Output value returned from the web service, e.g., String, Long, Map, List, Customized Class or Object. These Output values can be overridden with new values.  When sent on the response (as either JSON or XML), Fabric knows how to automatically serialize complex structures.

Custom Payload

Indicates whether input parameters are automatically acquired by Fabric from the input stream as defined in the input parameters panel, or if they should be implemented by the implementor manually.
Default is False, whereby input parameters are automatically handled by Fabric. Click here to see a code snippet for an XML format payload or for a JSON format payload. This flag must be set to True in the properties panel in order to be activated.

Elevated Permission

Indicates if user permissions should be elevated to the Web Service. Default is set to False.

For example, when set to False and the user role has no WRITE permissions, the user will not be able to write into Fabric using the Web Service. However, when the Elevated Permission is set to True on a Web Service, this restriction is dismissed. Added for Fabric V6.5.3

Starting from Fabric V6.5.8, when a user role has a security profile that prevents him from accessing some LU tables, setting the Elevated Permission to True dismisses this restriction.
Click here for more information about Security Profiles.

Result Metadata

Response example to be displayed in Swagger before the web service call.

Set example-JSON, example-XML and example-CSV.


Previous