Skip to content

Short introduction to scopes

A scope is a term that you will hear being used quite often. Every application and user can immediately access a test scope called plaground.city. Afterwards they will have to be assigned to a real scope to access the required values. So what is a scope really?

Data isolation

The IoT platform is built with values isolation in mind. Pragmatically speaking this means that users or developers using/creating an application that shows values from company A, should not see any values of company B, although it is hosted on the same platform.

This seems obvious, but can quickly become quite complex as a sensor's owning entity is not always linked to the consuming application's owning entity.

Example

AllSense sensor might generate values in february till August for MyDashboard from Company A, while it generates values for rivaling Company B for their SuperDashboard application in March.

Definition

A scope encloses two general things: which values are we talking about? and who can access the values?.

Data definition

A scope has a few ways to isolate values:

  • Time period
    • Bounded: only records in time period (from - to) can be accessed
    • Unbounded: only records after a certain values can be accessed (from - no-end)
  • Geographic area: only records within the area can be accessed
  • Metrics: list of metrics that can be accessed
  • Data tag expressions: list of tag expressions that are used to further filter the values. E.g. include only values provided by DeviceA (identified by serviceaccountxy@imec.be)

Access definition

A scope can assign users or groups of users. Each of these has some associated rights on which class of API calls they can do.