Skip to content

Commit

Permalink
Merge pull request #32 from akrejcir/duration-doc
Browse files Browse the repository at this point in the history
docs: Add information about "duration" API parameter
  • Loading branch information
kubevirt-bot authored Oct 13, 2023
2 parents 9da159c + 6076e79 commit b6a4077
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion docs/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,14 @@ Where `${VMI_NAMESPACE}` and `${VMI_NAME}` are the namespace
and name of a running VMI.

#### Parameters
- `duration` - Duration while the token is valid
- `duration` - Duration while the token is valid. If it is not specified, then the token will expire after 10 minutes.
The minimum `duration` value is 10 minutes, and there isn't a maximum value.
Its format is described in the golang library documentation [here](https://pkg.go.dev/time@go1.19.13#ParseDuration):

> A duration string is a possibly signed sequence of
> decimal numbers, each with optional fraction and a unit suffix,
> such as `300ms`, `-1.5h` or `2h45m`.
> Valid time units are `ns`, `us` (or `µs`), `ms`, `s`, `m`, `h`.
#### Result
Result is a JSON object containing the token:
Expand Down

0 comments on commit b6a4077

Please sign in to comment.