Skip to content

Commit 45aa740

Browse files
committed
add additional jq example for accessing Tilde API via bash
1 parent 5fe6689 commit 45aa740

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Tilde/Bash_Tilde_Access.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ In this example, jq is extracting all JSON fields that have info on available st
2727

2828
`curl --silent "${ip}/${v}/dataSummary/dart" | jq -r '.domain[] | .stations[] | .station'`
2929

30+
To extract a list of all available combinations of names and methods for a given domain, in a list separated by a tab:
31+
`curl --silent "${ip}/${v}/dataSummary/envirosensor" | jq -r '"\(.domain[].names[].name)\t\(.domain[].names[].methods[].method)"' | sort -u`
32+
3033
To visualise all metadata available via Tilde for a specific site, you can use the available API endpoint and then reformat the output with jq. This example is for NZE but to substitute for different sites or domains, change the domain name and the "station=NZE" section.
3134

3235
`curl "${ip}/${v}/dataSummary/dart?station=NZE" | jq -r .`

0 commit comments

Comments
 (0)