---
title: SAIF.Web.API.Clients.35 operations and processes
summary: Business and technical operations supported by this library.
status: draft
owner: bendy
last_reviewed: 2026-09-15
library: SAIF.Web.API.Clients.35
reference_type: package
---

# SAIF.Web.API.Clients.35 operations and processes

This page is the operation catalog and cross-operation hub for this library. Each operation's detailed, step-by-step logic lives in its own page under `operations/`. The library exposes one core workflow with seven public entry points; no database, message queue, or file-system operations exist in any path.

## Operation catalog
| Operation | Intent | Trigger | Inputs | Outputs | Rules |
| --- | --- | --- | --- | --- | --- |
| [Execute JSON API request and return typed envelope](operations/op-01-execute-json-api-request.md) | Issue a JSON HTTP request to a SAIF Web API and return the full response envelope, or throw a typed exception. | Caller invokes `GetResponse<T>`, `PostJson<T>`, `PutJson<T>`, `PatchJson<T>`, or `DeleteJson<T>`. | `methodUriSegment`, optional `requestBody`; instance state (`_serviceBaseUri`, `_clientInfo`, `_authenticator`, `TimeoutOverride`, `SetOnBehalfOfUserHeaders`, `RetryOnStatusCodes`, `RetryDelayInMs`, `EnsureSuccessfulResponse`, `DateTimeZoneHandling`). | `ApiResponse<T>`, or a thrown `SAIFException` subtype. | [BR-01](business-rules.md#br-01-identity-headers-on-every-request), [BR-05](business-rules.md#br-05-transient-failure-retry), [BR-06](business-rules.md#br-06-unsuccessful-response-raises-typed-exception) |
| [Get single typed result](operations/op-02-get-single-typed-result.md) | Return one scalar/object value rather than a full envelope. | Caller invokes `GetResult<T>` (or the `GetResults<T>` wrapper). | `methodUriSegment`. | `T`, or `default(T)`. | [BR-11](business-rules.md#br-11-string-result-unquoting), [BR-14](business-rules.md#br-14-null-payload-default-result), [BR-15](business-rules.md#br-15-cast-failure-default-result) |
| [Translate HTTP failure to typed exception](operations/op-03-translate-http-failure.md) | Map an unsuccessful HTTP response to a typed `SAIFException` subtype. | Step 9 of the request operation, when `EnsureSuccessfulResponse` is true; also callable directly as `ToKnownError`. | `IRestResponse`. | A thrown `SAIFException` subtype, or a normal return for 200–399. | [BR-16](business-rules.md#br-16-success-status-range), [BR-20](business-rules.md#br-20-http-status-to-exception-type-mapping) |
| [Serialize request body](operations/op-04-serialize-request-body.md) | Serialize an outbound request body to JSON honoring configured serializer settings. | RestSharp invokes `AddJsonBody`, which calls `JsonSerializer.Serialize`. | Request body object. | Indented JSON string. | [BR-07](business-rules.md#br-07-configured-datetimezonehandling-applied-to-serialization), [BR-21](business-rules.md#br-21-serialization-member-and-value-handling) |

## Process flow diagram
The following diagram visualizes the primary operational flow for a request/response cycle.

```mermaid
flowchart TD
	Start(["Caller invokes verb<br>method"]) --> Build["Build<br>RestClient/RestRequest +<br>identity headers"]
	Build --> Execute["Execute request via<br>RestSharp"]
	Execute --> Retry{"Retryable status and<br>retries remain?"}
	Retry -->|Yes| Sleep["Sleep RetryDelayInMs,<br>retry"]
	Sleep --> Execute
	Retry -->|No| Gate{"EnsureSuccessfulResponse<br>?"}
	Gate -->|Yes, status 200-399| Deserialize["Deserialize payload into<br>ApiResponse"]
	Gate -->|"Yes, status outside<br>200-399"| ThrowEx(["Throw typed<br>SAIFException"])
	Gate -->|No| Deserialize
	Deserialize --> EndOk(["Return ApiResponse/typed<br>result"])
```

## Failure and edge-case behavior
- An exception thrown while translating an HTTP failure ([BR-06](business-rules.md#br-06-unsuccessful-response-raises-typed-exception), [BR-20](business-rules.md#br-20-http-status-to-exception-type-mapping)) propagates to the caller; envelope construction is skipped.
- Retry ([BR-05](business-rules.md#br-05-transient-failure-retry)) happens before the error gate, so retryable failures (502/503/401/transport-failure `0`) are re-attempted up to 3 times before any exception is raised.
- A cast failure on a complex `GetResult<T>` value returns `default(T)` ([BR-15](business-rules.md#br-15-cast-failure-default-result)); an empty result array instead surfaces as `IndexOutOfRangeException` to the caller, since only `InvalidCastException` is caught.*
- Deserialization failures for `T = string` return the exception message as the result instead of throwing ([BR-09](business-rules.md#br-09-string-deserialization-failure-fallback)).

> **Note:** Statements marked with `*` were inferred from code structure, naming conventions, or
> contextual evidence where direct confirmation was not available in source artifacts.

## Related documentation
- [Index](index.md)
- [Overview](overview.md)
- [Architecture](architecture.md)
- [Dependencies](dependencies.md)
- [Business rules](business-rules.md)
- [Security and authorization](security-authorization.md)
- [API reference](api/index.md)
- [SAIF.Web.API.Core overview](../saif-web-api-core/overview.md)

## Sources
- src/SAIF.Web.API.Clients/JsonHttpClient.cs
- src/SAIF.Web.API.Clients/ExceptionHandler.cs
- src/SAIF.Web.API.Clients/JsonSerializer.cs
