Photos: Does photos provide an API similar to the gallery app?

Created on 25 Feb 2020  路  14Comments  路  Source: nextcloud/photos

Pretty much what the title says. I was not able to find any issues or documentation about this topic.

In case there is non, is an API planned?

1. to develop discussion

Most helpful comment

I am considering to write an Android Gallery App in which Nextcloud is a first class citizen. Currently I am still evaluating if a new project is the best approach or if I can build upon something existing.

All 14 comments

What kind of API do you have in mind?

The gallery app provided a BETA state REST API: https://github.com/nextcloud/gallery/wiki/RESTful-API

Ah, well we have indeed the album & shared album entrypoints here.
We could indeed create a proper api doc

Any specific project you would need this for? :)

I am considering to write an Android Gallery App in which Nextcloud is a first class citizen. Currently I am still evaluating if a new project is the best approach or if I can build upon something existing.

cc @jancborchardt

@skjnldsv @jancborchardt stabilized APIs could be useful to integrate with GNOME Photos as well. Nextcloud could be a first class citizen there :)

See the relevant issue on GNOME's Gitlab.

@skjnldsv may I suggest to version the API? Prefixing the API with /v1 will allow to ship a new /v2 API which breaks retro-compatbility if you ever need to, and deprecate the /v1.

Then you can support /v1 and /v2 APIs concurrently during a year or so, before removing support for the /v1 API. This would both give clients some stability and time to adapt, and give you some flexibility to suit your needs.

cc @rullzer

All fine with me.

Yes versioned APIs if we want to expose them make a ton of sense :)
Would probably need to be OCS for the albums stuff to make it work out of the box with clients.

@rullzer which should be the best way to authenticate against this API?
Using the token granted with the Login Flow v2?

Do you mean like described in this issue : https://github.com/nextcloud/gallery/issues/63 ?

@rullzer which should be the best way to authenticate against this API?
Using the token granted with the Login Flow v2?

Like any ocs call, see documentation :)
https://docs.nextcloud.com/server/stable/admin_manual/configuration_user/instruction_set_for_users.html

Do you mean like described in this issue : nextcloud/gallery#63 ?

@Hugo-Trentesaux This is a different matter. GNOME Photos is a desktop app to manage your photos. I don't want to "embed" a Nextcloud Photos widget. I'd rather access the actual photos, thumbnails, albums and metadata.

Like any ocs call, see documentation :)

@skjnldsv There probably is a misunderstanding here :)

The documentation you sent me is about user management. I don't want to add/remove or do anything with the users. I would like to know, as a third party completely outside of Nextcloud, what I should put in my Authorization header so I can perform actions as an authenticated user.

The documentation you sent me is about user management. I don't want to add/remove or do anything with the users. I would like to know, as a third party completely outside of Nextcloud, what I should put in my Authorization header so I can perform actions as an authenticated user.

No, we have a standard about apis in nextcloud: OCS.
Reaching the OCS api is the same for every of our apps.
Users management, apps management, sharing management... etc :)

Sorry, this link should explain a bit more in depth: https://docs.nextcloud.com/server/stable/developer_manual/client_apis/OCS/index.html

Was this page helpful?
0 / 5 - 0 ratings