Difference between revisions of "Open Food Facts API Version 2"

From Open Food Facts wiki
Jump to navigation Jump to search
Line 27: Line 27:
  
 
== Images write API ==
 
== Images write API ==
 +
 +
== Robotoff read API ==
 +
There is now a minimal documentation (link). The documentation needs some more explanation.
 +
 +
=== call ===
 +
 +
=== result json ===
 +
The result json contains fields that seem more useful to the internal workings of Robotoff than the enduser. Can these be split/structured in the json as well?
 +
 +
== Robotoff write API ==
 +
This api allows to write reponses to insight questions provided by the Robotoff read API.
  
 
== Search API ==
 
== Search API ==
  
 
* See [[Open Food Facts Search API Version 2]]
 
* See [[Open Food Facts Search API Version 2]]

Revision as of 11:13, 19 October 2020

Introduction

Version 1 of the Open Food Facts API has been developed organically since 2012, often according to specific needs (in particular the OFF app), and it has been modeled on the structure of the MongoDB database (which itself has evolved organically) and on the Web site (e.g. reusing or mimicking existing CGI forms).

As a result, version 1 of the API is not as standard / simple / easy / powerful / intuitive / documented etc. as it could be.

This page is to discuss the design of a better version 2 of the API.

Desired properties wishlist

What standards should the new API follow, what overally properties should it have etc.?

You can add what you want, and we can discuss it.

  • A documentation that matches the implementation
  • Non-breaking changes
  • A direct mapping to the MongoDB format
  • ...

APIs

Product read API

Product write API

Images read API

Images write API

Robotoff read API

There is now a minimal documentation (link). The documentation needs some more explanation.

call

result json

The result json contains fields that seem more useful to the internal workings of Robotoff than the enduser. Can these be split/structured in the json as well?

Robotoff write API

This api allows to write reponses to insight questions provided by the Robotoff read API.

Search API