Skip to main content

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

ChangeLog.md

Contributing

Contributing.md

Usage

Basic Usage

    from xurrent.core import XurrentApiHelper

    apitoken = "********"

    baseUrl = "https://api.4me.qa/v1"
    account = "account-name"

    x_api_helper = XurrentApiHelper(baseUrl, apitoken, account)

    # change log level (default: INFO)
    x_api_helper.set_log_level("DEBUG")

    # Plain API Call
    uri = "/requests?subject=Example Subject"
    connection_object.api_call(uri, 'GET')

    # Convert node ID
    helper.decode_api_id('ZmFiaWFuc3RlaW5lci4yNDEyMTAxMDE0MTJANG1lLWRlbW8uY29tL1JlcS83MDU3NTU') # fabiansteiner.241210101412@4me-demo.com/Req/705755
    # this can be used to derive the ID from the nodeID

People

    from xurrent.people import Person

    people = Person.get_by_id(x_api_helper, <id>)

    api_user = Person.get_me(x_api_helper)

    # get all people with a specific subject
    people = Person.get_people(x_api_helper,queryfilter={
    "name": "Werner"
    })

    # enable
    people.enable()

    #disable
    people.disable()
    #archive
    people.archive()
    #trash
    people.trash()
    #restore
    people.restore()

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
    })

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()

Teams

    from xurrent.teams import Team

    team = Team.get_by_id(x_api_helper, <id>)

    # get all teams with a specific subject
    teams = Team.get_team(x_api_helper,predifinedFilter="enabled")

    # enable
    team.enable()

    #disable
    team.disable()
    #archive
    team.archive()
    #trash
    team.trash()
    #restore
    team.restore()

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")

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

xurrent-0.0.2.11.tar.gz (24.6 kB view details)

Uploaded Source

Built Distribution

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

xurrent-0.0.2.11-py3-none-any.whl (28.6 kB view details)

Uploaded Python 3

File details

Details for the file xurrent-0.0.2.11.tar.gz.

File metadata

  • Download URL: xurrent-0.0.2.11.tar.gz
  • Upload date:
  • Size: 24.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for xurrent-0.0.2.11.tar.gz
Algorithm Hash digest
SHA256 413784fc0fe0f937f089180f2f1b98981e1364bf026253dca7cf901561db09c1
MD5 68522f5914b0cc6783751dd58f024d8d
BLAKE2b-256 a4718e638fee88f8b4779c10231e2c2af15da043921e067a867f03ac31820964

See more details on using hashes here.

Provenance

The following attestation bundles were made for xurrent-0.0.2.11.tar.gz:

Publisher: python-publish.yml on fasteiner/xurrent-python

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

File details

Details for the file xurrent-0.0.2.11-py3-none-any.whl.

File metadata

  • Download URL: xurrent-0.0.2.11-py3-none-any.whl
  • Upload date:
  • Size: 28.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for xurrent-0.0.2.11-py3-none-any.whl
Algorithm Hash digest
SHA256 71142f8e8c2fbe36deeb8e921e94fa7dcf7e7ce446abfa751bd2f9c5c9db6454
MD5 fa3c89e078d41d7f49407d4918d487a8
BLAKE2b-256 37be03b6abf2374de0cc456020a52904ef6ced89ae928b0657673db4a520501d

See more details on using hashes here.

Provenance

The following attestation bundles were made for xurrent-0.0.2.11-py3-none-any.whl:

Publisher: python-publish.yml on fasteiner/xurrent-python

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