A python module to interact with the Xurrent API.
Project description
Xurrent Module
This module is used to interact with the Xurrent API. It provides a set of classes to interact with the API.
Change Log
Usage
Basic Usage
from xurrent.core import XurrentApiHelper
apitoken = "********"
baseUrl = "https://api.4me.qa/v1"
account = "account-name"
logger = setup_logger(verbose=True)
x_api_helper = XurrentApiHelper(baseUrl, apitoken, account)
# Plain API Call
uri = "/requests?subject=Example Subject"
connection_object.api_call(uri, 'GET')
Requests
from xurrent.requests import Request
request = Request.get_by_id(x_api_helper, <id>)
# get all requests with a specific subject
requests = Request.get_request(x_api_helper,queryfilter={
"subject": "Example Subject"
})
# close
request.close("closed")
# archive
request.archive()
#trash
request.trash()
#restore
request.restore()
Request Notes
from xurrent.requests import Request
request = Request.get_by_id(x_api_helper, <id>)
request_note = request.get_by_id(x_api_helper, <id>)
# get all request notes with a specific subject
request_notes = request.get_notes(x_api_helper, predefinedFilter="public")
request.add_note("This is a test note")
request.add_note({
"text": "This is a test note",
"internal": True
})
Workflows
from xurrent.workflows import Workflow
workflow = Workflow.get_by_id(x_api_helper, <id>)
#close
workflow.close() # completion reason: completed, note: closed
# close with completion reason
workflow.close(completion_reason="withdrawn")
#close with completion reason and note
workflow.close(completion_reason="withdrawn", note="This is a test note")
Tasks
from xurrent.tasks import Task
task = Task.get_by_id(x_api_helper, <id>)
# get all tasks with a specific subject
tasks = Task.get_task(x_api_helper,queryfilter={
"subject": "Example Subject"
})
# get workflow of task (use expand: True to get the full workflow object)
workflow = task.get_workflow(expand=True)
# or statically
workflow = Task.get_workflow_by_template_id(x_api_helper, <id>, expand=True)
# close
task.close()
#cancel
task.cancel() # only possible before the task is started
#reject
task.reject()
#approve
task.approve()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file xurrent-0.0.2.6.tar.gz.
File metadata
- Download URL: xurrent-0.0.2.6.tar.gz
- Upload date:
- Size: 22.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
41740be5c2a518078c32c9d545f6aa89a38d7b8f84135d54cf2d99edb9a82df9
|
|
| MD5 |
1b8314a69042155395eb687bf4be131f
|
|
| BLAKE2b-256 |
e644751c824f3314b05fe9748bd313d768449076ad4f007d00ed39673b2aa41f
|
Provenance
The following attestation bundles were made for xurrent-0.0.2.6.tar.gz:
Publisher:
python-publish.yml on fasteiner/xurrent-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
xurrent-0.0.2.6.tar.gz -
Subject digest:
41740be5c2a518078c32c9d545f6aa89a38d7b8f84135d54cf2d99edb9a82df9 - Sigstore transparency entry: 154422308
- Sigstore integration time:
-
Permalink:
fasteiner/xurrent-python@94cd58d15a0743d37aca630098f8925f58d85b8d -
Branch / Tag:
refs/tags/v0.0.2.6 - Owner: https://github.com/fasteiner
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@94cd58d15a0743d37aca630098f8925f58d85b8d -
Trigger Event:
release
-
Statement type:
File details
Details for the file xurrent-0.0.2.6-py3-none-any.whl.
File metadata
- Download URL: xurrent-0.0.2.6-py3-none-any.whl
- Upload date:
- Size: 25.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0b2909c505f6e610c4628ab51671672eeb750fc0f812dd78b0b60c88c76c2f23
|
|
| MD5 |
eee6ab238935e2a322557e2cc9ee4057
|
|
| BLAKE2b-256 |
5a89816c017926ab8e38831786469525409d396bc30df0230afcd45b83bf27d0
|
Provenance
The following attestation bundles were made for xurrent-0.0.2.6-py3-none-any.whl:
Publisher:
python-publish.yml on fasteiner/xurrent-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
xurrent-0.0.2.6-py3-none-any.whl -
Subject digest:
0b2909c505f6e610c4628ab51671672eeb750fc0f812dd78b0b60c88c76c2f23 - Sigstore transparency entry: 154422309
- Sigstore integration time:
-
Permalink:
fasteiner/xurrent-python@94cd58d15a0743d37aca630098f8925f58d85b8d -
Branch / Tag:
refs/tags/v0.0.2.6 - Owner: https://github.com/fasteiner
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@94cd58d15a0743d37aca630098f8925f58d85b8d -
Trigger Event:
release
-
Statement type: