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

    maddyred

    @maddyred

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

    maddyred Unfollow Follow

    Latest posts made by maddyred

    • RE: Fog api image create 417 error

      @sebastian-roth data = {
      “name”: “fogsvos”,
      “description”: “”,
      “path”: “SVOSTEST”,
      “imagetypename”: “Single Disk - Resizable”,
      “imageparttypename”: “Everything”,
      “osname”: “Linux”,
      “storagegroupname”: “default”,
      “format”: “5”,
      “magnet”: “”,
      “protected”: “0”,
      “compress”: “6”,
      “isEnabled”: “1”,
      “toReplicate”: “1”,
      “srvsize”: “1633196522”
      }
      response = session.post(url + ‘/fog/image/create’,data=json.dumps(data))
      print(response.text)
      print(response.status_code)

      python used for api call

      posted in FOG Problems
      M
      maddyred
    • Fog api image create 417 error

      Hi i’m unable to create fog image from api Please find my json body
      data = {
      “name”: “fogsvos”,
      “description”: “”,
      “path”: “SVOSTEST”,
      “imagetypename”: “Single Disk - Resizable”,
      “imageparttypename”: “Everything”,
      “osname”: “Linux”,
      “storagegroupname”: “default”
      }
      please let me know if anything missing in json body

      posted in FOG Problems
      M
      maddyred
    • RE: API - Create Host "error": "Required database field is empty"

      @sebastian-roth Hi, I tried with jsondumps(data) and it is now throwing HTTP 500 error. Need some help on registering host with api.

      posted in FOG Problems
      M
      maddyred
    • API - Create Host "error": "Required database field is empty"

      Hi, I am trying to create a new host from api in pythonwith post to data to create a host it gives me this error: “error”: “Required database field is empty”

      My python code Api looks like this:

      import requests
      import json
      
      session = requests.Session()
      url = 'http://x.x.x.x.'
      userToken = 'ZDJkMDU4ODEyNDA2YTVlZDZhYjkxOGY3OGM2NDZiNjhiZmRkYjJlMTQ4Mzc1Y2FkMjQ2M2ViNGRkMDNjN2QxMjkwOThhM2Q4NTQ1ZmI3M2JhNmY5MGNiY2ZjYjAxMTVhNzdiZmMwZWE0ZjgzZjI0NzM5N2NkOTEzZjJlNzBjOTk='
      apiToken = 'ZTRkM2MxNWZlMDFmNWY3ZTJlNDBmM2MxN2Q0ZjFhOTI0ODc0NzExOWJlYmI0NmJiYTk5MzM1NDUxMmU1Yjg1ZThhOGM4MWM4ZDIxNDg1NGFlNmRiYmFiZWRmOGFkMWFjYTMwOGExMjA2ZGVkN2FiNDM1ZmU2YzcyY2Q3NjVlZDg='
      session.headers.update({'fog-user-token': userToken, 'fog-api-token':apiToken, 'Content-Type': 'application/json' })
      data = {
              "name": "12test host",
              "description":  "test hosts",
              "macs": "c4:90:19:9c:6b:ea",
              "imageID": "22",
              "imagename": "Windows_Server_2019"
            }
      response = session.post(url + '/fog/host/create',data=data)
      print(response.text)
      
      posted in FOG Problems
      M
      maddyred