Saved Searches API in Wasabi AiR
    • 17 May 2024
    • 1 Minute to read
    • PDF

    Saved Searches API in Wasabi AiR

    • PDF

    Article summary

    The Saved Searches API enables users to save a particular set of search parameters and easily run them again.

    Getting Saved Searches

    GET /api/data/saved-searches

    Sample Response

    {
        "saved_searches": [
            {
                "saved_search_id": "5966c04e9480ef4d8dff09331af33755",
                "name": "Celebrities",
                "params": "query=Brad Pitt",
                "created_at": "2017-07-13T00:35:26.683471Z"
            },
            {
                "saved_search_id": "5966c06e5179ce3d6f384417722dea1a",
                "name": "Artwork",
                "params": "query=Britto",
                "created_at": "2017-07-13T00:35:58.368016Z"
            }
        ]
    }
    POST /api/data/saved-searches
    {
        "name": "Celebrities",
        "params": "query=Brad Pitt"
    }
    • name - (string) The name of the saved search (must be unique).
    • params - (string) The URL query parameters for the search.

    Response

    {
        "saved_search_id": "5966c06e5179ce3d6f384417722dea1a",
        "name": "Artwork",
        "params": "query=Brad Pitt",
        "user_id": "59668a46d279dec1427c116d45ed910e",
        "created_at": "2017-07-13T00:35:58.368016Z"
    }
    PATCH /api/data/saved-searches/{saved_search_id}
    {
        "params": "query=Brad Pitt"
    }
    • saved_search_id - (string) The ID of the saved search to delete.
    • params - (string) The URL query parameters of the search to update.

    Response

    {
        "saved_search_id": "5966c06e5179ce3d6f384417722dea1a",
        "name": "Artwork",
        "params": "query=Brad Pitt",
        "user_id": "59668a46d279dec1427c116d45ed910e",
        "created_at": "2017-07-13T00:35:58.368016Z"
    }
    
    DELETE /api/data/saved-searches/{saved_search_id}
    • saved_search_id - (string) The ID of the saved search to delete.

    Response

    {
        "saved_search_id": "5966b8013bba33d34663137071ecadcb",
        "deleted": true
    }