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

    Create Image via API

    General Problems
    2
    3
    191
    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

      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”
      }

      Wayne Workman 1 Reply Last reply Reply Quote 0
      • M
        makswojciech @Wayne Workman last edited by

        @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
        • Wayne Workman
          Wayne Workman @makswojciech last edited by Wayne Workman

          @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 Reply Quote 1
          • 1 / 1
          • First post
            Last post

          126
          Online

          10.4k
          Users

          16.4k
          Topics

          150.6k
          Posts

          Copyright © 2012-2023 FOG Project