edit-icon download-icon

Set the data's validity period

Last Updated: Aug 03, 2018

Set data’s validity period

Request path and method

Path Method Description
/api/ttl POST Sets the TTL

Request content

Name Type Required Description Example
val Integer Yes Sets the TTL value in seconds. The value range is [1,2147483647(Integer.MAX_VALUE)]. 7776000

Request JSON example

Job: Set the data’s validity period to 90 days.

Request: POST/api/tti

Body:

  1. { "val": 7776000 }

Response description

If the error code “200” is returned, the request succeeded; otherwise, the request failed. For details about error codes, see Response Codes.

 

Obtain the data’s validity period

Request path and method

Path Method Description
/api/ttl GET Queries the data’s validity period

Request content

The request entity is not required.

Response description

If the error code “200” is returned, the request succeeded; otherwise, the request failed. For details about error codes, see Response codes.

Return JSON example:

  1. { "val": 7776000 }

The “val” value is the “ttl” value, and the unit is second (s).

Thank you! We've received your feedback.