Construct the Document API client¶
Resolve endpoint and caller identity for the Document API.
| Field | Value |
|---|---|
| Operation ID | OP-004 |
| Trigger | A caller instantiates DocumentApiCall. |
| Inputs | None. |
| Outputs | Initialized JsonHttpClient stored inside DocumentApiCall. |
| Primary components | DocumentApiCall.DocumentApiCall() |
| Entry point | Business\SAIF.Business.Policy.Audit.ApiCalls\DocumentApiCall.cs |
Steps¶
- Create
ClientInfowith application IDPremiumAudit(BR-AAC-001). - Populate
ClientInfo.MachineNameandClientInfo.UserIdfromEnvironmentService(BR-AAC-002). - Read environment setting
documentapi.urland convert it to the baseUrifor the client (BR-AAC-003). - Construct
JsonHttpClientwith the resolved URI andClientInfoonly; no authenticator is attached for this downstream service (BR-AAC-009).
Process flow¶
The following diagram visualizes this operation's control flow.
flowchart TD
Start(["new DocumentApiCall()"]) --> Info[Build ClientInfo]
Info --> Config[Read documentapi.url]
Config --> Client[Create JsonHttpClient]
Client --> Done([Client ready])
Failure and edge-case behavior¶
- A missing or malformed
documentapi.urlsetting prevents client construction. - Authentication behavior is delegated to the downstream service and hosting environment.
Related documentation¶
Sources¶
Business\SAIF.Business.Policy.Audit.ApiCalls\DocumentApiCall.cs