Skip to content

Provide JSON API for search #10

@jancborchardt

Description

@jancborchardt

(Reopening your issue here because we moved development @stefan-niedermann :)

There should be an API for searching for addresses.
Otherwise every client would have to implement searching in contacts etc. itself. Providing an API would save every client much work.

This should be read as "WiP", just brainstorming.

Request

GET /search?q=<string>

Response

Nextcloud Maps should search all reachable information in the Nextcloud (especially from Nextcloud Contacts, but maybe from Nextcloud Calendar - Meetings in the near future?). And it should search osm via nominatim to get PoIs.
Mimetype: application/json

{
  /* Contacts from contacts app */
  contacts : [
	  {
		firstname : <string>,
		lastname : <string>,
		address : {
		  nr : <int>,
		  street : <string>,
		  plz : <int>,
		  city : <string>
		},
		lat : <int>,
		long : <int>
	  },
	  ...
  ],
  /* Points of Interest (bars, clubs, toilets, buildings, ...) */
  poi : [
      {
        title : <string>,
        type : <string>, /* Enum? */
		address : {
		  nr : <int>,
		  street : <string>,
		  plz : <int>,
		  city : <string>
		},
        lat : <int>,
        long : <int>
      },
      ...
  ],
  /* Addresses from OSM search */
  addresses : [
    {
      /* Whatever the OSM JSON-API delivers ;-) */
    },
    ...
  ]
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions