-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: add /snapshots api docs * fix: fix api and example
- Loading branch information
1 parent
f60beac
commit a756503
Showing
4 changed files
with
83 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{ | ||
"value": [ | ||
{ | ||
"hash": "bafkreig6sfhegnp4okzecgx3v6gj6pohh5qzw6zjtrdqtggx64743rkmz4", | ||
"timeRange": { | ||
"initTimestamp": 1577836800000, | ||
"endTimestamp": 1606867200000 | ||
}, | ||
"replacedSnapshotHashes": [ | ||
"bafkreig6sfhegnp4okzecgx3v6gj6pohh5qzw6zjtrdqtggx64743rkmz4" | ||
], | ||
"numberOfEntities": 0, | ||
"generationTimestamp": 1671126919124 | ||
}, | ||
{ | ||
"hash": "bafkreig6sfhegnp4okzecgx3v6gj6pohh5qzw6zjtrdqtggx64743rkmz4", | ||
"timeRange": { | ||
"initTimestamp": 1606867200000, | ||
"endTimestamp": 1635897600000 | ||
}, | ||
"replacedSnapshotHashes": [], | ||
"numberOfEntities": 0, | ||
"generationTimestamp": 1671126611185 | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
type: array | ||
items: | ||
required: | ||
- hash | ||
- timeRange | ||
- replacedSnapshotHashes | ||
- numberOfEntities | ||
- generationTimestamp | ||
type: object | ||
properties: | ||
hash: | ||
type: string | ||
timeRange: | ||
required: | ||
- initTimestamp | ||
- endTimestamp | ||
type: object | ||
properties: | ||
initTimestamp: | ||
type: number | ||
endTimestamp: | ||
type: number | ||
replacedSnapshotHashes: | ||
type: array | ||
items: | ||
type: string | ||
numberOfEntities: | ||
type: number | ||
generationTimestamp: | ||
type: number |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
get: | ||
operationId: getSnapshots | ||
summary: Snapshots with a list of active entities | ||
tags: | ||
- Content Server | ||
description: >- | ||
Lists all active deployments stored in the database in multiple snapshots for different time ranges. | ||
If the information needed is front in time of the most recent snapshot, you may use the | ||
`/content/pointer-changes` endpoint with the necessary `from` filter. | ||
responses: | ||
'200': | ||
description: >- | ||
The result is a list of snapshots. Each "hash" field references the a snapshot with all the active entities that has an entity timestamp within the specified time range. | ||
Each hash is a reference to a JSON file containing one line per entity in a JSON format. | ||
Once you get the hashes you can download them using the | ||
/content/contents/{hashId} endpoint. | ||
content: | ||
application/json; charset=utf-8: | ||
schema: | ||
$ref: ../../components/schemas/content/200-snapshots.yaml | ||
examples: | ||
default: | ||
$ref: ../../components/examples/content/200-snapshots.json | ||
'503': | ||
description: New Snapshots not yet created |