Codeunit 70623872 EOS 070 IoT Hub Client
Codeunit 70623872 EOS 070 IoT Hub Client
Methods
GetClient
procedure GetClient(): HttpClient
Procedure which returns an HttpClient instance.
Parameters / Return Value
Returns
HttpClient
An HttpClient instance
InitializeClient
procedure InitializeClient(SASToken: Text)
Procedure which initializes the HttpClient with the provided parameters.
Parameters / Return Value
SASToken
Text[]
The SAS token to add as Authorization header
AddRequestHeader
procedure AddRequestHeader(Name: Text; Value: Text)
Procedure which adds a request header to the HttpClient.
Parameters / Return Value
Name
Text[]
Value
Text[]
GetDevices
procedure GetDevices(HubName: Text): Boolean
Procedure which gets the identities of multiple devices from the IoT Hub identity registry.
Parameters / Return Value
HubName
Text[]
The name of the hub to query
Returns
Boolean
A value that indicates if the HTTP response was successful
InvokeMethod
procedure InvokeMethod(Device: Record "EOS 070 IoT Device"; Method: Text; Payload: Text; var ResponseMessage: HttpResponseMessage): Boolean
Procedure which invokes a direct method on a device.
Parameters / Return Value
Device
Record "EOS 070 IoT Device"
The device where to invoke the method
Method
Text[]
The name of the method to invoke
Payload
Text[]
The payload of the method
ResponseMessage
HttpResponseMessage
The HTTP response
Returns
Boolean
A value that indicates if the HTTP response was successful
Events
OnBeforeGetDevices
local procedure OnBeforeGetDevices(Hub: Record "EOS 070 IoT Hub Setup"; Endpoint: Record "EOS 070 IoT Hub Endpoint"; Device: Record "EOS 070 IoT Device"; var ResponseMessage: HttpResponseMessage; var Handled: Boolean)
Parameters / Return Value
Hub
Record "EOS 070 IoT Hub Setup"
Endpoint
Record "EOS 070 IoT Hub Endpoint"
Device
Record "EOS 070 IoT Device"
ResponseMessage
HttpResponseMessage
Handled
Boolean
OnBeforeInvokeMethod
local procedure OnBeforeInvokeMethod(Hub: Record "EOS 070 IoT Hub Setup"; Endpoint: Record "EOS 070 IoT Hub Endpoint"; Method: Text; Payload: Text; ResponseMessage: HttpResponseMessage; Handled: Boolean)
Parameters / Return Value
Hub
Record "EOS 070 IoT Hub Setup"
Endpoint
Record "EOS 070 IoT Hub Endpoint"
Method
Text[]
Payload
Text[]
ResponseMessage
HttpResponseMessage
Handled
Boolean
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.