Skip to content

Version

Specific implementation of the StreamPipes API's version endpoint.

VersionEndpoint(parent_client)

Bases: APIEndpoint

Implementation of the Versions endpoint.

This endpoint provides metadata about the StreamPipes version of the connected instance. It only allows to apply the get() method with an empty string as identifier.

PARAMETER DESCRIPTION
parent_client

The instance of StreamPipesClient the endpoint is attached to.

TYPE: StreamPipesClient

Examples:

>>> from streampipes.client import StreamPipesClient
>>> from streampipes.client.config import StreamPipesClientConfig
>>> from streampipes.client.credential_provider import StreamPipesApiKeyCredentials
>>> client_config = StreamPipesClientConfig(
...     credential_provider=StreamPipesApiKeyCredentials(username="test-user", api_key="api-key"),
...     host_address="localhost",
...     port=8082,
...     https_disabled=True
... )
>>> client = StreamPipesClient.create(client_config=client_config)
>>> client.versionApi.get(identifier="").to_dict(use_source_names=False)
{'backend_version': '0.92.0-SNAPSHOT'}

all()

Usually, this method returns information about all resources provided by this endpoint. However, this endpoint does not support this kind of operation.

RAISES DESCRIPTION
NotImplementedError

this endpoint does not return multiple entries, therefore this method is not available

get(identifier, **kwargs)

Queries the resource from the API endpoint.

For this endpoint only one resource is available.

PARAMETER DESCRIPTION
identifier

Not supported by this endpoint, is set to an empty string.

TYPE: str

RETURNS DESCRIPTION
versions

The specified resource as an instance of the corresponding model class(Version). # noqa: 501

TYPE: Version

post(resource)

Usually, this method allows to create via this endpoint. Since the data represented by this endpoint is immutable, it does not support this kind of operation.

RAISES DESCRIPTION
NotImplementedError

this endpoint does not allow for POST requests, therefore this method is not available