Skip to content

Search parameter "only" no longer working #172

@pitkant

Description

@pitkant

I can't seem to restrict the fields returned by API search query. For example the following query returns also other fields than just name and street_address:

https://api.hel.fi/servicemap/v2/search/?q=leikkipuisto&only=unit.name,unit.street_address

Additionally, the documentation for the API seems to be partially incomplete. (Yes, I know this site is no longer in use but there seems to be no alternative either.) The description for only parameter ends abruptly

"Restrict the field returned in the results. Separate field names by commas. In the search endpoint, you must qualify the field names with the resource names using the format"

Maybe this should include similar instructions as the include parameter above?

For example, instead of include=department you must specify include=unit.department.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions