Within this Record endpoints and their Authentication Types and Authentication values are stored.
Authentifizierung Fields
Endpoint URL
Specifies the endpoint URL.
Type
Specifies the authorization type.
OAuth, Fields
This authentication type can be used to retrieve tokens from Microsoft Identy Platform authorisation servers.
The option "Client Credentials" is supported as an OAuth2 flow.
OAuth URL
Specifies the OAuth token endpoint.
Client ID
Specifies the client id.
Client Secret
Specifies the client secret.
Basic, Fields
Username
Specifies the username.
Password
Specifies the password.
Bearer Token, Fields
Bearer Token Login Url
Specifies the Bearer Token Login Url.
Requires Encryption
Specifies if the Login Url requires the credentials to be passed encrypted.
Bearer Token Json Key
Specifies the Key of the Json Value in the Http Response from the Bearer Token Login, which contains the Bearer Token.
Username
Specifies the username.
Password
Specifies the password.
Encryption, Fields
Encryption Algorithm
Specifies the encryption algorithm to be used.
Encryption Key Secret
Specifies the key for a keyed cryptographic function.
API Key, Fields
API Key Header Name
Specifies the name of the request header to be used for the api key.
API Key
Specifies the api key.
OAuth-external, Fields
This authentication type can be used to retrieve tokens from authorisation servers outside the Microsoft Identy Platform.
The option "Client Credentials" is supported as an OAuth2 flow.
OAuth2 Flow
Specifies which OAuth 2.0 flow you want to use.
OAuth URL
Specifies the OAuth token endpoint.
Client ID
Specifies the client id.
Client Secret
Specifies the client secret.
Scope
Specifies the scope of the token. If empty then * will be used.
Actions
Test Credentials and Connection
Sends a HTTP GET request with the provided credentials to the endpoint, to check if the endpoint can be reached and to check if the credentials are correct. If Bearer Token or OAuth2 authentication is being used, an additional request will be made to check if the provided credentials result in a valid token. The response of the tested webservice is being displayed as a message.
Creates a test webrequest with this authentification.
Web Messages
With this Record HTTP Requests can be created and sent to the Endpoints, from the WebAuthentication Record.
The sent Requests are being retent for one month.
Fields
Entry No.
Specifies the number of the record.
Date and Time
Specifies the date and time when the record was created.
Method
Specifies the web request method.
Target URL
Specifies the targeted url.
Payload
Specifies the sent payload of the request.
Response
Specifies the payload of the received response.
Response Reason Phrase
Specifies the http reason phrase of the received response.
Response Is Success Status
Specifies if the http request was accepted or denied.
Response Status Code
Specifies the http reason status code.
Procedures
CreateMessage
This Procedure creates a new WebMessage based on the given parameters.
Parameters
RequestType Enum "Http Request Type" -> the HTTP Method of the Request to be sent
TargetURL Text[250] -> the URL of the Endpoint
RequestContent Text -> the Request Body
AddWebMessageHeader
Creates a HTTP Header for an exisiting WebMessage.
Parameter
HeaderType Enum "WULWebMessageHeaderTypeNVX" -> Type of the HTTP Header (Request or Content Header)
Name Text -> Name of the Header
Value Text -> Value of the Header
AddWebMessageAuthorization
Creates a HTTP Header for the configured authorization for an exisiting WebMessage.
Parameter
HeaderType Enum "WULWebMessageHeaderTypeNVX" -> Type of the HTTP Header (Request or Content Header)
WebAuthorization Record "WULWebAuthorizationNVX" -> the configured authorization
SendMessage
Sends an existing WebMessage to the specified Webservice.
Parameter
var ResponseMessage: HttpResponseMessage -> the Response of the Receiver
procedure ExecuteWebService(Payload: Text; WebAuthorization: Record WULWebAuthorizationNVX; EndpointURL: Text)
var
WebMessage: Record WULWebMessageNVX;
ResponseMessage: HttpResponseMessage;
BodyContent: Text;
ResponseText: Text;
begin
WebMessage.CreateMessage("Http Request Type"::POST, EndpointURL, BodyContent);
WebMessage.AddWebMessageHeader(WULWebMessageHeaderTypeNVX::"Content Header", 'Content-Type', 'application/json');
WebMessage.AddWebMessageAuthorization(WULWebMessageHeaderTypeNVX::"Request Header", WebAuthorization);
Commit();
WebMessage.SendMessage(ResponseMessage);
Commit();
ResponseText := WebMessage.GetResponse();
end;
Web Message Headers
This record stores and manages the HTTP Headers which shall be appended to the HTTP Request.
Fields
Name
Specifies the name of the header.
Value
Specifies the value of the header.
MultiPart/Form-Data Helper
For the complex content-type MultiPart/Form-Data there is a helper codeunit for the createn of such contents added.
MultiPart/Form-Data Helper