Skip to content

PowerShell module for interacting with the SherpaDesk API

License

Notifications You must be signed in to change notification settings

HowellIT/PSSherpaDesk

Repository files navigation

Build Status

PSSherpaDesk

This module is designed to work with SherpaDesk's API (https://sherpadesk.com)

Their API docs:

This is not endorsed by Sherpa Desk, I've developed it because I use the product and prefer to automate what I can.

This module mostly just retrieves some of the data so far, but more is being added as needed.

This doc is just a standin until I update all the help for each cmdlet.

PRs welcome! Check the CONTRIBUTING.md for more info.

How to set up

This module is now available in the PowerShell Gallery:

Install-Module PSSherpaDesk

Download or clone this repo and:

Import-Module $ModulePath\build\PSSherpaDesk

To be able to use this module, you must already have a Sherpa Desk account.

How to authenticate

Using the email address for your account:

Get-SDAPIKey -Email '[email protected]'

This will prompt you for your password and store the API key in a module-scoped AuthConfig variable for the other cmdlets to reference.

There is an optional -PassThru parameter if you wish it to be returned as a string.

Sherpa Desk requires an Organization and Instance to be sent with each request, these can be retrieved with:

Get-SDMetadata

This will also add these to the module-scoped AuthConfig variable for the other cmdlets to access. It currently sets the first Organization and the first Instance as the working reference points.

Once you have run both Get-SDAPIKey and Get-SDMetadata all cmdlets will not require authentication.

How to query

To retrieve all data:

Get-SDTicket

To get a single object:

Get-SDTicket -Key <ticket key or ID>

How to set data

To set one property (where supported):

Set-SDTicket -Key <ticket key or ID> -Status 'Closed'

To set multiple properties:

$body = @{
    status = 'waiting'
    note_text = 'This is the note text'
}
Set-SDTicket -key <ticket key or ID> -Body $body

How to create data

To create a new user:

New-SDUser -FirstName 'Anthony' -LastName 'Howell' -Email '[email protected]'

About

PowerShell module for interacting with the SherpaDesk API

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published