---
title: "LeaseTimeToLive retrieves lease information."
method: POST
path: "/v3/kv/lease/timetolive"
tags: ["Lease"]
---

# LeaseTimeToLive retrieves lease information.

`POST /v3/kv/lease/timetolive`

## Request

- Base URL: `https://etcd.io` (the document declares no server; this is the origin it was published from)
- URL: `https://etcd.io/v3/kv/lease/timetolive`
- Auth: API key in header `Authorization`
- TypeScript: <https://skmtc.dev/etcd/apis/api-etcdserverpb-rpc-proto/docs/v3/kv/lease/timetolive/post.ts> (a function with typed inputs; its response is checked against the schema)

## Request body

- EtcdserverpbLeaseTimeToLiveRequest
  - `ID` string, int64: ID is the lease ID for the lease.
  - `keys` boolean: keys is true to query all the keys attached to this lease.

## Response `200`

A successful response.

- EtcdserverpbLeaseTimeToLiveResponse
  - `ID` string, int64: ID is the lease ID from the keep alive request.
  - `TTL` string, int64: TTL is the remaining TTL in seconds for the lease; the lease will expire in under TTL+1 seconds.
  - `grantedTTL` string, int64: GrantedTTL is the initial granted time in seconds upon lease creation/renewal.
  - `header` EtcdserverpbResponseHeader
    - `cluster_id` string, uint64: cluster_id is the ID of the cluster which sent the response.
    - `member_id` string, uint64: member_id is the ID of the member which sent the response.
    - `raft_term` string, uint64: raft_term is the raft term when the request was applied.
    - `revision` string, int64: revision is the key-value store revision when the request was applied. For watch progress responses, the header.revision indicates progress. All future events recieved in this stream are guaranteed to have a higher revision number than the header.revision number.
  - `keys` string[]: Keys is the list of keys attached to this lease.

## Other responses

- `default`: An unexpected error response

---

[API](https://skmtc.dev/etcd/apis/api-etcdserverpb-rpc-proto.md) - [All operations](https://skmtc.dev/etcd/apis/api-etcdserverpb-rpc-proto/llms.txt) - [OpenAPI document](https://skmtc.dev/etcd/apis/api-etcdserverpb-rpc-proto/revisions/79259377f328?raw)
