Fabric lets you pass input parameters to the custom-built web services, with various ways to define it and with a flexibility when passing them.
Fabric provides easy methods to define the expected input parameters for a web service, either Graphit or Java function. For each of the parameters you can define its name, type and whether it is mandatory.
To learn how to define input parameters for Graphit - read here
To learn how to define input parameters for Java function - read here
To learn how to define input parameters for Java function using annotations - read here
Input parameters can be transferred to the project custom-built Web Services either as:
For POST and PUT verb methods, parameters shall be transferred in the request body and yet, Fabric knows to use URL based parameters also for these verb methods.
When input parameters are not set as a part of the URL path, transfer them according to the web service verb (method).
For GET verb - it looks like this pattern: /api/[VERSION_NO]/<Web-Service name>?[param1 name]=[param1 value]&[param2 name]=[param2 value]...&
For example:
http://localhost:3213/api/v1/wsMigrateStatsParams?i_migrateId=dca63eda-1553-40b7-b2e8-ae098b3c2c04&i_runMode=S
When calling to web services set with PUT and POST verbs, parameters shall be sent in the request body.
Input parameters can be a part of a request URL path, by adding them to the path wrapped in curly brackets. For example, for a WS named 'demo' with x & y parameters, use 'demo/{x}/{y}', where request call can be: "demo/1/2" (x=1, y=2).
A combination of the 2 methods can be used as well, e.g. "demo/{x}?y=".
To define it for Graphit:
Click on the icon at the top Graphit Editor toolbar.
Edit the Override Path section.
To define it for Java function, edit the Path property at the right Properties Panel in the Java functions Editor.
For example:
In the above screenshot, the i_migrateId and i_runMode input parameters have been set as a part of the URL related to the wsMigrateStatsParams Web Service, which is called as follows:
http://localhost:3213/api/wsMigrateStatsParams/dca63eda-1553-40b7-b2e8-ae098b3c2c04/S
Where:
To define it for Java function, edit the annotation as explained here.
Fabric lets you pass input parameters to the custom-built web services, with various ways to define it and with a flexibility when passing them.
Fabric provides easy methods to define the expected input parameters for a web service, either Graphit or Java function. For each of the parameters you can define its name, type and whether it is mandatory.
To learn how to define input parameters for Graphit - read here
To learn how to define input parameters for Java function - read here
To learn how to define input parameters for Java function using annotations - read here
Input parameters can be transferred to the project custom-built Web Services either as:
For POST and PUT verb methods, parameters shall be transferred in the request body and yet, Fabric knows to use URL based parameters also for these verb methods.
When input parameters are not set as a part of the URL path, transfer them according to the web service verb (method).
For GET verb - it looks like this pattern: /api/[VERSION_NO]/<Web-Service name>?[param1 name]=[param1 value]&[param2 name]=[param2 value]...&
For example:
http://localhost:3213/api/v1/wsMigrateStatsParams?i_migrateId=dca63eda-1553-40b7-b2e8-ae098b3c2c04&i_runMode=S
When calling to web services set with PUT and POST verbs, parameters shall be sent in the request body.
Input parameters can be a part of a request URL path, by adding them to the path wrapped in curly brackets. For example, for a WS named 'demo' with x & y parameters, use 'demo/{x}/{y}', where request call can be: "demo/1/2" (x=1, y=2).
A combination of the 2 methods can be used as well, e.g. "demo/{x}?y=".
To define it for Graphit:
Click on the icon at the top Graphit Editor toolbar.
Edit the Override Path section.
To define it for Java function, edit the Path property at the right Properties Panel in the Java functions Editor.
For example:
In the above screenshot, the i_migrateId and i_runMode input parameters have been set as a part of the URL related to the wsMigrateStatsParams Web Service, which is called as follows:
http://localhost:3213/api/wsMigrateStatsParams/dca63eda-1553-40b7-b2e8-ae098b3c2c04/S
Where:
To define it for Java function, edit the annotation as explained here.