• Recent
    • Unsolved
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login
    1. Home
    2. bartfox
    B
    • Profile
    • Following 0
    • Followers 0
    • Topics 1
    • Posts 1
    • Best 0
    • Controversial 0
    • Groups 0

    bartfox

    @bartfox

    0
    Reputation
    1
    Profile views
    1
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    bartfox Unfollow Follow

    Latest posts made by bartfox

    • API tasktypeid 12/13 deploySnapIns not doing anything

      We are on FOG 1.5.10.
      Everything from the web ui works great, as expected.
      But with the api, all works except the scripting to launch tasktype=12 for All Snapins.
      Everything tried from invoke-restmethod to new-fogobject always returns the hostobject with all it’s parameters, but in the webui under active tasks or active snapins tasks, it’s not coming in…

      Here an example:
      for single snapin:

      $body = @{
          "taskTypeID" = "13",
          "deploySnapins" = "20"
      } | ConvertTo-Json
      

      for all snapins:

      $body = @{
          "taskTypeID" = "12",
          "deploySnapins" = "-1"
      } | ConvertTo-Json
      

      then execute:

      Invoke-RestMethod -Uri 'http://fogserver/fog/host/418/task' -Method Post -Headers $headers -Body $body
      

      (headers containing system api and user api token…) always returns the host object and it’s configured parameters, but launches nothing…
      what am i missing ?

      Also am using fogapi powershell module (which is great, thanks a lot for that!)
      get-foghost works great, but start-fogsnapins does the same (reporting host parameters, but nothing happens)

      posted in FOG Problems api powershell api help snapins
      B
      bartfox