tickets: View a list of Tickets

Description Usage Arguments Details Value Examples

Description

tickets queries the Freshdesk API and returns a data frame of ticke data.

Usage

1
2
3
4
5
6
tickets(client, tickets_path = "/api/v2/tickets",
  remove_fields = c("description", "description_text"),
  include_requester = FALSE, include_stats = FALSE,
  include_custom_fields = FALSE, updated_since = NULL, max_records = Inf,
  priorities_lookup = ticket_priorities, sources_lookup = ticket_sources,
  status_lookup = ticket_status, date_fields = ticket_date_fields)

Arguments

client

The Freshdesk API client object (see freshdesk_client).

tickets_path

The path of the tickets API. Defaults to /api/v2/tickets. You should not need to change the default value.

remove_fields

Fields returned by the Freshdesk API to remove from the data frame. Defaults to removing the description and description_text fields which could be quite verbose.

include_requester

If TRUE returns additional attributes of the requester.

include_stats

If TRUE returns additional attributes of the status.

include_custom_fields

If TRUE customer fields will be included in the results.

updated_since

Specifies tickets to include in results based on last time they were updated. If set to NULL, only tickets updated in the last 30 days are returned. The value can be a Date object or a character string in the format YYYY-MM-DD.

max_records

Specifies the maximum number of records to return.

priorities_lookup

Optional dataframe of ticket priorities and associated values. Defaults to ticket_priorities which is defined in the package.

sources_lookup

Optional dataframe of ticket sources and associated values. Defaults to ticket_sources which is defined in the package.

status_lookup

Optional dataframe of ticket status and associated values. Defaults to ticket_status which is defined in the package.

date_fields

Fields returned by the Freshdesk API that are date fields. Defaults to ticket_date_fields which is defined in the package.

Details

This function queries the Freshdesk API to view the details regarding multiple tickets.

Value

A data frame of tickets or NULL if there are no tickets.

Examples

1
2
3
4
5
6
7
## Not run: 
fc <- freshdesk_client("your-domain", "your-api-key")

# view tickets
t <- tickets(fc)

## End(Not run)

jjanuszczak/freshdeskr documentation built on May 29, 2019, 11:05 p.m.