Power.Dev Hangfire Services

<back to all web services

EIAProductionSeriesRequest

The following routes are available for this service:
POST/eia-production-request
import datetime
import decimal
from marshmallow.fields import *
from servicestack import *
from typing import *
from dataclasses import dataclass, field
from dataclasses_json import dataclass_json, LetterCase, Undefined, config
from enum import Enum, IntEnum


class TimeGranularity(IntEnum):
    UNDEFINED = 0
    HOURLY = 1
    DAILY = 2
    WEEKLY = 3
    MONTHY = 4
    YEARLY = 5
    FIVEMIN = 10
    TENMIN = 11
    FIFTEENMIN = 12
    HALFHOUR = 13
    QUARTERLY = 14
    TWOHOURS = 21
    THREEHOURS = 22
    FOURHOURS = 24
    SIXHOURS = 26
    EIGHTHOURS = 28
    TWELVEHOURS = 32
    IRREGULAR = 100


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class EIAProductionSeriesRequest:
    time_granularity: Optional[TimeGranularity] = None
    date: datetime.datetime = datetime.datetime(1, 1, 1)

Python EIAProductionSeriesRequest DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /eia-production-request HTTP/1.1 
Host: catalog-jobs-dev.power.dev 
Accept: application/json
Content-Type: application/json
Content-Length: length

{"timeGranularity":"Undefined","date":"\/Date(-62135596800000-0000)\/"}