/v1/format
Format seconds/components to ISO-8601
Live testen
10 freie Calls pro Tag — keine Anmeldung, kein API-Key. Geht durchs oanor-Gateway.
Funktioniert. Hol dir einen API-Key und nutze sie in deinem Projekt.
API-Key holenCode-Snippets
curl "https://api.oanor.com/duration-api/v1/format" \ -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/duration-api/v1/format", {
headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/duration-api/v1/format");
curl_setopt($ch, CURLOPT_HTTPHEADER, ["x-oanor-key: oanor_test_..."]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$out = curl_exec($ch);
import requests
requests.get(
"https://api.oanor.com/duration-api/v1/format",
headers={"x-oanor-key": "oanor_test_..."}
)
Beispiel-Response
Echte Antwort dieses Endpoints, erfasst beim letzten Health-Check.
{
"data": {
"iso8601": "PT1H30M",
"humanized": "1 hour and 30 minutes",
"components": {
"days": 0,
"hours": 1,
"weeks": 0,
"years": 0,
"months": 0,
"minutes": 30,
"seconds": 0
},
"total_seconds": 5400
},
"meta": {
"timestamp": "2026-06-02T16:51:50.116Z",
"request_id": "7e6afd5a-3ab8-4e4e-8170-67b6078439a5"
},
"status": "ok",
"message": "Format seconds/components to ISO-8601",
"success": true
}