Skip to content
PowerShell module for interacting with the SherpaDesk API
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github Adding the contributing and issue templates Feb 4, 2019
build/PSSherpaDesk
docs
src
tests Updating module to support testing AuthConfig in pipeline Mar 1, 2019
.gitattributes Initial commit Jan 14, 2019
LICENSE
Module.PSDeploy.ps1 Now deploys with PSDeploy Feb 6, 2019
PSSherpaDesk.build.ps1 ok, incrementing build May 7, 2019
README.md switched status badge to new pipeline May 7, 2019
ScriptAnalyzerSettings.psd1
build.ps1
build.psake.ps1 Scaffold Jan 14, 2019
build.settings.ps1 Scaffold Jan 14, 2019
psake.ps1

README.md

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@domain.com'

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 'anthony@howell-it.com'
You can’t perform that action at this time.