Get fields contained in the response of the API using the API index name

get_api_fields(api_index)

Arguments

api_index

API index name you found using the search functions. You can also get these from data.gov.in from a specific API page. In the request URL, it is followed by /resource/xxxxxxxx For getting the relevant fields in the API use get_api_fields

Value

data.frame with 1 row , API that matches API ID ; contains ID, name and type of the field - name and type are usually the same; but we recommend using ID for queries.

Examples

get_api_fields("3b01bcb8-0b14-4abf-b6f2-c1bfd384ba69")
#>                id           name    type
#> 1     document_id    document_id  double
#> 2              id             id  double
#> 3         country        country keyword
#> 4           state          state keyword
#> 5            city           city keyword
#> 6         station        station keyword
#> 7     last_update    last_update    date
#> 8    pollutant_id   pollutant_id keyword
#> 9   pollutant_min  pollutant_min  double
#> 10  pollutant_max  pollutant_max  double
#> 11  pollutant_avg  pollutant_avg  double
#> 12 pollutant_unit pollutant_unit keyword
#> 13  resource_uuid  resource_uuid keyword