From 388fdfbef6505150de0ea29a78f23f66f5462471 Mon Sep 17 00:00:00 2001 From: Dzmitry Kalabuk Date: Wed, 3 Dec 2025 13:57:53 +0300 Subject: [PATCH 1/2] Update 11_portal_api.md Add `/resolve-timestap` to portal API --- network-rfc/11_portal_api.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/network-rfc/11_portal_api.md b/network-rfc/11_portal_api.md index 9e6fc4f..3fa8beb 100644 --- a/network-rfc/11_portal_api.md +++ b/network-rfc/11_portal_api.md @@ -211,6 +211,12 @@ Returns a JSON object with `.number` and `.hash` of the highest block available This endpoint is supposed to be used for diagnostic purposes. +### `GET /datasets//resolve-timestamp/` + +Accepts a unix timestamp (in seconds) and returns a single number — the number of the first block with timestamp greater or equal to the requested one. + +Returns "404 Not Found" if such block doesn't exist. + ## Additional response headers ### Finalized head headers From 8f7c60b3b066aa14237c839384efd91e53871c07 Mon Sep 17 00:00:00 2001 From: Dzmitry Kalabuk Date: Thu, 4 Dec 2025 15:28:07 +0300 Subject: [PATCH 2/2] Update endpoint to be restful --- network-rfc/11_portal_api.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/network-rfc/11_portal_api.md b/network-rfc/11_portal_api.md index 3fa8beb..0d1c557 100644 --- a/network-rfc/11_portal_api.md +++ b/network-rfc/11_portal_api.md @@ -211,7 +211,7 @@ Returns a JSON object with `.number` and `.hash` of the highest block available This endpoint is supposed to be used for diagnostic purposes. -### `GET /datasets//resolve-timestamp/` +### `GET /datasets//timestamps//block` Accepts a unix timestamp (in seconds) and returns a single number — the number of the first block with timestamp greater or equal to the requested one.