You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/entities/kpis.md
+34-2Lines changed: 34 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -36,10 +36,42 @@ In order to make use of the data viz function you'll need the name of the KPI yo
36
36
### Get KPI Data Viz
37
37
Once you have the name of the KPI you wish to access and a logged in client you can make a call to the data viz api with the following SDK function call:
The d_vars section of your data_viz_query should include an d_var with the name of the KPI you wish to query. For more information on [data_viz_queries](/docs/commonly_used_data_types/data_viz_query.md) click on the previous link. After some time the SDK should return a list that looks something like this:
42
+
After some time the SDK should return a list that looks something like this:
There's two ways to call this function you can use a data_viz_query,For more information on [data_viz_queries](/docs/commonly_used_data_types/data_viz_query.md) click on the previous link, or have the function fill out the query for you by passing in a few variable we will now go over one at a time.
48
+
49
+
#### machine_source
50
+
This is a string and is the name of machine you wish to run a query on.
51
+
52
+
#### kpis
53
+
This is a list of the names of all the kpis you wish to run this query on.
54
+
55
+
#### i_vars
56
+
This is a list, this is the same as the i_vars object in the data_viz_query and is the axis you are querying the kpis against it will look like the following:
57
+
```
58
+
[
59
+
{
60
+
"name": "endtime",
61
+
"time_resolution": "day",
62
+
"query_tz": "America/Los_Angeles",
63
+
"output_tz": "America/Los_Angeles"
64
+
}
65
+
]
66
+
```
67
+
68
+
#### time_selection
69
+
This is an object, this is the same as the [time_selection](/docs/commonly_used_data_types/data_viz_query.md#time_selection) object in the data_viz_query and more info can be found at that link. The most common form is the relative time selection and looks like this:
Machines are just that, machines in factories. The machine object is how the Sight Machine software replesents and is the key to accessing data that we collect from them
3
+
4
+
## Functions
5
+
6
+
### get_type_from_machine
7
+
The get_type_from_machine function allows you to get the type of any machine from it's name and is called this way:
0 commit comments