Skip to content

Commit 39bfc3a

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

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Tilde/Bash_Tilde_Access.md

+4
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ 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+
32+
`curl --silent "${ip}/${v}/dataSummary/envirosensor" | jq -r '"\(.domain[].names[].name)\t\(.domain[].names[].methods[].method)"' | sort -u`
33+
3034
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.
3135

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

0 commit comments

Comments
 (0)