Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Search preview endpoint #14797

Merged
merged 14 commits into from
Apr 9, 2019
Merged

Search preview endpoint #14797

merged 14 commits into from
Apr 9, 2019

Conversation

gonzaloriestra
Copy link
Contributor

@gonzaloriestra gonzaloriestra commented Apr 1, 2019

Related to https://github.com/CartoDB/product/issues/243

Added /api/v3/search_preview endpoint to use while the user types in the search box. It finds visualizations and tags, returning only the required information.

Parameters:

  • q: search pattern (mandatory)
  • limit: max results. 4 by default (first all the found tags and then visualizations)
  • types: "derived,table,remote,tag" by default

Response example:

{
  "result": [
    {
      "type": "tag",
      "name": "spain",
      "url": "http://user.carto.com/dashboard/search/tag/spain"
    },
    {
      "type": "derived",
      "name": "Madrid traffic",
      "url": "http://user.carto.com/viz/107b672b-6f57-4a9e-b982-bbf1e041124a/map"
    }
  ],
  "total_count": 2
}

It includes visualizations/tags owned by or shared with the user, with any kind of privacy and locked/unlocked.

@gonzaloriestra gonzaloriestra changed the base branch from master to bq-connector April 3, 2019 06:32
@gonzaloriestra gonzaloriestra changed the base branch from bq-connector to master April 3, 2019 06:33
@gonzaloriestra gonzaloriestra marked this pull request as ready for review April 3, 2019 06:38
@jesusbotella
Copy link
Contributor

Acceptance is OK! 👌

@gonzaloriestra gonzaloriestra merged commit 83184dd into master Apr 9, 2019
@gonzaloriestra gonzaloriestra deleted the search_preview branch April 9, 2019 07:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants