Welcome to the Time Service API! This fast, scalable API provides accurate UTC timestamps with minimal latency, making it perfect for applications that require precise time synchronization.
✅ Current UTC Time Retrieval – Get the latest UTC timestamp with a simple API call.
✅ Secure API – Implements HTTPS redirection for safe communication.
✅ OpenAPI Documentation – Provides auto-generated API docs for easy integration.
✅ Scalar API Integration – Enhances API capabilities with advanced data handling.
✅ Cloud-Optimized – Deployed on Azure Web Apps with CI/CD automation.
✅ Minimal & High-Performance – Uses .NET 9 for lightweight, blazing-fast execution.
📌 src/Time.Api/Program.cs – Configures services, middleware, and API routes.
📌 src/Time.Api/Time.Api.csproj – Defines project dependencies and framework version.
📌 .github/workflows/build-and-deploy.yaml – Automates CI/CD deployment to Azure.
✅ .NET 9 SDK
✅ Azure Account (For cloud deployment)
git clone https://github.com/your-repo/time-service-api.git
cd time-service-api/Time.Api
dotnet restore
dotnet build
dotnet run
Retrieves the current UTC timestamp.
Method | Endpoint | Description |
---|---|---|
GET | /time |
Returns the current UTC time |
{
"CurrentTime": "2025-03-13T12:34:56Z",
"TimeZone": "UTC"
}
curl -X GET https://time-service-api.azurewebsites.net/time
📌 The API is designed for minimal latency, ensuring accurate time retrieval for applications that depend on precise time synchronization.
The Time Service API is deployed using Azure Web Apps with GitHub Actions CI/CD.
📌 Location: .github/workflows/build-and-deploy.yaml
🔹 Push to main
branch → 🚀 Triggers GitHub Actions → ☁️ Deploys to Azure
Set environment variables in Azure App Settings:
Name | Value |
---|---|
ENABLE_HTTPS_REDIRECTION | true |
LOG_LEVEL | Information |
dotnet test
📌 Use Postman or Swagger UI to:
✅ Fetch the current time → /time
✅ Minimal & High-Performance API – Provides fast UTC time retrieval.
✅ Secure & Cloud-Optimized – Supports HTTPS & Azure deployment.
✅ Scalable & Automated – Uses GitHub Actions for CI/CD.
✅ Production-Ready – Implements best practices for modern APIs.
This project is licensed under the MIT License. See LICENSE for details.
For feedback, contributions, or inquiries:
📧 Email: [email protected]
💻 GitHub: MrEshboboyev
🚀 Keep your applications synchronized with Time Service API! Clone the repo & start using it today!