Skip to content

Commit e997781

Browse files
Add dataset stats dataStream
1 parent 216c3fd commit e997781

1 file changed

Lines changed: 45 additions & 0 deletions

File tree

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
{
2+
"name": "datasetStats",
3+
"displayName": "Dataset Stats",
4+
"description": "Get stats on how close to usage limits this dataset is",
5+
"tags": ["Sanity"],
6+
"baseDataSourceName": "httpRequestScopedSingle",
7+
"matches": {
8+
"sourceType": {
9+
"type": "equals",
10+
"value": "Sanity Dataset"
11+
}
12+
},
13+
"providesPluginDiagnostics": true,
14+
"config": {
15+
"baseUrl": "https://{{object.projectId}}.api.sanity.io/v1/",
16+
"httpMethod": "get",
17+
"paging": {
18+
"mode": "none"
19+
},
20+
"endpointPath": "data/stats/{{object.datasetId}}",
21+
"getArgs": [],
22+
"headers": [
23+
{
24+
"key": "Authorization",
25+
"value": "Bearer {{ ((dataSource.projects || []).find(p => p.key === object.projectId) || {}).value }}"
26+
}
27+
],
28+
"expandInnerObjects": true
29+
},
30+
"ui": [
31+
{
32+
"type": "text",
33+
"name": "hostname",
34+
"label": "Hostname",
35+
"placeholder": "api.example.com"
36+
}
37+
],
38+
"metadata": [
39+
{
40+
"pattern": ".*"
41+
}
42+
],
43+
"timeframes": false,
44+
"manualConfigApply": true
45+
}

0 commit comments

Comments
 (0)