flexmeasures.api
Modules
Functionality common to all API versions. |
|
Endpoints under development. |
|
A place to keep all routes to endpoints that previously existed and are now sunset. |
|
FlexMeasures API v3 |
FlexMeasures API routes and implementations.
Functions
- flexmeasures.api.get_versions() dict
— get:
summary: List available API versions description: |
Public endpoint to list all available FlexMeasures API versions.
This can be used to programmatically discover which API versions are currently supported and their base URLs.
- responses:
- 200:
description: Successfully retrieved available API versions. content:
- application/json:
- schema:
type: object properties:
- message:
type: string example: “For these API versions a public endpoint is available, listing its service.”
- versions:
type: array items:
type: string
example: [“v3_0”]
- flexmeasures_version:
type: string example: “0.18.3”
- tags:
Public
- flexmeasures.api.register_at(app: Flask)
This can be used to register this blueprint together with other api-related things
- flexmeasures.api.request_auth_token(args) tuple[dict, int]
— post:
summary: Obtain a fresh authentication access token. description: |
Retrieve a short-lived authentication token using email and password. The lifetime of this token depends on the current system setting SECURITY_TOKEN_MAX_AGE.
- requestBody:
required: true content:
- application/json:
schema: AuthRequestSchema
- responses:
- 200:
description: Token successfully generated content:
- application/json:
- schema:
type: object properties:
- authentication_token:
type: string description: |
Short-lived authentication token, which can be used in request headers using {“Authorization”: authentication_token}.
- 400:
description: INVALID_REQUEST
- 401:
description: UNAUTHORIZED
- tags:
Auth