Code Monkey home page Code Monkey logo

api_of_things's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

api_of_things's Issues

Better API Root

Right now /api redirects to the docs. I think this is bad. I'd prefer to return some JSON with information users would find useful.

{
  "docs": " apiary link ",
  "endpoints": {
    "projects": " /projects link ",
    "nodes": " /nodes link ",
    "sensors": " /sensors link ",
    "observations": " /observations link ",
    "raw observations": " /raw-observations link ",
  },
  "clients": {
    "python": " github link ",
    "javascript": " github link ",
    "r": " github link "
  }
}

Tagging in @HeyZoos for comment on this.

Long running queries

In some cases users are seeing 500 errors for queries that take too long and Ecto kills the connection. Really, nothing should be taking that long. We need to do some profiling to figure out what's going wrong.

Update the Docs

There are some nasty omissions and errors in the docs. This is an open ended issue (for now) to gather a list of them and knock them out.

  • Need to explicitly list which filters/actions do not allow sorting or have other side effects that break other filters/actions; i.e. as_time_buckets doesn't allow user specified ordering.

Fix Travis Config

There was a build error -- port 5432 cannot be used. We need to add a travis.exs config file and set the port to the database to something else and update the port config accordingly in .travis.yml.

GeoJSON for Observations

I punted on this at first, but the question has been raised now: can we format observation data as GeoJSON?

The reason I didn't do it at first was because I have two competing ideas on how to do this.

Properties indexed by sensor path

{
  "data": [
    {
      "type": "Feature",
      "geometry": { ... },
      "properties": {
        "metsense.htu21d.temperature": {
          "2018-01-01T00:00:00": -4.2,
          "2018-01-01T00:00:30": -4.3,
          "2018-01-01T00:01:00": -4.1,
          "2018-01-01T00:01:30": -4.2
        },
        "metsense.htu21d.humidity": {
          "2018-01-01T00:00:00": 54.2,
          "2018-01-01T00:00:30": 54.3,
          "2018-01-01T00:01:00": 54.1,
          "2018-01-01T00:01:30": 54.2
        }
      }
    }
  ]
}

Properties indexed by timestamp

{
  "data": [
    {
      "type": "Feature",
      "geometry": { ... },
      "properties": {
        "2018-01-01T00:00:00": {
          "metsense.htu21d.temperature": -4.2,
          "metsense.htu21d.humidity": 54.2
        },
        "2018-01-01T00:00:30": {
          "metsense.htu21d.temperature": -4.3,
          "metsense.htu21d.humidity": 54.3
        },
        "2018-01-01T00:01:00": {
          "metsense.htu21d.temperature": -4.1,
          "metsense.htu21d.humidity": 54.1
        },
        "2018-01-01T00:01:30": {
          "metsense.htu21d.temperature": -4.2,
          "metsense.htu21d.humidity": 54.2
        }
      }
    }
  ]
}

Web Socket Use Cases

Just because you can doesn't mean you should.

I want to list possible use cases for implementing web sockets for the API. Phoenix makes it easy to accomplish, but it's not entirely clear if it's worth the time and effort to build, test and maintain.

Please comment on this issue with ideas for uses and comments on proposed ideas.

Add a latest observations endpoint for the nodes

This is a feature request. It would be helpful to have an endpoint that returns the latest observations for the nodes.

  • /nodes/latest to get the latest for all nodes
  • /nodes/:vsn/latest to get the latest for a specific node

In this sense, latest would be the latest observation by timestamp for the key {vsn, subsystem, sensor, param}. It may require creating a new table and setting up some triggers.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.