Feature Request: Query Photos by EXIF Date (takenDateTime) via REST API

Feature Request: Query Photos by EXIF Date (takenDateTime) via REST API

Summary

I’m looking to build a photo timeline/gallery view for oCIS that groups photos by the date they were taken. I’ve done some research into the codebase and documentation, and I’d like to understand the roadmap for exposing photo metadata in the search API.

My Setup

  • oCIS Version: 7.3.1

  • Search: Bleve with Tika 2.9.2 for content extraction

  • Use Case: Family cloud storage (~100GB of photos across multiple users)

What I Found

1. Data Model Exists :white_check_mark:

The protobuf definitions at ocis.messages.search.v0 include a Photo message with:

  • takenDateTime (google.protobuf.Timestamp)

  • cameraMake, cameraModel

  • fNumber, focalLength, iso

  • orientation

2. EXIF Data is Indexed :white_check_mark:

The search service documentation confirms:

“Though EXIF data can be present in the bleve index…”

3. No Query API :cross_mark:

The same documentation states:

“…currently, only text-related data can be extracted. Code must be written to make this type of extraction available to users.

I’ve tested various endpoints and confirmed there’s no current way to query by photo metadata:

  • WebDAV REPORT search doesn’t support photo field filters

  • LibreGraph API has no /search endpoint with photo filters

  • KQL doesn’t appear to have photo: field support

Questions

  1. Is there a roadmap for exposing photo metadata (particularly takenDateTime) in the search API?

  2. Would a PR be welcome that adds:

    • KQL support for photo fields (e.g., photo:takenDateTime>2024-01-01)

    • Or a LibreGraph endpoint like GET /graph/v1.0/me/drive/items?$filter=photo/takenDateTime ge '2024-01-01'

  3. What’s the preferred approach? I see a few options:

    • Extend KQL parser to recognize photo fields

    • Add OData-style filtering to LibreGraph

    • Create a dedicated photos API endpoint

    • Something else?

  4. Any existing work I should be aware of? Issues, branches, or discussions about photo organization features?

Use Case Details

I’m building a web extension for oCIS that provides:

  • Photo timeline grouped by date (like Google Photos / Apple Photos)

  • Date range filtering

  • Potentially: map view using GPS coordinates (also in the proto)

The gRPC layer has all the data structures needed—it’s just the HTTP/REST exposure that’s missing.

Willingness to Contribute

I’m comfortable with Go and would be happy to submit a PR if there’s guidance on the preferred implementation approach. I’ve reviewed:

  • ADR-0018 (File Search API)

  • ADR-0019 (File Search Index)

  • ADR-0020 (File Search Query Language / KQL)

Looking forward to your thoughts!


Cross-reference: The search service docs mention “Code must be written to make this type of extraction available to users”

Hi @paul43210. First Thank you very much for using oCIS and are willing to contribute :heart: Currently we have not planned this on any roadmap. But we would be very happy to accept a PR implementing this feature!

I think the easiest way would be to add KQL support for it. This is also the most versatile solution in my opinion. What do you think? We haven’t put much work into search service for a while. So there a no outstanding discussions or issues around it.

If you open a PR to our github repo GitHub - owncloud/ocis: ⚛ ownCloud Infinite Scale Stack we are happy to review and/or help with any issue arising.