Skip to main content
GET
/
datasets
/
{dataset_id}
/
find-snapshots
Find snapshots
curl --request GET \
  --url https://api-dev.narrative.io/datasets/{dataset_id}/find-snapshots \
  --header 'Authorization: Bearer <token>'
{
  "snapshots": [
    {
      "snapshot_id": 1,
      "timestamp": "2023-02-02T14:11:43.324",
      "is_downloadable": true,
      "files": {
        "added": [
          "s3://some-bucket/file1.parquet"
        ]
      },
      "operation": "append"
    }
  ],
  "has_next": true,
  "next_snapshot": 123
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

dataset_id
integer
required

Unique identifier for a dataset.

Query Parameters

per_page
integer

Number of records to return.

offset
integer

Number of records to skip (it's usually page_number * per_page).

timestamp.gte
string

ISO-8601 timestamp that will be inclusively used as minimal timestamp of a snapshot.

timestamp.lt
string

ISO-8601 timestamp that will be exclusively used as maximal timestamp of a snapshot.

timestamp.lte
string

ISO-8601 timestamp that will be inclusively used as maximal timestamp of a snapshot.

from_snapshot_id
number

Snapshot Id that will be inclusively used as the beginning of snapshot search range. That snapshot should exist.

until_snapshot_id
number

Snapshot Id that will be exclusively used as the end of snapshot search range. That snapshot should exist.

to_snapshot_id
number

Snapshot Id that will be inclusively used as the end of snapshot search range. That snapshot should exist.

Response

Ok

snapshots
object[]
required
Example:
{
"snapshot_id": 1,
"timestamp": "2023-02-02T14:11:43.324",
"is_downloadable": true,
"files": {
"added": ["s3://some-bucket/file1.parquet"]
},
"operation": "append"
}
has_next
boolean
required

Pagination-related flag that shows if there are more snapshots to query.

next_snapshot
number

The id of the snapshot that could be used as search parameter to get next page. Unlike 'offset', guarantees no 'floating pages' issues