You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With the recent additions of entity lists from around the world we've started to notice there are many overlapping fields (often named slightly differently) and the current /search endpoint has grown well beyond its initial scope. The current endpoint returns many key/array-of-objects results which are hard to parse though.
This proposal is two fold.
Create a generalized model for entities
Create a /v2/search endpoint which accepts generalized field queries to search across all lists
Generalized model for enties
The idea of a generalized model would be to offer a shared high-level search across all supported lists and shared fields for every entity supported by Watchman.
Initially the modeling could look like the following:
typeEntity[Tany] struct { // TODO: list all of the shared fieldsNamestring`json:"name"`TypeEntityType`json:"entityType"`SourceSourceList`json:"sourceList"`Addresses []Address`json:"addresses"`// TODO: define SourceDataT`json:"sourceData"`// Contains all original list data with source list naming
}
typeEntityTypestringvar (
EntityPersonEntityType="person"EntityBusinessEntityType="business"EntityAircraftEntityType="aircraft"EntityVesselEntityType="vessel"
)
typeSourceListstringvar (
SourceOFACSourceList="ofac"SourceUSCSLSourceList="us_csl"SourceUKCSLSourceList="uk_csl"
)
Create a new /v2/search endpoint which accepts all of the generalized entity fields as parameters and searches across all supported lists. Results are returned in their generalized form with a sub-object of their source list data. (In the original naming of the source list.)
GET /v2/search?name=...&country=....&type=individual
adamdecaf
changed the title
proposal: v2 Search endpoint and Generalized entity model
proposal: v2 Search endpoint and generalized entity model
Dec 20, 2023
adamdecaf
added a commit
to adamdecaf/watchman
that referenced
this issue
Jan 4, 2024
With the recent additions of entity lists from around the world we've started to notice there are many overlapping fields (often named slightly differently) and the current
/search
endpoint has grown well beyond its initial scope. The current endpoint returns many key/array-of-objects results which are hard to parse though.This proposal is two fold.
/v2/search
endpoint which accepts generalized field queries to search across all listsGeneralized model for enties
The idea of a generalized model would be to offer a shared high-level search across all supported lists and shared fields for every entity supported by Watchman.
Initially the modeling could look like the following:
Q: Should we adopt the OpenSanctions modeling?
v2 Search Endpoint
Create a new
/v2/search
endpoint which accepts all of the generalized entity fields as parameters and searches across all supported lists. Results are returned in their generalized form with a sub-object of their source list data. (In the original naming of the source list.)Pros: One stop source for search with a basic interface across all lists.
Cons: Dynamic types can be annoying to deal with in some languages.
Related Issues
#525, #441, #443, #444, #445, #353, #352
The text was updated successfully, but these errors were encountered: