L10n:Pontoon/API: Difference between revisions
(Add Overview) |
(Add Contact) |
||
| Line 1: | Line 1: | ||
==Description== | |||
Exposing Pontoon's data through an API will enable external consumers to build tools, extensions and reports about translations. In the future, the API will serve as the backend for Pontoon.NEXT's SPA front-end. We chose an iterative approach to exposing the data. We start small with a small number of clear-focused use-cases in mind and expand the scope in subsequent iterations. The API is based on [http://graphql.org/ GraphQL] (see [https://wiki.mozilla.org/index.php?title=L10n:Pontoon/API&oldid=1181890#Technology discussion]). | Exposing Pontoon's data through an API will enable external consumers to build tools, extensions and reports about translations. In the future, the API will serve as the backend for Pontoon.NEXT's SPA front-end. We chose an iterative approach to exposing the data. We start small with a small number of clear-focused use-cases in mind and expand the scope in subsequent iterations. The API is based on [http://graphql.org/ GraphQL] (see [https://wiki.mozilla.org/index.php?title=L10n:Pontoon/API&oldid=1181890#Technology discussion]). | ||
The tracking bug for all work related to the API for Pontoon is {{bug|pontoon-api}}. | The tracking bug for all work related to the API for Pontoon is {{bug|pontoon-api}}. | ||
==Overview== | ==Overview== | ||
| Line 38: | Line 39: | ||
|} | |} | ||
==Roadmap== | |||
==Milestone 1== | ===Milestone 1=== | ||
''Complete, deployed on October 2, 2017.'' | ''Complete, deployed on October 2, 2017.'' | ||
| Line 55: | Line 57: | ||
}</bugzilla> | }</bugzilla> | ||
==Milestone 2== | ===Milestone 2=== | ||
Main theme: translations and pagination. | Main theme: translations and pagination. | ||
| Line 69: | Line 71: | ||
** List all TranslatedResources for a ProjectLocale? | ** List all TranslatedResources for a ProjectLocale? | ||
==Milestone 3== | ===Milestone 3=== | ||
Main theme: contributors. | Main theme: contributors. | ||
| Line 82: | Line 84: | ||
* List all contributors for a project | * List all contributors for a project | ||
==Milestone 4== | ===Milestone 4=== | ||
Main theme: authentication. | Main theme: authentication. | ||
| Line 88: | Line 90: | ||
* List unread notifications for a logged-in user. | * List unread notifications for a logged-in user. | ||
==Milestone 5== | ===Milestone 5=== | ||
Main theme: mutations. | Main theme: mutations. | ||
* Add a suggested translation for an Entity. | * Add a suggested translation for an Entity. | ||
==Contact== | |||
{| class="wikitable" | |||
! style="text-align: center;" | Role | |||
! style="text-align: center;" | Name | |||
! style="text-align: center;" | IRC | |||
|- | |||
| Feature Owner | |||
| Staś Małolepszy | |||
| stas | |||
|- | |||
| Product Owner | |||
| Matjaž Horvat | |||
| mathjazz | |||
|- | |||
| Reviewer | |||
| Adrian Gaudebert | |||
| adrian | |||
|} | |||
;Mailing list | |||
:[https://groups.google.com/forum/#!forum/mozilla.tools.l10n tools-l10n] | |||
;IRC | |||
:[irc://irc.mozilla.org/pontoon #pontoon] | |||
Revision as of 12:31, 6 October 2017
Description
Exposing Pontoon's data through an API will enable external consumers to build tools, extensions and reports about translations. In the future, the API will serve as the backend for Pontoon.NEXT's SPA front-end. We chose an iterative approach to exposing the data. We start small with a small number of clear-focused use-cases in mind and expand the scope in subsequent iterations. The API is based on GraphQL (see discussion).
The tracking bug for all work related to the API for Pontoon is bug pontoon-api.
Overview
| Milestone | Theme | Date | Status |
|---|---|---|---|
| M1 | Projects and Locales | September 2017 | ✓ |
| M2 | Translations | November 2017 | |
| M3 | Contributors | January 2018 | |
| M4 | Authentication | March 2018 | |
| M5 | Mutations | May 2018 |
Roadmap
Milestone 1
Complete, deployed on October 2, 2017.
In the first iteration we'd like to make some data stored in Pontoon openly available for third-parties. The goals is to create an API endpoint supporting queries related to aggregate statistics per locale and per project. The main driver is the use case from bug 1302053:
- Stats for a locale: supported projects, status of each project.
- Stats for a project: supported locales, incomplete locales, complete locales.
| ID | Summary | Status | Resolution | Assigned to | Depends on | Blocks |
|---|---|---|---|---|---|---|
| 1302053 | Expose project status and information through API | RESOLVED | FIXED | Staś Małolepszy :stas | 1395273 | |
| 1403861 | [API] Hide aggregate statistics about Suggested strings | RESOLVED | FIXED | Staś Małolepszy :stas | 1377969 | 1395273 |
| 1407192 | [API] Enable GraphiQL IDE on production | RESOLVED | MOVED | 1395273 | ||
| 1409704 | [tracking] Pontoon API Milestone 2 | RESOLVED | WONTFIX | 1408625, 1409711, 1409723, 1409724 | 1395273 | |
| 1410387 | [API] Expose aggregate statistics about Suggestions | RESOLVED | MOVED | 1377969 | 1395273 |
5 Total; 0 Open (0%); 5 Resolved (100%); 0 Verified (0%);
Milestone 2
Main theme: translations and pagination.
- Establish a good practice for paginating results.
- List all Resources for a Project.
- List all Entities for a Resource.
- List all Translations for an Entity.
- Include status: approved, suggested, fuzzy.
- List all TranslatedResources for a Resource.
- Include aggregate statistics.
- List all TranslatedResources for a Locale.
- List all TranslatedResources for a ProjectLocale?
Milestone 3
Main theme: contributors.
- Query a single contributor (by email? unique key?)
- List recent activity: date, project, action, number of affected strings
- Aggregate counts of: translated, suggested, fuzzy strings across all projects
- List of projects they contribute to
- Aggregate counts of: translated, suggested, fuzzy strings for each project
- List all contributors on Pontoon
- List all contributors for a locale
- List all contributors for a project
Milestone 4
Main theme: authentication.
- List unread notifications for a logged-in user.
Milestone 5
Main theme: mutations.
- Add a suggested translation for an Entity.
Contact
| Role | Name | IRC |
|---|---|---|
| Feature Owner | Staś Małolepszy | stas |
| Product Owner | Matjaž Horvat | mathjazz |
| Reviewer | Adrian Gaudebert | adrian |
- Mailing list
- tools-l10n
- IRC
- #pontoon