Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add REST API #100

Open
eramox opened this issue Apr 17, 2020 · 12 comments
Open

Add REST API #100

eramox opened this issue Apr 17, 2020 · 12 comments

Comments

@eramox
Copy link

eramox commented Apr 17, 2020

Hello,

Would it be possible to add a REST API in order to be able to generate the certificate from any other development language? It would:

  • increase it's usability using curl/python/cobol...
  • reduce the bandwidth required (save the planet)
  • All coders will be grateful

Thanks for your commitment.

@vartur
Copy link

vartur commented Apr 17, 2020

Yes indeed it would be a very useful feature

@PeredurOmega
Copy link

I don't really understand why it's necessary (or even useful) as you can generate a qr code (offline) with so much apis.

@vartur
Copy link

vartur commented Apr 17, 2020

The certificate is a service, and every service should have a REST API to my opinion, to make it sleek and scalable

@PeredurOmega
Copy link

PeredurOmega commented Apr 17, 2020

I think this project is only about giving an alternative to a paper travel certificate which does not require a REST API. I don't know what is displayed on a police officer's phone but I suppose that it is only the info given by the QR code. Therefore, a REST API may be useless and may generate an unnecessary traffic.

Nota Bene: I agree with you on the fact that a REST API is generally better but in this case I think it may create concerns about data collections. I thank the team working on this project for their whish to bring transparency.

@eramox
Copy link
Author

eramox commented Apr 17, 2020

The idea of the REST API was only to provide the fields as json to generate the QR code and the pdf. In this case there is no collection of data.
I did not wanted to create side apps for the service but extend it.

@Padamdam
Copy link

Padamdam commented Apr 18, 2020

Hi @eramox @vartur,

Please take into account that this project has a limited lifetime. The goal of Johann Pardanaud and after that, the Interior Ministry was to quickly publish a simple, reliable tool to generate the form.
There is no point in asking to develop such feature, as well as asking for optimisation or useless features.
It don't see any reason that the Ministry would like to invest more time in a service that is actually functional and will be forgotten in a few weeks.

Keep in mind that the website and the project will not be used more than one or two months in the future.

Best regards,
Adam

@paul-vd
Copy link

paul-vd commented Apr 21, 2020

Also noting that an API will resolve these issues;
#98
#96
#92

@reevoremo
Copy link

It looks like the objective is to generate the certificates on the client side, so that no data hits the server. API will create traces on servers.

@allan-simon
Copy link

and even if it was hitting a server, a form-url-encoded POST would also qualify as "REST" , REST != Json API , but as it's not the case, having an API would actually require more infrastructure and be less environment-friendly.

At the opposite yes having the format of the json that is then qrcode encode would be nice so that one can implement it in whichever language he wants without doing any network call :)

@hrdlnk
Copy link

hrdlnk commented Apr 29, 2020

I’m working on a proof-of-concept hack to use the url instead of an additional POST request.
All customization entirely done in the browser
Nginx server on Ubuntu 18.04 with config something like:

server {
    listen       80;
    server_name  *.example.org;
    ...
}

The catch-all may or may not be a security issue, I’m not a sys admin...
I’d be glad to post a link if anyone is interested

@oeil
Copy link

oeil commented Apr 29, 2020

I've done that in the same nature : https://oeil.github.io/deplacement-covid-19/

I'm using Siri to generate my certificate each time I need.

@fl0riandre
Copy link

I've done that in the same nature : https://oeil.github.io/deplacement-covid-19/

I'm using Siri to generate my certificate each time I need.

Perfect thank you 🍻

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants