Skip to content

FreshserviceClient

Attributes

ListUsersResponse module-attribute

ListUsersResponse = List[Dict[str, Any]]

TRIGGER_OPERATIONS module-attribute

TRIGGER_OPERATIONS: Dict[str, Dict[str, Any]] = {'OnTicketCreatedV2': {'operation_id': 'OnTicketCreatedV2', 'path': '/{connectionId}/trigger/api/v2/tickets', 'method': 'get', 'required_parameters': [], 'callback_payload_type': 'ListTicketResponse'}}

Classes

AddNoteResponse dataclass

AddNoteResponse(conversation: Optional[Dict[str, Any]] = None)

Response for Add a note to a ticket

CreateUpdateTicketResponse dataclass

CreateUpdateTicketResponse(ticket: Optional[Dict[str, Any]] = None)

Response for Create a ticket

ListTicketResponse dataclass

ListTicketResponse(created_at: Optional[str] = None, department_id: Optional[int] = None, due_by: Optional[str] = None, group_id: Optional[int] = None, id: Optional[int] = None, is_escalated: Optional[bool] = None, priority: Optional[int] = None, requester_id: Optional[int] = None, responder_id: Optional[int] = None, source: Optional[int] = None, spam: Optional[bool] = None, status: Optional[int] = None, subject: Optional[str] = None, type_: Optional[str] = None, updated_at: Optional[str] = None, description_text: Optional[str] = None, description: Optional[str] = None, to_emails: Optional[List[str]] = None)

Response for When a ticket is created

Attributes

created_at class-attribute instance-attribute
created_at: Optional[str] = None

yyyy-MM-ddTHH:mm:ss.fffZ

due_by class-attribute instance-attribute
due_by: Optional[str] = None

yyyy-MM-ddTHH:mm:ss.fffZ

group_id class-attribute instance-attribute
group_id: Optional[int] = None

Id of Group to which the ticket is assigned.

id class-attribute instance-attribute
id: Optional[int] = None

Unique Id of the ticket.

is_escalated class-attribute instance-attribute
is_escalated: Optional[bool] = None

Set to true if an escalation was sent.

priority class-attribute instance-attribute
priority: Optional[int] = None

A number representing the priority of the ticket.

requester_id class-attribute instance-attribute
requester_id: Optional[int] = None

User-id of the requester. For existing contacts, requester_id can be passed instead of email.

responder_id class-attribute instance-attribute
responder_id: Optional[int] = None

Id of the agent to whom the ticket is assigned.

source class-attribute instance-attribute
source: Optional[int] = None

A number representing the channel through which the ticket was created.

spam class-attribute instance-attribute
spam: Optional[bool] = None

Set as true if the ticket is marked as spam.

status class-attribute instance-attribute
status: Optional[int] = None

A number representing the status of the ticket.

subject class-attribute instance-attribute
subject: Optional[str] = None

Ticket subject.

type_ class-attribute instance-attribute
type_: Optional[str] = field(default=None, metadata={'wire_name': 'type'})

Type property field as defined in ticket fields.

updated_at class-attribute instance-attribute
updated_at: Optional[str] = None

yyyy-MM-ddTHH:mm:ss.fffZ

description_text class-attribute instance-attribute
description_text: Optional[str] = None

Description of the problem.

description class-attribute instance-attribute
description: Optional[str] = None

HTML content of the ticket. Description and description_html should not be passed together.

to_emails class-attribute instance-attribute
to_emails: Optional[List[str]] = None

Email addresses to which the incoming ticket email was sent.

CreateTicketRequest dataclass

CreateTicketRequest(requester_id: Optional[int] = None, email: Optional[str] = None, phone: Optional[str] = None, name: Optional[str] = None, subject: Optional[str] = None, status: Optional[str] = None, priority: Optional[str] = None, description: Optional[str] = None, urgency: Optional[str] = None, impact: Optional[str] = None, source: Optional[str] = None)

Definition: CreateTicket_Request

Attributes

requester_id class-attribute instance-attribute
requester_id: Optional[int] = None

User-id of the requester. One of the Requester ID, Requester Email and Requester Phone is required

email class-attribute instance-attribute
email: Optional[str] = None

Email of the requester. One of the Requester ID, Requester Email and Requester Phone is required

phone class-attribute instance-attribute
phone: Optional[str] = None

Phone number of the requester. One of the Requester ID, Requester Email and Requester Phone is required

name class-attribute instance-attribute
name: Optional[str] = None

Name of the requester. This is a required field only if Requester Phone value is provided

subject class-attribute instance-attribute
subject: Optional[str] = None

The subject of the ticket.

status class-attribute instance-attribute
status: Optional[str] = None

Status of the ticket.

priority class-attribute instance-attribute
priority: Optional[str] = None

The priority of the ticket (such as Low, Medium, or High).

description class-attribute instance-attribute
description: Optional[str] = None

The description of the ticket.

urgency class-attribute instance-attribute
urgency: Optional[str] = None

Urgency of the problem (such as Low, Medium or High).

impact class-attribute instance-attribute
impact: Optional[str] = None

Impact of the problem (such as Low, Medium or High).

source class-attribute instance-attribute
source: Optional[str] = None

The channel through which the ticket was created.

UpdateTicketRequest dataclass

UpdateTicketRequest(requester_id: Optional[int] = None, subject: Optional[str] = None, status: Optional[str] = None, priority: Optional[str] = None, urgency: Optional[str] = None, impact: Optional[str] = None, source: Optional[str] = None)

Definition: UpdateTicket_Request

Attributes

requester_id class-attribute instance-attribute
requester_id: Optional[int] = None

User-id of the requester. For existing contacts, requester_id can be passed instead of email.

subject class-attribute instance-attribute
subject: Optional[str] = None

The subject of the ticket.

status class-attribute instance-attribute
status: Optional[str] = None

Status of the ticket.

priority class-attribute instance-attribute
priority: Optional[str] = None

The priority of the ticket (such as Low, Medium, or High).

urgency class-attribute instance-attribute
urgency: Optional[str] = None

Urgency of the problem (such as Low, Medium or High).

impact class-attribute instance-attribute
impact: Optional[str] = None

Impact of the problem (such as Low, Medium or High).

source class-attribute instance-attribute
source: Optional[str] = None

The channel through which the ticket was created.

AddNoteRequest dataclass

AddNoteRequest(body: Optional[str] = None, private: Optional[bool] = None)

Definition: AddNote_Request

Attributes

body class-attribute instance-attribute
body: Optional[str] = None

The note to be added to the ticket.

private class-attribute instance-attribute
private: Optional[bool] = None

Set to true if message is private.

TicketResponse dataclass

TicketResponse(created_at: Optional[str] = None, deleted: Optional[bool] = None, department_id_value: Optional[int] = None, display_id: Optional[int] = None, due_by: Optional[str] = None, group_id: Optional[int] = None, id: Optional[int] = None, impact: Optional[int] = None, isescalated: Optional[bool] = None, owner_id: Optional[str] = None, priority: Optional[int] = None, requester_id: Optional[int] = None, responder_id: Optional[int] = None, source: Optional[int] = None, spam: Optional[bool] = None, status: Optional[int] = None, subject: Optional[str] = None, ticket_type: Optional[str] = None, to_email: Optional[str] = None, updated_at: Optional[str] = None, urgency: Optional[int] = None, description: Optional[str] = None, description_html: Optional[str] = None, status_name: Optional[str] = None, priority_name: Optional[str] = None, source_name: Optional[str] = None, responder_name: Optional[str] = None, to_emails: Optional[List[str]] = None, department_name: Optional[str] = None, assoc_problem_id: Optional[int] = None, assoc_change_id: Optional[int] = None, assoc_change_cause_id: Optional[int] = None, assoc_asset_id: Optional[int] = None, urgency_name: Optional[str] = None, impact_name: Optional[str] = None)

Definition: Ticket_Response

Attributes

created_at class-attribute instance-attribute
created_at: Optional[str] = None

yyyy-MM-ddTHH:mm:ss.fffZ

deleted class-attribute instance-attribute
deleted: Optional[bool] = None

Set as true if the ticket is deleted/trashed. Deleted tickets will not be considered in any views except 'deleted' filter.

display_id class-attribute instance-attribute
display_id: Optional[int] = None

Ticket Id specific to your account.

due_by class-attribute instance-attribute
due_by: Optional[str] = None

yyyy-MM-ddTHH:mm:ss.fffZ

group_id class-attribute instance-attribute
group_id: Optional[int] = None

Id of Group to which the ticket is assigned.

id class-attribute instance-attribute
id: Optional[int] = None

Unique Id of the ticket.

impact class-attribute instance-attribute
impact: Optional[int] = None

A number representing the impact of the problem.

isescalated class-attribute instance-attribute
isescalated: Optional[bool] = None

Set to true if an escalation was sent.

owner_id class-attribute instance-attribute
owner_id: Optional[str] = None

Id of the agent to whom the problem is assigned.

priority class-attribute instance-attribute
priority: Optional[int] = None

A number representing the priority of the ticket.

requester_id class-attribute instance-attribute
requester_id: Optional[int] = None

User-id of the requester. For existing contacts, requester_id can be passed instead of email.

responder_id class-attribute instance-attribute
responder_id: Optional[int] = None

Id of the agent to whom the ticket is assigned.

source class-attribute instance-attribute
source: Optional[int] = None

A number representing the channel through which the ticket was created.

spam class-attribute instance-attribute
spam: Optional[bool] = None

Set as true if the ticket is marked as spam.

status class-attribute instance-attribute
status: Optional[int] = None

A number representing the status of the ticket.

subject class-attribute instance-attribute
subject: Optional[str] = None

Ticket subject.

ticket_type class-attribute instance-attribute
ticket_type: Optional[str] = None

Type property field as defined in ticket fields.

to_email class-attribute instance-attribute
to_email: Optional[str] = None

Email address to which the incoming ticket email was sent.

updated_at class-attribute instance-attribute
updated_at: Optional[str] = None

yyyy-MM-ddTHH:mm:ss.fffZ

urgency class-attribute instance-attribute
urgency: Optional[int] = None

A number representing the urgency of the problem.

description class-attribute instance-attribute
description: Optional[str] = None

Description of the problem.

description_html class-attribute instance-attribute
description_html: Optional[str] = None

HTML content of the ticket. Description and description_html should not be passed together.

status_name class-attribute instance-attribute
status_name: Optional[str] = None

Status of the ticket.

priority_name class-attribute instance-attribute
priority_name: Optional[str] = None

Priority of the ticket.

source_name class-attribute instance-attribute
source_name: Optional[str] = None

The channel through which the ticket was created.

responder_name class-attribute instance-attribute
responder_name: Optional[str] = None

Name of the agent to whom the ticket is assigned.

to_emails class-attribute instance-attribute
to_emails: Optional[List[str]] = None

Email addresses to which the incoming ticket email was sent.

department_name class-attribute instance-attribute
department_name: Optional[str] = None

Name of the department.

assoc_problem_id class-attribute instance-attribute
assoc_problem_id: Optional[int] = None

Id of the associated problem to the ticket.

assoc_change_id class-attribute instance-attribute
assoc_change_id: Optional[int] = None

Id of the associated change to the problem.

assoc_change_cause_id class-attribute instance-attribute
assoc_change_cause_id: Optional[int] = None

Id of the change causing the ticket.

assoc_asset_id class-attribute instance-attribute
assoc_asset_id: Optional[int] = None

Id of the asset associated to the ticket.

urgency_name class-attribute instance-attribute
urgency_name: Optional[str] = None

Urgency of the problem.

impact_name class-attribute instance-attribute
impact_name: Optional[str] = None

Impact of the problem.

UpdateTicketResponse dataclass

UpdateTicketResponse(ticket: Optional[Dict[str, Any]] = None)

Definition: UpdateTicket_Response

FreshserviceClient

FreshserviceClient(connection_runtime_url: str, token_provider: Optional[TokenProvider] = None, options: Optional[ConnectorClientOptions] = None)

Bases: ConnectorClientBase

Typed client for freshservice connector.

Initialize a FreshserviceClient.

Parameters:

Name Type Description Default
connection_runtime_url str

The connection runtime URL from Azure Portal.

required
token_provider Optional[TokenProvider]

Optional token provider. Defaults to ManagedIdentityTokenProvider.

None
options Optional[ConnectorClientOptions]

Optional connector client options.

None

Methods:

add_note_async async
add_note_async(input: AddNoteRequest, ticket_id: int) -> dict[str, Any] | None

Add a note to a ticket

Add a private or public note to a ticket.

create_ticket_async async
create_ticket_async(input: CreateTicketRequest) -> dict[str, Any] | None

Create a ticket

Create a ticket.

update_ticket_async async
update_ticket_async(input: UpdateTicketRequest, ticket_id: int) -> dict[str, Any] | None

Update a ticket

Update a ticket (only specified values will be updated).