ASEndpoint Configuration (asendpoints.json)
Namespace: CXT.IO.Dashboard.Api.ModelsSource File (Model): ASEndpointConfiguration.csConfiguration File (Data): asendpoints.json
The ASEndpointConfiguration model defines the structure for the asendpoints.json file. This configuration is critical for the AccountSettingsV2Service, enabling it to dynamically route requests to different downstream Account Settings APIs based on business units.
Purpose
- To allow the BFF to discover and interact with multiple downstream APIs without hardcoding URLs.
- To enable flexible deployment where different business units are managed by separate API instances.
ASEndpointConfiguration Class
This is the root model for the entire configuration file.
Properties
ASEndpoints
csharp
public List<ASEndpoint> ASEndpoints { get; set; }- Description: A list of
ASEndpointobjects, each defining a specific downstream API instance.
ASEndpoint Class
Represents a single downstream Account Settings API endpoint.
Properties
BusinessUnit
csharp
public string BusinessUnit { get; set; }- Description: An identifier for the business unit served by this API (e.g., "ZA", "UK"). The
AccountSettingsV2Serviceuses this to match accounts to the correct endpoint.
Endpoint
csharp
public string Endpoint { get; set; }- Description: The base URL of the downstream Account Settings API for this business unit.
Example asendpoints.json
json
{
"ASEndpoints": [
{
"BusinessUnit": "ZA",
"Endpoint": "https://za-account-settings-api.internal/api"
},
{
"BusinessUnit": "UK",
"Endpoint": "https://uk-account-settings-api.internal/api"
},
{
"BusinessUnit": "PrivateBank",
"Endpoint": "http://localhost:7071/api"
}
]
}