• Recent
    • Unsolved
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login
    1. Home
    2. Tags
    3. api
    Log in to post
    • All categories
    • B

      Unsolved API tasktypeid 12/13 deploySnapIns not doing anything

      FOG Problems
      • api powershell api help snapins • • bartfox
      1
      0
      Votes
      1
      Posts
      310
      Views

      No one has replied

    • S

      Coding a shortcut Webview/Problem with the API

      General
      • api api help fogapi-psmodule • • sega
      11
      0
      Votes
      11
      Posts
      1.3k
      Views

      S

      I changed the code to PHP and now it works, so I think it was something security related from the browser.

    • T

      Solved Copy Cloud Storage of /images to Remote Servers Globally

      General
      • fogapi-psmodule api automation cloud • • typotony
      18
      0
      Votes
      18
      Posts
      1.6k
      Views

      JJ FullmerJ

      @typotony That’s Great to hear!
      Glad you got it working and that it was as easy as intended.

    • B

      API PUT request not working

      FOG Problems
      • api api help fogapi-psmodule • • brian.mainake
      5
      0
      Votes
      5
      Posts
      749
      Views

      B

      @judzk sorry I just saw this and yes I also see the error.

      Glad its working for you now.

      I also didn’t use the powershell module.

    • R

      Triggering image deploy through url.

      General
      • api api help fogapi-psmodule automation • • r.pawlowski
      4
      0
      Votes
      4
      Posts
      766
      Views

      JJ FullmerJ

      @r-pawlowski I would be happy to help in anyway I can. Personally, I deploy a bootmanager (grub2win) and the ipxe.efi file to each machines efi partition. Then I can just change the boot managers default to boot straight to fog. It takes a bit of time to get setup, but I found it to be the most reliable as I then didn’t have to worry as much about the bios settings. Theoretically you can use bcdedit commands to change the boot order to boot to network, but that also differs on different hardware.

      I digress though, the easy bit for queueing an image to deploy

      Follow the setup instructions for the fog API (involves installing the module from powershell gallery and then inputting your API keys and fog server address) Then make sure the host you’re imaging is assigned the correct image, this can be changed in the API if you need that, but for this quick example, we’ll pretend it’s set correct. For an example, we’ll say the hostname of a computer in fog is ‘test-computer’, so this will find the host in fog, then queue an image to deploy on it right now $hostID = (Get-FogHost -hostname 'Test-Computer').id #create a quick json string, this can also be done in a powershell object and converted, but this is just a quick example. #tasktypeID of 1 is a deploy task, if no runtime/schedule time is specified, it defaults to instant deploy # shutdown = 0 is not scheduling with shutdown # I believe other2 = 0 means not a debug # other4 = 1 means to enable wol # isactive =1 means the task is active $jsonData = "{`"taskTypeID`": 1,`"shutdown`":`"0`",`"other2`":`"0`",`"other4`":`"1`",`"isActive`":`"1`" }"; # make the API call to create the new task for your host New-FogObject -type objecttasktype -coreTaskObject host -jsonData $jsonData -IDofObject $hostId;

      Once you have this all setup in a powershell module or script internally, you can get things automated pretty smoothly. It’s meant to be modular so it can be applied to any infrastructure or workflow and built upon.

      If you need more help let me know and I’ll see what I can do.

    • ?

      API questions

      FOG Problems
      • api api help automation • • A Former User
      1
      0
      Votes
      1
      Posts
      310
      Views

      No one has replied

    • A

      news.fogproject.org not reachable

      General Problems
      • api • • abulhol
      2
      0
      Votes
      2
      Posts
      417
      Views

      Tom ElliottT

      @abulhol Should be back up and running.

      Thanks for letting us know.

    • Chris WhiteleyC

      FOG API add snapin, run task and then delete

      FOG Problems
      • fogapi-psmodule api help api • • Chris Whiteley
      6
      1
      Votes
      6
      Posts
      959
      Views

      JJ FullmerJ

      @Chris-Whiteley I finally had some time to work on the module and created a Start-FogSnapin function that can deploy a single snapin task.

      See also https://fogapi.readthedocs.io/en/latest/commands/Start-FogSnapin/

    • JJ FullmerJ

      Solved API Return object for scheduledtask is malformed (has a tiny typo)

      Bug Reports
      • api schedule • • JJ Fullmer
      19
      0
      Votes
      19
      Posts
      1.7k
      Views

      JJ FullmerJ

      @tom-elliott said in API Return object for scheduledtask is malformed (has a tiny typo):

      @tom-elliott Added a little tiny bit.

      Thank you,

      That tiny bit that allowed non-unique names for tasks and scheduled tasks did the trick!

    • G

      API FOG : How to Apply PxeMenuOptions to Host

      General
      • api help api pxe pxe menu • • guyfox
      5
      0
      Votes
      5
      Posts
      774
      Views

      G

      i think i’ve found the solution .

      i just made a new ipxemenu entry with my winpe and force via API , the default parameter to 1 to this menu entry i can find in coreobjects pxemenuoptions.

      i’ll keep you informed

    • D

      How to understand if host is up or down using API?

      General Problems
      • api api help host • • davide1611
      14
      0
      Votes
      14
      Posts
      1.9k
      Views

      D

      Thank you!

    • JJ FullmerJ

      Powershell API Module

      Tutorials
      • api api help powershell task management fogapi-psmodule • • JJ Fullmer
      32
      4
      Votes
      32
      Posts
      8.6k
      Views

      JJ FullmerJ

      Another Release(s)! 2506.9.22
      https://github.com/darksidemilk/FogApi/releases/tag/2506.9.22

      2506.9.19-22 are a slew of releases where I kept finding issues in broader tests right after I released each version. So apologies for the over-releasing there.

      Fixed send-fogimage to work with more use cases and utilize more parameters available to scheduled tasks like bypassbitlocker. Also simplified the parameter sets to avoid errors when using the command with different parameter sets. Also added links to PSGallery and chocolatey in each github release going forward.

      Full Release Note History: https://fogapi.readthedocs.io/en/latest/ReleaseNotes/
      Powershell Gallery Listing for this version: https://www.powershellgallery.com/packages/FogApi/2506.9.22
      Chocolatey Package Listing for this version (may take 1-60 days from release to be approved by chocolatey moderators): https://community.chocolatey.org/packages/FogApi/2506.9.22

    • mwarnerM

      Solved API System giving 404 errors

      FOG Problems
      • api custom script program 404 • • mwarner
      24
      0
      Votes
      24
      Posts
      7.1k
      Views

      mwarnerM

      @Tom-Elliott Yes it is safe to solve now, sorry for the delay. Thanks again!

    • C

      How to use execute FOG through command line?

      Tutorials
      • fogapi-psmodule api help api commandline • • ChrisK
      9
      0
      Votes
      9
      Posts
      5.7k
      Views

      JJ FullmerJ

      @jape You can use the api (See the powershell api module links in my signature). You can use it to create the scheduled task. i.e. (provided you got the module all setup prior) the following would create a scheduled deploy task for host with id ‘1234’
      at 8 pm tonight. The following is all powershell that can be run from your admin workstation.

      #define the schedule time in the linux format $startAtTime = (get-date 8pm) $EpochDiff = New-TimeSpan "01 January 1970 00:00:00" $($startAtTime) $scheduleTime = [INT] $EpochDiff.TotalSeconds - [timezone]::CurrentTimeZone.GetUtcOffset($(get-date)).totalseconds #define the schedule time in human readable format $runTime = get-date $StartAtTime -Format "yyyy-M-d HH:MM" $jsonData = @" { "name":"Deploy Task", "type":"S", "taskTypeID":"1", "runTime":"$runTime", "scheduleTime":"$scheduleTime", "isGroupTask":"0", "hostID":"1234", "shutdown":"0", "other2":"0", "other4":"1", "isActive":"1" } "@ #create the scheduled deploy task with the defined json New-FogObject -type object -coreObject scheduledtask -jsonData $jsonData
    • 1 / 1