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 #5

Closed
5 tasks done
oparoz opened this issue Jan 4, 2015 · 6 comments
Closed
5 tasks done

Add REST API #5

oparoz opened this issue Jan 4, 2015 · 6 comments
Milestone

Comments

@oparoz
Copy link
Contributor

oparoz commented Jan 4, 2015

General

  • Versioning will happen using headers
  • Authentication happens via HTTP auth

Config API

Gives information about the supported features as well as the list of supported media types

  • /api/config

Files API

Gives the list of files found in the folder given as argument and lets you download a file

  • /api/files/list
  • /api/files/download/{fileId}

Preview API

Gives you a list of base64 encoded thumbnails when you connect to the thumbnails endpoint using EventSource and gives you a resized preview when you use the preview endpoint

  • /api/preview/thumbnails
  • /api/preview/{fileId}/{width}/{height}
@oparoz
Copy link
Contributor Author

oparoz commented Aug 18, 2015

The API can be tested using Codeception.
You need to install Codeception via composer as we need a local web server to run during the test. See this doc for details: https://github.com/owncloud/gallery/blob/master/tests/README.MD#install-via-composer

Then you simply do:

# cd apps/gallery
# vendor/bin/codecept run api

If you need a more verbose output to check the scenarios, use:
# vendor/bin/codecept run api -vvv

@ghost
Copy link

ghost commented Sep 21, 2015

@rperezb can someone have a look?

@rperezb
Copy link

rperezb commented Sep 23, 2015

@SergioBertolinSG may check this one, once he finishes with the encryption one

@rperezb rperezb mentioned this issue Sep 23, 2015
2 tasks
@oparoz
Copy link
Contributor Author

oparoz commented Sep 28, 2015

@SergioBertolinSG - There is now some documentation for the API: https://github.com/owncloud/gallery/wiki/RESTful-API

@SergioBertolinSG
Copy link
Contributor

@oparoz Awesome, thanks.

@oparoz
Copy link
Contributor Author

oparoz commented Sep 30, 2015

I'm going to close this since the tests are used in CI.
We'll have a better idea of if it meets the needs of developers when they start using it.
Any missing, interesting test case, just add them directly to the tests or post new scenarios.

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

No branches or pull requests

4 participants