Python module for Request Tracker's new REST version 2 API
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
dist
rtapi2.egg-info
rtapi2
.gitignore
LICENSE.txt
MANIFEST
README.md
setup.cfg
setup.py

README.md

RT Python Module

Installation

pip install rtapi2

Information

General Notes:

Requirements

  • python2.7
  • requests

Methods

Available Methods:

  • getHelp()
  • getInfo()
  • searchTickets(ticketProperties)
  • createTicket(ticketProperties)
  • getTicketProperties(ticketID)
  • updateTicket(ticketProperties, ticketID)
  • deleteTicket(ticketID)
  • correspondTicket(ticketProperties, ticketID)
  • commentTicket(ticketProperties, ticketID)
  • getTicketHistory(ticketID)
  • getQueueHistory(queueIDOrName)
  • getAssetHistory(assetID)
  • getUserHistory(userIDOrName)
  • getGroupHistory(groupID)
  • searchTransactions(transactionProperties)
  • getTransaction(transactionID)
  • getTransactionAttachments(transactionID)
  • searchAttachments(attachmentProperties)
  • getAttachment(attachmentID)
  • getAllQueueInformation()
  • searchQueues(queueProperties)
  • createQueue(queueProperties)
  • getQueue(queueIDOrName)
  • updateQueue(queueProperties, queueIDOrName)
  • deleteQueue(queueIDOrName)
  • searchAssets(assetProperties)
  • createAsset(assetProperties)
  • getAsset(assetID)
  • updateAsset(assetProperties, assetID)
  • deleteAsset(assetID)
  • getAllCatalogInformation()
  • searchCatalogs(catalogProperties)
  • createCatalog(catalogProperties)
  • getCatalog(catalogIDOrName)
  • updateCatalog(catalogProperties, catalogIDOrName)
  • deleteCatalog(catalogIDOrName)
  • searchUsers(userProperties)
  • createUser(userProperties)
  • getUser(userIDOrName)
  • updateUser(userProperties, userIDOrName)
  • deleteUser(userIDOrName)
  • searchGroups(groupProperties)
  • getGroup(groupID)
  • searchCustomFields(customFieldProperties)
  • getCustomField(customFieldID)
  • searchCustomRoles(customRoleProperties)
  • getCustomRole(customRoleID)

Usage

from rtapi2 import rt

#Supports basic auth
#connector = rt.Connector(host="localhost:8080", username="user", password="password", ssl=False)

#Supports new tokens!
connector = rt.Connector(host="localhost:8080", token="1234567", ssl=False)

properties = {"id": "ticket/new", "Queue": "General", "Requestor": "user@email.com", "Priority": "4", "Subject": "Test REST Module", "Text": "test"}

response = connector.createTicket(properties)
print response