Main Content

search

Search for HaverView variables

Since R2024a

    Description

    example

    [data,response] = search(c,queryString) returns a list of variables for a specified query string, where c is a haverview connection object.

    Examples

    collapse all

    Create a HaverView™ connection using a valid authentication token and database name. In this example, replace 681b61cf-dc7d-4698-a168-74c79b0c1a04 with your authentication token and replace USECON with the name of your database.

    token = "681b61cf-dc7d-4698-a168-74c79b0c1a04";
    databasename = "USECON";
    c = haverview(token,databasename)
    c = 
        
      haverview with properties:
        
        DatabaseName: "USECON"
             TimeOut: 200.00

    In this example, replace Boston with your own query string.

    queryString = "Boston";
    [data,response] = search(c,queryString)
    data =
        
         1x5 table
        
            count    pages        next                   prev                   data    
            _____    _____    ____________    __________________________    ____________
        
            23.00    1.00     {0x0 double}    {'/v2/data/search?page=0'}    {23x6 table}
        
        
        response = 
        
          ResponseMessage with properties:
        
            StatusLine: 'HTTP/1.1 200 OK'
            StatusCode: OK
                Header: [1×8 matlab.net.http.HeaderField]
                  Body: [1×1 matlab.net.http.MessageBody]
             Completed: 0

    Input Arguments

    collapse all

    HaverView connection, specified as a haverview object.

    Query string to search for matches in variable descriptions, specified as a character vector or string scalar.

    Output Arguments

    collapse all

    Request data for the specified query string, returned as a table.

    HTTP request response, returned as a ResponseMessage object. For details, see matlab.net.http.ResponseMessage.

    Version History

    Introduced in R2024a