Skip to content

Instantly share code, notes, and snippets.

@wjgilmore
Last active May 9, 2019 20:18
Show Gist options
  • Save wjgilmore/36f01c6dbd17ad29bcd4bf1630ab79dc to your computer and use it in GitHub Desktop.
Save wjgilmore/36f01c6dbd17ad29bcd4bf1630ab79dc to your computer and use it in GitHub Desktop.
{
"swagger": "2.0",
"info": {
"version": "1.0",
"title": "U.S.Energy Information Administration Swagger",
"description": "U.S.Energy Information Administration API services",
"license": {
"name": "MIT",
"url": "http://github.com/gruntjs/grunt/blob/master/LICENSE-MIT"
}
},
"host": "api.eia.gov",
"basePath": "",
"schemes": [
"http"
],
"consumes": [
"application/json"
],
"produces": [
"application/json",
"application/xml"
],
"paths": {
"/category": {
"get": {
"description": "Category",
"operationId": "http://api.eia.gov/category",
"produces": [
"application/json",
"application/xml"
],
"parameters": [
{
"name": "api_key",
"in": "query",
"description": "The API Key, required to make API requests to U.S. EIA API services.",
"required": false,
"type": "string"
},
{
"name": "category_id",
"in": "query",
"description": "Optional. Category ID is a unique numeric identifier of a category.
If left blank the root category is fetched from the API, additional queries can be made using
category IDs returned from this API call.",
"required": false,
"type": "integer",
"format": "int32"
}
],
"responses": {
"200": {
"description": "success"
}
}
}
},
"/updates": {
"get": {
"description": "Updates",
"operationId": "http://api.eia.gov/updates",
"produces": [
"application/json",
"application/xml"
],
"parameters": [
{
"name": "api_key",
"in": "query",
"description": "The API Key, required to make API requests to U.S. EIA API services.",
"required": false,
"type": "string"
},
{
"name": "category_id",
"in": "query",
"description": "Optional. Category ID is a unique numeric identifier of a category.
If left blank the root category is fetched from the API, additional queries can be made
using category IDs returned from this API call.",
"required": false,
"type": "integer",
"format": "int32"
},
{
"name": "deep",
"in": "query",
"description": "Optional. If true, include the series in all descendent categories.
If missing or false, only series directly in the start category will be returned.",
"required": false,
"type": "boolean"
},
{
"name": "firstrow",
"in": "query",
"description": "Optional. Integer specifying the zero-based index of the first row to
return, providing a means to page through the updated series. Note that it is possible
to page through the all of the API's series in this manner",
"required": false,
"type": "integer",
"format": "int32"
},
{
"name": "rows",
"in": "query",
"description": "Optional. Determines the maximum number of rows returned for each request,
up to 10,000. Missing or invalid value results a default value of 50 as the maximum rows
returned with each call.",
"required": false,
"type": "integer",
"format": "int32"
}
],
"responses": {
"200": {
"description": "success"
}
}
}
},
"/series": {
"get": {
"description": "Series",
"operationId": "http://api.eia.gov/series",
"produces": [
"application/json",
"application/xml"
],
"parameters": [
{
"name": "api_key",
"in": "query",
"description": "The API Key, required to make API requests to U.S. EIA API services.",
"required": false,
"type": "string"
},
{
"name": "series_id",
"in": "query",
"description": "Required. The series ID is a case-insensitive string consisting of
letters, numbers, dashes and, periods that create a unique identifier for the EIA series.",
"required": true,
"type": "string"
},
{
"name": "start",
"in": "query",
"description": "Optional. When start is used, values will be returned beginning with
the provided value. Values are accepted in the same format as dates in returned API data.
Dates are formatted as yyyy, yyyyQq, yyyymm, yyyymmdd for annual, quarterly, monthly, and
daily/weekly data when querying API. ",
"required": false,
"type": "integer",
"format": "int32"
},
{
"name": "end",
"in": "query",
"description": "Optional. When end is used, values will be returned ending with the
provided value. Values are accepted in the same format as dates in returned API data.
Dates are formatted as yyyy, yyyyQq, yyyymm, yyyymmdd for annual, quarterly, monthly,
and daily/weekly data when querying API.",
"required": false,
"type": "integer",
"format": "int32"
}
],
"responses": {
"200": {
"description": "success"
}
}
}
},
"/series/categories": {
"get": {
"description": "Series Categories",
"operationId": "http://api.eia.gov/series/categories",
"produces": [
"application/json",
"application/xml"
],
"parameters": [
{
"name": "api_key",
"in": "query",
"description": "The API Key, required to make API requests to U.S. EIA API services.",
"required": false,
"type": "string"
},
{
"name": "series_id",
"in": "query",
"description": "Required. The series ID is a case-insensitive string consisting of letters,
numbers, dashes and, periods that create a unique identifier for the EIA series.",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "success"
}
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment