QAD | Redzone - Process Intellitence API Client
A Client to interact with Process Intelligence API easily
Explore the API docs
Table of Contents
Getting Started
Prerequisites
In order to login the client you will have to authenticate yourself via your API KEY. If you don't have/lost your api key please contact our tech team at api@livejourney.com in order to generate a new one.
Installation
Install and update using pip:
pip install -U lj-api-client
Usage
The client allows you to build request in a more convinient way thus speed up your integration with the live journey app.
# Init client
from lj_api_client import Client
api_key = '{YOUR API KEY HERE}'
client = Client(api_key)
# Get current user
res = client.users.fetch_list()
# List workspaces
res = client.workspaces.fetch_list()
# Get specific worksapce
workspace_id = '{WORKSPACE_ID}'
res = client.workspaces.fetch_item(workspace_id)
# List workspace cards
workspace_id = '{WORKSPACE_ID}'
res = client.workspaces.cards(workspace_id).fetch_list()
# Get specific card
workspace_id, card_id = '{WORKSPACE_ID}', '{CARD_ID}'
res = client.workspaces.cards(workspace_id).fetch_item(card_id)
# Create new card
workspace_id = '{WORKSPACE_ID}'
# Card data see our API Docs for in depth specification
card_data = {
'name': 'my-new-card',
'unit_name': 'Unit',
'permission': 'public',
'key_mapping': {
'unit_key': '{YOUR UNIT KEY}',
'date_format': '{YOUR DATE FORMAT}',
'event_keys':[
'{YOUR EVENT KEY}',
],
'date_keys':[
'{YOUR DATE KEY}',
],
}
}
res = client.workspaces.cards(workspace_id).create_item(card_data)
# Update card
workspace_id, card_id = '{WORKSPACE_ID}', '{CARD_ID}'
card_new_data = {
'name': 'new-name'
}
res = client.workspaces.cards(workspace_id).update_item(
card_id,
card_new_data
)
# Delete card
workspace_id, card_id = '{WORKSPACE_ID}', '{CARD_ID}'
res = client.workspaces.cards(workspace_id).delete(card_id)
# Get card presigned url
workspace_id, card_id = '{WORKSPACE_ID}', '{CARD_ID}'
params = {'data_type': 'log'}
res = client.workspaces.cards(workspace_id).presigned_url(card_id).fetch_list(params=params)
# Feed card
workspace_id, card_id = '{WORKSPACE_ID}', '{CARD_ID}'
res = client.workspaces.cards(workspace_id).feed(card_id).create_item({})
# Revert Feed card
workspace_id, card_id = '{WORKSPACE_ID}', '{CARD_ID}'
res = client.workspaces.cards(workspace_id).revert_feed(card_id).create_item({'targeted_upsert_number':1, 'hard':True})
The client also validate the requests via its higher level API
res = client.get_user()
res = client.get_workspaces()
workspace_id = '{WORKSPACE_ID}'
res = client.get_workspace(workspace_id)
workspace_id = '{WORKSPACE_ID}'
res = client.get_cards(workspace_id)
workspace_id, card_id = '{WORKSPACE_ID}', '{CARD_ID}'
res = client.get_card(workspace_id, card_id)
workspace_id = '{WORKSPACE_ID}'
card_data = {
'name': 'my-new-card3',
'unit_name': 'Unit',
'permission': 'public',
'key_mapping': {
'unit_key': '{YOUR UNIT KEY}',
'date_format': '{YOUR DATE FORMAT}',
'event_keys':[
'{YOUR EVENT KEY}',
],
'date_keys':[
'{YOUR DATE KEY}',
],
}
}
res = client.create_card(workspace_id, card_data)
workspace_id, card_id = '{WORKSPACE_ID}', '{CARD_ID}'
res = client.update_card(workspace_id, card_id, card_new_data)
workspace_id, card_id = '{WORKSPACE_ID}', '{CARD_ID}'
res = client.delete_card(workspace_id, card_id)
workspace_id, card_id = '{WORKSPACE_ID}', '{CARD_ID}'
log_file_path, desc_file_path = '{LOG DATA FILE PATH}', '{DESC DATA FILE PATH}'
res = client.upload_data_to_card(
workspace_id,
card_id,
log_file_path,
desc_file_path=desc_file_path
)
workspace_id, card_id = '{WORKSPACE_ID}', '{CARD_ID}'
res = client.revert_feed(
workspace_id,
card_id,
targeted_upsert_number = 1,
hard = True
)
For more examples, please refer to the examples directory
CLI
You can also interact with the API directly from the terminal using our CLI. See the interactive doc ljcli --help for more infos.
Contact
Metadata
Release files for lj-api-client 0.2.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| lj_api_client-0.2.7.tar.gz | 8.2 kB | Without provenance | Details for lj_api_client-0.2.7.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| lj_api_client-0.2.7-py3-none-any.whl | Python 3 | none | any | Details for lj_api_client-0.2.7-py3-none-any.whl |
Total release size: 18.7 kB
Release files / lj_api_client-0.2.7.tar.gz
| Download URL | lj_api_client-0.2.7.tar.gz |
|---|---|
| Size | 8.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
85eebbfff7958630f7d16112fd94b6c5ece71197fc9a681aea74224d4e2108b7
|
|
BLAKE2b-256 checksum How to use checksums |
a950e27624c6eb76c914ed177aef01ab6f4d9123b3551983b30d3b8dc80046a9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.5.1 CPython/3.11.17 Linux/7.0.0-1017-azure
|
Release files / lj_api_client-0.2.7-py3-none-any.whl
| Download URL | lj_api_client-0.2.7-py3-none-any.whl |
|---|---|
| Size | 10.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e099559c26946d3323480c1f14d17628b23c9d882b2e2efa12a2661fb8994cb2
|
|
BLAKE2b-256 checksum How to use checksums |
51c4d43fc5a332a3d7505821267beda5dcbf6e20823cc27d7293ce88f067c612
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.5.1 CPython/3.11.17 Linux/7.0.0-1017-azure
|
Security for lj-api-client 0.2.7
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.