Use Case

This article describes how to use either chrome or IE, or another API tester application to query the raw measurements/values associated with tag(s) in Bazefield.  Prior to this, it is suggested to read

Quick Start: Bazefield API

Quick Start: Tag Manager 

Exercise 1:  Querying API with Chrome and Postman 

Importing Post Man Files


Background

This article reviews how to request all raw events archived by Bazefield in certain tags.


Prerequisites

Download the Postman file at the bottom of this article and use it according to the guidelines here:

Importing Post Man Files


Requests


The following table displays the list of most common requests to pull raw data from Bazefield tags.  They can be run directly in a web browser, or using Postman

(Substitute {{domain}} with user's web domain and {{tag1}}, {{tag2}}, etc with requested tags to query)


Request
DescriptionURL Example
Last Known Values (Single Tag)Request to grab last known value and timestamp of a given tag

https://{{domain}}.bazefield.com/Bazefield.Services/api/

measurements/{{tag1}}?format=json

Last Known Values (Multiple Tags)Request to grab last known value and timestamp of multiple tags

https://{{domain}}.bazefield.com/Bazefield.Services/api/

measurements/[{{tag1}},{{tag2}}]?format=json


Raw Time Series (single tag)Request to grab raw historical data (all values) of a single tag for relative date arguments

https://{{domain}}.bazefield.com/Bazefield.Services/api/

measurements/{{tag1}}/from/{{from}}/to/{{to}}?format=json


Raw Time Series (multiple tags)Request to grab raw historical data (all values) for multiple tags for relative dates

https://{{domain}}.bazefield.com/Bazefield.Services/api/

measurements/[{{tag1}},{{tag2}}]/from/{{from}}/to/{{to}}?format=json



Postman queries

The tabular queries above can be modified and used within Postman directly by navigating to the correct request on the left hand collection tab.