/v1/format
Format seconds/components to ISO-8601
Provalo dal vivo
10 chiamate gratuite al giorno — senza registrazione, senza chiave API. Passa dal gateway oanor.
Funziona. Prendi una chiave API e usala nel tuo progetto.
Ottieni una chiave APIFrammenti di codice
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_..."}
)
Risposta di esempio
Una risposta reale di questo endpoint, acquisita dall'ultimo 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
}