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

    API questions

    Scheduled Pinned Locked Moved
    FOG Problems
    api api help automation
    1
    1
    302
    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.
    • ?
      A Former User
      last edited by

      Hello there,

      I’m trying to figure out how to work with the API. From a past post, I copied this curl command to try and deploy an image onto a machine. The end goal is to try and be able to automate this on Jenkins.

      curl -k -H 'Content-Type: application/json' -H 'fog-user-token: (user token)' -H 'fog-api-token: (api token)' http://(the parts before the .com).com/fog/host/(name of host)/task -d '{"taskTypeID":1,"shutdown": true}'
      

      I tried running this on a machine not on the fog server machine or with the fog client installed in command line. Nothing returned and the job wasn’t scheduled.
      I then tried running this on the linux machine with the fog server installed and it either returns nothing with the job wasn’t scheduled or the error,
      “error”: “Invalid tasking type passed”.

      What mistake am I making here that’s not letting things pass through?

      Any help is greatly appreciated and I can provide more information whenever I can.

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

      153

      Online

      12.0k

      Users

      17.3k

      Topics

      155.2k

      Posts
      Copyright © 2012-2024 FOG Project