Skip to content

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

  1. Create ClientInfo with application ID PremiumAudit (BR-AAC-001).
  2. Populate ClientInfo.MachineName and ClientInfo.UserId from EnvironmentService (BR-AAC-002).
  3. Read environment setting documentapi.url and convert it to the base Uri for the client (BR-AAC-003).
  4. Construct JsonHttpClient with the resolved URI and ClientInfo only; 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.url setting prevents client construction.
  • Authentication behavior is delegated to the downstream service and hosting environment.

Sources

  • Business\SAIF.Business.Policy.Audit.ApiCalls\DocumentApiCall.cs