Inedo Community Forums Forums
    • Recent
    • Tags
    • Popular
    • Login

    Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.

    If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!

    pgutil: metadata set custom returning BadRequest (400): Expected application/json Content-Type

    Scheduled Pinned Locked Moved Support
    3 Posts 2 Posters 20 Views 1 Watching
    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 Offline
      matthew.crowley_4142
      last edited by

      Hello, I am having an issue with pgutil when trying to set custom metadata on a file in an Asset Directory.

      The request I am making is:
      pgutil assets metadata set custom --path=/dev/app/app1.apk --feed=Apps --key=testReleaseNotes --value="release notes value test" --api-key=X

      Which for some reason returns:
      Server responded with BadRequest (400): Expected application/json Content-Type

      I tried using Postman to send a POST request, which works fine and is able to set custom metadata on files. It is just pgutil that appears to be throwing an error.

      Is there something I am doing wrong with the pgutil request?

      Thanks for the help.

      atrippA 1 Reply Last reply Reply Quote 0
      • atrippA Offline
        atripp inedo-engineer @matthew.crowley_4142
        last edited by

        Hi @matthew-crowley_4142 ,

        What version of ProGet are you using? I know at some point we removed the requirement to specify a content type (maybe ProGet 2023?)

        pgutil is really only designed/tested with ProGet 2024+; earlier versions might work, but we just didn't build or test for those APIs. We're open to pull requests if you wanted to take a stab at trying to get it working on old api (maybe it's just a matter of adding the content type header)?

        Thanks,
        Alana

        M 1 Reply Last reply Reply Quote 0
        • M Offline
          matthew.crowley_4142 @atripp
          last edited by

          @atripp Thanks for the response. Seems we are using a quite old version of Proget - Version 2022.25 (Build 9). We are planning to upgrade it in a few months, but didn't think it would cause issues. We might have to wait for an upgrade to our systems to get this fixed then.

          1 Reply Last reply Reply Quote 0

          Hello! It looks like you're interested in this conversation, but you don't have an account yet.

          Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

          With your input, this post could be even better 💗

          Register Login
          • 1 / 1
          • First post
            Last post
          Inedo Website Home • Support Home • Code of Conduct • Forums Guide • Documentation