Skip to main content
POST
/
iso8601
/
components
Decompose an ISO 8601 duration
curl --request POST \
  --url https://{deployment}/api/v1/iso8601/components \
  --header 'Content-Type: application/json' \
  --header 'X-API-KEY: <api-key>' \
  --data '
{
  "duration": "P1DT2H30M"
}
'
{
  "original": "P1DT2H30M",
  "days": 1,
  "hours": 2,
  "minutes": 30,
  "seconds": 0,
  "is_valid": true
}

Authorizations

X-API-KEY
string
header
required

Your deployment's API key (MMK_API_KEY). Routes that accept OAuth2 also allow Authorization: Bearer <token>.

Body

application/json
duration
string
required

ISO 8601 duration, e.g. P1DT2H30M.

Response

Duration components

original
string
days
integer
hours
integer
minutes
integer
seconds
integer
is_valid
boolean
error
string