Outgoing rest web services
Administration Page | Application/Contract | Syracuse/Collaboration | |
---|---|---|---|
Class | restWebServices | Representation | restWebService |
This function is used to declare outgoing rest web services. They will be used from a SAFE X3 dedicated API.
An outgoing rest web service is identified by a name that is mandatory, unique and will be used when the call is done.
The other parameters that have to be filled are the following:
Base URL
This base URL will be the prefix of the call to the service. Usually, it includes only the beginning of a URL that can provide different services (the services URL can be given when the call is done).
Content type
Defines the format of the data exchanged. It can be either XML or JSON.
Authentication
Defines if an authentication is requested when the service is called. The choices are
None
orBasic
.Parameters
This array allows you to define parameters as a list of keys ans associated values. These parameters can be overridden during the web service call.
Headers
This array allows you to define parameters sent in the HTTP language such as
accept
,accept-language
, and so forth with the associated values. These parameters can also be overridden during the web service call.
An operation called Test get
is available on the right panel. It calls the web service in get mode. If the result status is OK (200), a blue bar is displayed with the corresponding message. If an error occurs, the corresponding http code with the status description is displayed in a red bar.
The library ASYRRESTCLI contains the functions used to execute outgoing REST web services.