Code Monkey home page Code Monkey logo

api.npolar.no's People

Contributors

baelter avatar cnrdh avatar rdux avatar rexso avatar srldl avatar trevlovett avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

api.npolar.no's Issues

Enhancement request: Auto-tag entries with parent category if necessary

Users will often tag an entry with only the most relevant tag. This tag is sometimes a "child" tag (e.g. ICE Fluxes), and this will result in a missing "parent" tag (e.g. ICE).

The result is somewhat counter-intuitive filtering options; a filter for a parent tag may produce far less hits than its child filter. Real-world example:
ICE Fluxes -> 50 hits
ICE -> 5 hits

Proposed solution: Automagically apply the parent tag (before saving) whenever a user has applied a child tag only.

The issue has been identified for ICE and its sub-programmes (e.g. ICE Fluxes), and some area tags, like areas contained within the Arctic. (E.g. entries may be tagged only "Svalbard", not "The Arctic".)

Example 1: http://www.npolar.no/en/publications/ (see "Programme" filters)
Example 2: http://www.npolar.no/en/projects/ (see "Area" filters)

External data publishing, validating, logging

With external data dumped to some sink, like rsync to a disk folder, we need a way to prove after imports that a system actually contains the data it should

We can inject source metadata in /source and compare source metadata like number of documents that day (or hour or timeframe) to the actual content in the destination API.

Support CORS

For configureless CORS

  • All npolar.no origins and all HTTP verbs enabled over https
  • "Access-Control-Allow-Methods: GET, HEAD, OPTIONS" for HTTP

Schema API should switch to file backend

To avoid inconsistency issues, we switch /schema to a file system backed API.

There are 4 simple rules to follow
0. Naming convention is semantic like /schema/dataset-1.x.y[.dev].json (where x is major and y minor edit number)

  1. Never update a file once published (increment version)
  2. Copy (don't symlink) latest versioned file into a file without versioning
  3. Always declare explicit versions on the client side
  4. User same version in filename and in schema's id

Schema modifications needed for project and person

Employee and project entries suffer from a potential conflict between timestamps and their related "labels":

  • Employees: NPI Employee and On Leave
  • Projects: State

These labels should ideally be "auto-updated" by the system, deduced from the timestamps. (As opposed to the current solution, which requires manual updating. Alternatively, they could be dropped – they are, after all, redundant. However, they do make very useful filters.)

Example situation:
An employee can be set as "currently employed" by adding a "hired" timestamp, but the NPI Employee field could indicate the opposite, until manually updated. Same vice versa, and the same type of conflict exists for On Leave, as well as projects and their state (planned, active, etc.).

The current system effectively forces editors to continuously monitor all these timestamps/statuses manually, and manually update the entries. Furthermore, such updates must be done at very specific times (the exact times specified in the timestamps).

Couch storage feed includes _design documents

Description: When requesting a feed from couch it will return information on all documents in the database including the couch _design documents holding couch views.

Reproduction:

  • Create a view in couchDB. After saving the view it should show up in the database.
  • Do a feed query with the API against the database containing the design view.
  • The results should have one record with _design in the ID

Bugged Code: Code in couch.rb

Republish all services

Some services will not survive republishing if ES mapping is out of sync with the data.

Also, need to kill old, manually setup indexing rivers

OAI-PMH provider for /dataset API

Time based scalable bulk operations and endpoints

Until now we don't have official URIs for getting storage-layer data out of the API.
We have a couple of hacks, like _feed, but this isn't a scalable solution.

  1. We need official support and persistent URIs for getting data out in bulk
  2. Bulk endpoints should be built as separate middleware, not hacked in the single document pipeline
  3. Documentation

Updated => Edited

Auto-updating "updated" is sometimes unfortunate, when you have external data coming in you loose the last "updated" date.

In AtomPub "edited" is used for system-generated edit-time, while updated can be user provided. Suggest we move to that.

Improve RESTfulness for collection URIs

We need a robust mechanism to GET all documents in a collection.

The API co-evolved from ideas similar to those expressed in http://tools.ietf.org/html/draft-kelly-json-hal-06 - with widespread use of hyperlinks between documents. However, at the collection level, we lack links from the Collection URI to bundles of documents (similar to a database view). With such links, RESTful clients could follow a simple set of rules to download entire collections

Create Monitoring API

For environmental monitoring timeseries.

Endpoint
/monitoring

workspace: monitoring

3 document types
collection:timeseries
collection:parameter
collection:indicator

Support async work flows

One of the major features we are missing in version 1.0.0 support for async work flows like streaming.

Semantic schema versioning

Every client should declare explicit schema versions, and the server should reject (422) documents that are lower than the minimal schema version accepted.

Implement data release date (data policy)

Fra datapolitikken:

Beskyttelsesperioden skal datofestes, og bør normalt ikke settes til mer enn 2 år etter at datainnsamlingen er avsluttet. Innenfor rammene av de kontraktsvilkår og eksterne betingelser som gjelder for prosjektet, kan beskyttelsesperioden gjøres lengre hvis det er nødvendig for å ivareta førsteretten til publisering. Seksjonsleder er ansvarlig for å sette frigivelsesdato og kan utvide beskyttelsesperioden inntil 4 år etter at datainnsamlingen er avsluttet. Utvidelse av beskyttelsesperioden ut over 4 år skal kun gis unntaksvis og må godkjennes av avdelingsdirektør.

Når beskyttelsesperioden er utløpt, eller når ingen beskyttelsesperiode er datofestet, vil data som er ferdig prosessert, dokumentert og lagret ved instituttet være åpent tilgjengelige fra data.npolar.no.

Protect against path re-use in the service API.

Currently it is possible to define the same path multiple times in different service documents.

When creating two service documents with different names but using the same path the API will boot and show you the same /endpoint twice. Both seem to be pointing to the same API

JWT authorizer

Create an authorizer middleware that can validate with a JWT

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.