This API is used to query the available duration of a running notebook instance.
None
GET /v1/{project_id}/notebooks/{id}/lease
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
id |
Yes |
String |
Notebook instance ID. |
project_id |
Yes |
String |
Project ID. For details, see Obtaining a Project ID. |
None
Status code: 200
Parameter |
Type |
Description |
---|---|---|
create_time |
Long |
Time (UTC) when the instance is created, accurate to millisecond. |
duration |
Long |
Instance running duration, which is calculated based on the instance creation time. If the instance creation time plus the duration is greater than the current time, the system automatically stops the instance. |
enable |
Boolean |
Whether to enable auto stop of the instance. |
update_time |
Long |
Time (UTC) when the instance is last updated (excluding the keepalive heartbeat time), accurate to millisecond. |
None
Status code: 200
OK
{ "create_at" : 1638841744515, "duration" : 3600000, "enable" : true, "update_at" : 1638842905925 }
Status Code |
Description |
---|---|
200 |
OK |
401 |
Unauthorized |
403 |
Forbidden |
404 |
Not Found |
See Error Codes.