Skip to main content

Invinite Web API

Project description

invinite-api

Typed Python client for the Invinite Web API — the workspace REST API at api.invinite.com. It is generated from the same endpoint registry that powers the REST API and the inv CLI, so its request and response models always match the reference.

The client is built on urllib3 + pydantic and imports as invinite_api.

The generated surface includes the curated team activity stream and its full-fidelity per-entity history, plus alert fire-history time ranges, per-alert events, and summary counts.

Install

pip install invinite-api

Authentication

Create a Configuration with your invw_ Web API token as the access token. The client sends it as an Authorization: Bearer <token> header on every request.

import invinite_api

config = invinite_api.Configuration(access_token=token)

Team-scoped endpoints take the team as a per-method x_team_id argument — not a global default header.

Quickstart

Configure the client, call users/me to discover your team id, then make a team-scoped list call.

import invinite_api
from invinite_api import UsersApi, WorkspaceApi

config = invinite_api.Configuration(access_token=token)

with invinite_api.ApiClient(config) as client:
    # 1. Find the team to operate on.
    me = UsersApi(client).users_me()
    team_id = me.data.teams[0].id

    # 2. Make a team-scoped list call.
    spaces = WorkspaceApi(client).spaces_list(x_team_id=team_id, limit=50)

    for space in spaces.data.items:
        print(space)

Pagination

List methods return data.items plus data.next_cursor. Pass the cursor back on the next call until it is None.

api = WorkspaceApi(client)
cursor = None
while True:
    page = api.spaces_list(x_team_id=team_id, limit=50, cursor=cursor)
    for space in page.data.items:
        pass  # process space ...
    cursor = page.data.next_cursor
    if cursor is None:
        break

Error handling

On a non-2xx response the client raises ApiException (with per-status subclasses). Inspect error.status and parse the standard { "ok": false, "error": ..., "code": ... } envelope from error.body:

import json
from invinite_api.exceptions import ApiException

try:
    WorkspaceApi(client).spaces_list(x_team_id=team_id)
except ApiException as error:
    body = json.loads(error.body)  # { "ok": false, "error": ..., "code": ... }
    print(error.status, body["code"], body["error"])

Regeneration

This client is a generated artifact. If an endpoint's types look wrong, the fix belongs in the endpoint registry rather than in hand-written client code — regenerating re-derives every model from the schema. Releases are published on sdk-v* tags.

Links

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

invinite_api-0.4.0.tar.gz (286.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

invinite_api-0.4.0-py3-none-any.whl (819.5 kB view details)

Uploaded Python 3

File details

Details for the file invinite_api-0.4.0.tar.gz.

File metadata

  • Download URL: invinite_api-0.4.0.tar.gz
  • Upload date:
  • Size: 286.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for invinite_api-0.4.0.tar.gz
Algorithm Hash digest
SHA256 17f097eac6da2c05cb52c5b65f33adb68ccd41686341932827ba20497498bc8c
MD5 5611be42973f9eb2a2cf420f5c607f64
BLAKE2b-256 efb3e5f3ba7e3df40fb1e9e2d38f20d0c27e0cc0244d7035c56241403b5b0933

See more details on using hashes here.

Provenance

The following attestation bundles were made for invinite_api-0.4.0.tar.gz:

Publisher: publish-sdk.yml on outraday-org/invinite

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file invinite_api-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: invinite_api-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 819.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for invinite_api-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fd56bc17f03e808725ad11904bf889dedf8932a518d8a52f08f083e39c348a07
MD5 f139b2767bd2ae19884111ed1ea03bac
BLAKE2b-256 c77586343c47900d2446447cc397a98f6ed6732ccfed49c51ea597cd289e75b5

See more details on using hashes here.

Provenance

The following attestation bundles were made for invinite_api-0.4.0-py3-none-any.whl:

Publisher: publish-sdk.yml on outraday-org/invinite

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page