• Recent
  • Unsolved
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login
  • Recent
  • Unsolved
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login

API tasktypeid 12/13 deploySnapIns not doing anything

Scheduled Pinned Locked Moved Unsolved
FOG Problems
api powershell api help snapins
1
1
344
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B
    bartfox
    last edited by bartfox Sep 15, 2023, 3:24 AM Sep 15, 2023, 8:46 AM

    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)

    1 Reply Last reply Reply Quote 0
    • 1 / 1
    1 / 1
    • First post
      1/1
      Last post

    153

    Online

    12.1k

    Users

    17.3k

    Topics

    155.4k

    Posts
    Copyright © 2012-2024 FOG Project