This PowerShell module presents a range of functions that work with the Fresh Service APIs to manage ticket, requesters, agents, etc. within the Fresh Service platform. Details about the Fresh Servcie API can be found at https://api.freshservice.com.
After copying the module, you need to configure the API details before you can use this module.Copy (or rename) the config-template.json to config.json. Edit the config.json file, with the following settings:
- BaseURLs: these should be the hostnames used to access your APIs, and is usually the tenant name followed by ".freshservice.com." Do not use any alias for this - it must be the ".freshservice.com" address..
- APIKeys: details on how to find your API key can be found on the Fresh Service support site: Where do I find my API key? Note that the API will only grant the same access levels and permissions as the account it was obtained from.
- DefaultEnvironment: This is the default system used when functions are called without specifying the -System parameter. If you do not have a sandbox environment, this should be 'Live'.
Currently (August 2022), the functions available cover most aspects of ticket and requester management. The functionality does not currently include the ability to query with dates (e.g. list all tickets due before 12pm tomorrow), but that will be added a future date.
To make the modules more manageable, the functions have been broken down into nested modules. The modules are:
- FreshAPIv2.psm1 - this contains the functions that make the calls to the APIs, as well as other shared functions to support functions in other modules.
- FreshAPI.Requesters.psm1 - this contains functions relating to Requester, Agent, Requester Group and Agent Group.
- FreshAPI.Tickets.psm1 - this contains functions relating to tickets.
- FreshAPI.ServiceCatalog.psm1 - this contains functions relating to the Service Catalog and its categories.
- FreshAPI.Locations.psm1 - this contains functions relating to Locations in Fresh.
- FreshAPI.Departments.psm1 - this contains functions relating to departments in Fresh
- FreshAPI.Assets.psm1 - this contains functions relating to Assets and Asset Types.
- FreshAPI.CustomObjects.psm1 - this contains functions relating to Fresh custom objects and their records
Further supporting modules will be added in due time to cover off the other API areas, as per Fresh's API documentation
Here is a list of the functions available for use. Other functions are exported, but these are supporting functions - the ones below are those intended for use:
- New-FreshAgent
- Get-FreshAgent
- Update-FreshAgent
- Remove-FreshAgent
- Restore-FreshAgent
- ConvertTo-FreshRequester
- Get-FreshAgentField
- New-FreshAgentGroup
- Get-FreshAgentGroup
- Update-FreshAgentGroup
- Remove-FreshAgentGroup
- Get-FreshAgentRole
- New-FreshDepartment
- Get-FreshDepartment
- Update-FreshDepartment
- Remove-FreshDepartment
- Get-FreshDepartmentFields
- New-FreshLocation
- Get-FreshLocation
- Update-FreshLocation
- Remove-FreshLocation
- New-FreshRequester
- Get-FreshRequester
- Update-FreshRequester
- Merge-FreshRequester
- Remove-FreshRequester
- Restore-FreshRequester
- ConvertTo-FreshAgent
- New-FreshRequesterGroup
- Get-FreshRequesterGroup
- Update-FreshRequesterGroup
- Remove-FreshRequesterGroup
- Get-FreshRequesterGroupMember
- Add-FreshRequesterGroupMember
- Remove-FreshRequesterGroupMember
- Get-FreshServiceCatalogItem
- Search-FreshServiceCatalogItem
- Get-FreshServiceCategory
- New-FreshTicket
- New-FreshChildTicket
- Get-FreshTicket
- Update-FreshTicket
- Remove-FreshTicket
- Restore-FreshTicket
- Get-FreshTicketActivity
- Remove-FreshTicketAttachment
- Get-FreshTicketField
- Get-FreshTicketCSATResponse
- New-FreshServiceRequest
- Get-FreshRequestedItem
- Update-FreshRequestedItem
- New-FreshTicketNote
- New-FreshTicketReply
- Get-FreshTicketConversation
- Update-FreshTicketNote
- Remove-FreshTicketConversation
- Remove-FreshTicketConversationAttachment
- New-FreshTicketTask
- Get-FreshTicketTask
- Update-FreshTicketTask
- Remove-FreshTicketTask
- New-FreshTicketTimeEntry
- Get-FreshTicketTimeEntry
- Update-FreshTicketTimeEntry
- Remove-FreshTicketTimeEntry
- Get-FreshAsset
- Get-FreshAssetType
- Get-FreshCustomObject
- New-FreshCustomObjectRecord
- Get-FreshCustomObjectRecord
- Update-FreshCustomObjectRecord
- Remove-FreshCustomObjectRecord