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

Create Image via API

Scheduled Pinned Locked Moved
General Problems
2
3
451
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.
  • M
    makswojciech
    last edited by Aug 23, 2021, 12:25 PM

    Hey,
    I’m trying to create image via API using Postman, but all i get is “error”: “Required database field is empty”. Does anyone have any experience with it?
    This is my body:
    {
    “name”:“test-api1”,
    “description”:“test-api1”,
    “storagegroup”:“2”,
    “os”:“9”,
    “file”:“test-api1”,
    “imagetype”:“1”,
    “imagepartitiontype”:“1”,
    “isEnabled”:“on”,
    “toReplicate”:“on”,
    “compress”:“6”,
    “imagemanage”:“5”
    }

    W 1 Reply Last reply Aug 24, 2021, 2:18 AM Reply Quote 0
    • W
      Wayne Workman @makswojciech
      last edited by Wayne Workman Aug 23, 2021, 8:24 PM Aug 24, 2021, 2:18 AM

      @makswojciech You might look here at the community contributed powershell modules, they might give you a good direction. https://github.com/FOGProject/fog-community-scripts/tree/master/PowershellModules

      Though, sometimes it’s best to go look at the source code. Have a look-see at the files with the word image in their name here: https://github.com/FOGProject/fogproject/tree/master/packages/web/lib/fog

      Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!
      Daily Clean Installation Results:
      https://fogtesting.fogproject.us/
      FOG Reporting:
      https://fog-external-reporting-results.fogproject.us/

      M 1 Reply Last reply Aug 24, 2021, 8:14 AM Reply Quote 1
      • M
        makswojciech @Wayne Workman
        last edited by Aug 24, 2021, 8:14 AM

        @wayne-workman Thanks you for your aid! Those Powershell scripts helped me. For those in the future with the same problem as me.
        {
        “name”:“test-api1”,
        “description”:“test-api1”,
        “storagegroups”:“2”,
        “osID”:“9”,
        “path”:“test-api1”,
        “imageTypeID”:“1”,
        “imagePartitionTypeID”:“1”,
        “isEnabled”:“1”,
        “toReplicate”:“1”,
        “compress”:“6”,
        “imagemanage”:“5”
        }
        That’s how the body should more or less look like

        1 Reply Last reply Reply Quote 1
        • 1 / 1
        1 / 1
        • First post
          2/3
          Last post

        166

        Online

        12.0k

        Users

        17.3k

        Topics

        155.2k

        Posts
        Copyright © 2012-2024 FOG Project