flexmeasures.api.v3_0.sources
Classes
- class flexmeasures.api.v3_0.sources.SourceAPI
- get(id: int)
Get one data source, including its attributes.
— get:
summary: Get one data source. description: |
Returns the full record of one data source, including the attributes in which data generators (such as forecasters, schedulers and reporters) store their configuration.
The access rules are the same as for listing data sources.
- security:
ApiKeyAuth: []
- parameters:
in: path name: id required: true description: ID of the data source. schema:
type: integer
- responses:
- 200:
description: PROCESSED content:
- application/json:
- example:
id: 6 name: Seita type: forecaster model: TrainPredictPipeline version: “1” description: “Seita’s TrainPredictPipeline model v1” account_id: 2 user_id: null attributes:
- data_generator:
- config:
model: CustomLGBM
- 401:
description: UNAUTHORIZED
- 403:
description: INVALID_SENDER
- 404:
description: NOT_FOUND
- tags:
Sources
- index(only_latest: bool = True)
List accessible data sources and defined source types.
— get:
summary: List accessible data sources and defined source types. description: |
Returns the list of data sources accessible to the current user and the defined source types.
Access rules:
Admins see all data sources.
Users with the
consultantrole see sources belonging to their own account and to any consultancy-client accounts for which their account is the consultancy.All other authenticated users see only sources belonging to their own account, plus sources that have neither a
user_idnor anaccount_id(i.e. system/public sources).
- security:
ApiKeyAuth: []
- parameters:
in: query schema: SourceQuerySchema
- responses:
- 200:
description: PROCESSED content:
- application/json:
- example:
- types:
user
scheduler
forecaster
reporter
demo script
gateway
market
- sources:
id: 1 name: Seita type: scheduler model: StorageScheduler version: “1.0” description: “Seita’s StorageScheduler model v1.0” account_id: 2
- 401:
description: UNAUTHORIZED
- 403:
description: INVALID_SENDER
- tags:
Sources
- class flexmeasures.api.v3_0.sources.SourceQuerySchema(*, only: Sequence[str] | AbstractSet[str] | None = None, exclude: Sequence[str] | AbstractSet[str] = (), many: bool | None = None, load_only: Sequence[str] | AbstractSet[str] = (), dump_only: Sequence[str] | AbstractSet[str] = (), partial: bool | Sequence[str] | AbstractSet[str] | None = None, unknown: Literal['exclude', 'include', 'raise'] | None = None)