Skip to content

Commit

Permalink
docs: Add information about "duration" API parameter
Browse files Browse the repository at this point in the history
Added more information about the "duration" parameter.

Signed-off-by: Andrej Krejcir <akrejcir@redhat.com>
  • Loading branch information
akrejcir committed Oct 12, 2023

Partially verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
We cannot verify signatures from co-authors, and some of the co-authors attributed to this commit require their commits to be signed.
1 parent 9da159c commit 9a562bc
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
@@ -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 1 second, 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:

0 comments on commit 9a562bc

Please sign in to comment.