Main Content

series

Retrieve HaverView series information

Since R2024a

    Description

    data = series(c) returns a list of all series in a HaverView™ database, where c is a haverview connection object.

    data = series(c,haverParams) returns information for a single page of variables, where haverParams is an optional comma-separated list of HaverView API flags that you can specify. For more information, see the Haver API documentation. Use this syntax to limit the number of series returned.

    example

    [data,response] = series(___) also returns a response message.

    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

    Use HaverView arguments to specify API flags to return 20 series per page for a specified page.

    [data,response] = series(c,page="Y692BD22",per_page=20)
    data =
        
          1x3 table
        
            count                         next                              data     
            _____    _______________________________________________    _____________
        
            20.00    {'/v3/data/databases/ESG/series?page=Y692DS18'}    {20x19 table}
        
        
        response = 
        
          ResponseMessage with properties:
        
            StatusLine: 'HTTP/1.1 200 OK'
            StatusCode: OK
                Header: [1x12 matlab.net.http.HeaderField]
                  Body: [1x1 matlab.net.http.MessageBody]
             Completed: 0
    
    

    Input Arguments

    collapse all

    HaverView connection, specified as a haverview object.

    HaverView API arguments, specified as a comma-separated list. For more information, see the Haver API documentation.

    Example: [data,response] = series(c,page="Y692BD22",per_page=20)

    Output Arguments

    collapse all

    Series data for the specified HaverView database page, returned as a table.

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

    Version History

    Introduced in R2024a