Skip to content

ApiInfoController

ApiInfoController publishes build/version metadata for the deployed service. It is the only controller with no [RoutePrefix], so its route carries no version segment.

Field Value
Controller ApiInfoController
Base System.Web.Http.ApiController
Route prefix — (no [RoutePrefix])
Source PdfAPI\Controllers\v1\ApiInfoController.cs
Controller-level authorization None in code
Error handling No try/catch — framework default; response then passes through ApiResponseHandler, whose final outer envelope is unknown** (details)
Endpoints 1

GET buildVersion

Returns build metadata for the deployed application by reading the application's physical root path.

Field Value
HTTP verb GET
Resolved route buildVersion
Route composition Attribute route: [Route("buildVersion")] with no controller [RoutePrefix], so the resolved route remains buildVersion
Action GetBuildVersionData()
Return type IEnumerable<KeyValuePair<string,string>> (returned bare)
Authorization None in code
Idempotent Yes — read-only
Operation OP-GET-BUILD-VERSION

Parameters

This endpoint takes no parameters.

Response

Field Value
DTO — (IEnumerable<KeyValuePair<string,string>>)
Media type application/json
Property Type Nullable Purpose
Key/Value pairs string/string No Build metadata entries produced by SAIF.Web.API.Core.BuildInfo.GetBuildInfo

Status codes

Status Condition Body
200 OK Build info is read successfully Array of key/value pairs

Errors

Error status Trigger Produced by Body
500 Internal Server Error No try/catch around BuildInfo.GetBuildInfo(Server.MapPath("~"))* Framework (uncaught exception, IncludeErrorDetailPolicy.Always) Exception detail

The Body column above describes only the pre-envelope detail produced by the framework. Every response also passes through the globally registered ApiResponseHandler message handler (SAIF.Web.API package), which wraps or post-processes the HTTP response for the whole service. That handler's exact outer envelope shape is implemented inside the package and is not visible in this repository — see Endpoints: Error response shape.

Business rules

No business rule is identified for this endpoint; it reads build metadata from the file system with no application-level rule applied.

Authorization

No authorization attribute or programmatic check is present. See Authentication and authorization.

Side effects and idempotency

Aspect Finding
Records written None
Downstream calls None identified
Files or messages produced None — reads build metadata from the deployed application's file system
Repeat-call behavior Read-only; safe to repeat

Example

GET buildVersion HTTP/1.1
Host: <host>
HTTP/1.1 200 OK
Content-Type: application/json

[
  { "Key": "BuildNumber", "Value": "1.0.0" }
]

Note: Statements marked with * were inferred from code structure, naming conventions, or contextual evidence where direct confirmation was not available in source artifacts. Statements marked with ** could not be confirmed; treat as unknown until verified.

Sources

  • PdfAPI\Controllers\v1\ApiInfoController.cs