rtapi2

Wrapper for RT REST API Version 2


Keywords
request
License
MIT
Install
pip install rtapi2==0.1

Documentation

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

import rtapi2

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

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

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

response = connector.createTicket(properties)
print response