robert-smith / powershell-cachet Goto Github PK
View Code? Open in Web Editor NEWA PowerShell module for making calls to the Cachet API
A PowerShell module for making calls to the Cachet API
Found your module and i really like it. I've been having some issues with it though. My commands fail due to the reason below. I'm not sure why? it looks like your code is correct and is written properly?
Rather than re-write and make my own, im trying to make yours work. but I'm not grasping why its failing on that, when you have the URLs set to generate correctly
Invoke-RestMethod : The remote name could not be resolved: 'status.domain.orgapi'
At C:\Program Files\WindowsPowerShell\Modules\Cachet\Private\Invoke-CachetRequest.ps1:64 char:19
$result = Invoke-RestMethod @splat
~~~~~~~~~~~~~~~~~~~~~~~~
You cannot call a method on a null-valued expression.
At C:\Program Files\WindowsPowerShell\Modules\Cachet\Private\Invoke-CachetRequest.ps1:66 char:13
if (-not ($result.GetType().Name -eq 'PSCustomObject')) {
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Hiyo!
Was about to start experimenting with the API, and noticed you already have a module here : D
Any chance you'd consider publishing this to the PowerShell Gallery? Happy to help if you have any questions!
Cheers!
New-CachetIncident returns a response from the server, but no incidents are created. Steps to produce issue:
New-CachetIncident -CachetServer cachet.local.domain -Name 'Test Incident' -Message 'This is a test.' -Status Investigating -Visible 1 -ComponentName Test -ComponentStatus PartialOutage -APIToken <token>
Returns:
StatusCode : 200
StatusDescription : OK
Content : {"meta":{"pagination":{"total":0,"count":0,"per_page":20,"current_page":1,"total_pages":0,"links":{"next_page":null,"previous_page"
:null}}},"data":[]}
RawContent : HTTP/1.1 200 OK
Transfer-Encoding: chunked
Connection: keep-alive
Cache-Control: no-cache
Content-Type: application/json
Date: Thu, 01 Jun 2017 04:10:32 GMT
Server: nginx/1.12.0
X-Powered-By: P...
Forms : {}
Headers : {[Transfer-Encoding, chunked], [Connection, keep-alive], [Cache-Control, no-cache], [Content-Type, application/json]...}
Images : {}
InputFields : {}
Links : {}
ParsedHtml : mshtml.HTMLDocumentClass
RawContentLength : 150
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.