Git Product home page Git Product logo

powershell-cachet's People

Contributors

areptiledysfunction avatar robert-smith avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

powershell-cachet's Issues

Commands not functioning

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
    
  •               ~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-RestMethod], WebException
    • FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeRestMethodCommand

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')) {
    
  •         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : InvokeMethodOnNull

Consider publishing on the Gallery?

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 does not create an incident

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.