MyNixOS website logo
Description

Interface to the 'Request Tracker' API.

Provides a programmatic interface to the 'Request Tracker' (RT) HTTP API <https://rt-wiki.bestpractical.com/wiki/REST>. 'RT' is a popular ticket tracking system.

Project Status: Active – The project has reached a stable, usable state and is being actively developed. CI Tests cran version

rt

An interface to the RequestTracker API.

Installation

install.packages("rt")

Usage

Setup

To start using the rt package, log in to your RT instance by setting the server URL in using Sys.setenv and use rt_login() to log in and store your session locally.

Below, we log into Best Practical's demo installation of RT:

library(rt)

Sys.setenv("RT_BASE_URL" = "https://demo.bestpractical.com")
rt_login() # Enter demo/demo

Once you are successfully logged in, you're all set to use the package. The rt package supports all of the RequestTracker REST API:

  • General
    • Login: rt_login()
    • Logout: rt_logout()
  • Tickets
    • Ticket Properties: rt_ticket_properties()
    • Ticket Links: rt_ticket_links()
    • Ticket Attachments: rt_ticket_attachments()
    • Ticket Attachment: rt_ticket_attachment()
    • Ticket Attachment Content: rt_ticket_attachment_content()
    • Ticket History: rt_ticket_history()
    • Ticket History Entry: rt_ticket_history_entry()
    • Ticket Search: rt_ticket_search()
    • Ticket Create: rt_ticket_create()
    • Ticket Edit: rt_ticket_edit()
    • Tickets History Reply: rt_ticket_history_reply()
    • Ticket History Comment: rt_ticket_history_comment()
    • Ticket Links Edit: rt_ticket_links_edit()
  • Users
    • User Properties: rt_user_properties()
    • User Create: rt_user_create()
    • User Edit: rt_user_edit()
  • Queues
    • Queue Properties: rt_queue_properties()

Note: Most of these functions support being chained together (for example, with the %>%).

See the included vignettes for more information about usage.

Logging out

To log out, use the rt_logout function (or restart your R session):

rt_logout()

Development & Testing

A test suite is provided that is comprised mostly of integration tests that are configured to run against a local installation of RT. By default, running devtools::test() will only run a small subset of the full test suite: those that do not depend on being able to call out to an RT installation (i.e., unit tests).

To run the full test suite locally,

  1. Start a local RT installation with Docker:

    docker run -d --name rt -p 80:80 netsandbox/request-tracker
    
  2. Turn on integration tests for your session

    Sys.setenv("RT_INTEGRATION" = TRUE)
    
  3. Run devtools::test() from the same session as (2)

rt_api objects

All API calls go through an intermediate state as an rt_api object, which is made up of three parts:

  1. the content, generally returned as a tibble/data frame
  2. the path or URL that was accessed
  3. the HTTP response from the API.

This is mainly to help normalize out some of the inconsistencies in the RT API itself and make implementing the API call wrappers easier.

Support / Issues / Feedback

Let us know about any issues or bugs.

Acknowledgements

Support was provided by the National Center for Ecological Analysis and Synthesis, a Center funded by the University of California, Santa Barbara, and the State of California.

nceas_footer

Metadata

Version

1.1.0

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows