Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: document ability to update expires_at on patch /tokens endpoint #45

Merged
merged 1 commit into from
Jan 23, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions docs/api/tokens/tokens.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ func main() {
| `search_indexes` | false | _array_ | `null` | Array of [expressions](/docs/expressions/search-indexes) used to generate indexes to be able to search against. |
| `fingerprint_expression` | false | _string_ | <code>{{ data &#124; stringify }}</code> | [Expressions](/docs/expressions/fingerprints) used to fingerprint your token. |
| `deduplicate_token` | false | _bool_ | `null` | Whether the token is deduplicated on creation. |
| `expires_at` | false | _string_ | `null` | ISO8601 compatible Token expiration DateTime. See [Token Expiration](#token-expiration) for more details. |
| `expires_at` | false | _string_ | `null` | ISO8601 compatible Token expiration DateTime. See [Token Expiration](/docs/api/tokens/#token-expiration) for more details. |

<Alert type={Alerts.WARNING}>
Never reveal sensitive information in the <code>id</code> of your token. See
Expand Down Expand Up @@ -732,6 +732,7 @@ func main() {
| `search_indexes` | false | _array_ | Replace | Array of [expressions](/docs/expressions/search-indexes) used to generate indexes to be able to search against. |
| `fingerprint_expression` | false | _string_ | Replace | [Expressions](/docs/expressions/fingerprints) used to fingerprint your token. |
| `deduplicate_token` | false | _bool_ | Replace | Whether the token is deduplicated on creation. |
| `expires_at` | false | _string_ | Replace | ISO8601 compatible Token expiration DateTime. See [Token Expiration](/docs/api/tokens/#token-expiration) for more details. |

### Response

Expand Down Expand Up @@ -901,7 +902,7 @@ Returns [an error](/docs/api/errors) if the token failed to delete.
| `modified_at` | _date_ | (Optional) Last modified date of the token in ISO 8601 format |
| `search_indexes` | _array_ | (Optional) Array of search index [expressions](/docs/expressions/search-indexes) used when creating the token. |
| `fingerprint_expression` | _string_ | (Optional) An [expression](/docs/expressions/fingerprints) defining the value to fingerprint when creating the token. |
| `expires_at` | _string_ | (Optional) The [token expiration](#token-expiration) date. |
| `expires_at` | _string_ | (Optional) The [token expiration](/docs/api/tokens/#token-expiration) date. |

### Token Data Validations

Expand All @@ -924,7 +925,7 @@ Returns [an error](/docs/api/errors) if the token failed to delete.
### Token Expiration

By default a created token will not expire, however, users can optionally set the `expires_at` property with an ISO8601 `DateTime` when creating a token to determine its expiration date.
An expired token is **deleted** from the tenant up to **1 hour** after it's expiration time.
An expired token is **deleted** from the tenant up to **1 hour** after its expiration time.

### Expiration Date Formats

Expand Down