DataStream.org API helper. See API documentation for query string values and structure.
curl -o /usr/local/bin/datastreamsh https://raw.githubusercontent.com/datastreamapp/datastreamsh/main/datastream.sh
chmod +x /usr/local/bin/datastreamshThis package has been tested on MacOS.
datastreamsh command [options...]
setup: Prompts for API key, will be save to~/.datastreamin plain text. Not setting up will prompt forx-api-keyon ever command.metadata: Wraps /v1/odata/v4/Metadata API endpointlocations: Wraps /v1/odata/v4/Locations API endpointobservations: Wraps /v1/odata/v4/Observations API endpointrecords: Wraps /v1/odata/v4/Records API endpoint
--select: What parameters to be returned--filter: What you want to , in OData format--format: Print output in alternative format (Allowed:JSONSTREAM,CSV; Default:JSONSTREAM)--top: Number of results to return per request (Default: 10000)--domain: Use to point at testing environments
# datastreamsh setup
$ datastreamsh setup
x-api-key: # copy and paste API key here and press enter# datastreamsh command [options...]
$ datastreamsh locations --select "..." --filter "..."# datastreamsh command --format CSV --select <select> [options...]
$ datastreamsh records --format CSV --select "..." --filter "..." > file.csv