4.2.1.2. Capture¶
-
class
wsapiwrapper.admin.capture.
CaptureWrapper
(baseurl: str, adminapi_token: str)[source]¶ Wraps calls to capture endpoints on the Admin API.
-
get_many
(offset: int = 0, limit: int = None, tag_id: int = None) → list[source]¶ Makes a GET request to endpoint_many.
-
post
(capturepayload: dict)[source]¶ Create a capture in the database directly.
The is made from a dictionary including a list of samples, a tag_id and a user_id. The endpoint is used for testing. It removes the need to encode test vectors with wscodec (introduces a second point of failure in an external library).
Captures can be created with a known list of samples. Then samples are collected from the tag using the consumer API. These are compared with a vector of expected samples. If captures overlap slightly in time it is expected that duplicate samples are removed.
- Parameters
capturepayload (dict) – Dictionary following the capture schema.
Returns: HTTP response from wsbackend.
-