Navigation

    Inedo Community Forums

    Forums

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    1. Home
    2. James.McAllister_0459
    3. Posts
    J
    • Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Best
    • Groups

    Posts made by James.McAllister_0459

    • RE: deleting docker images via REST API

      @James-McAllister_0459 said in deleting docker images via REST API:

      Invoke-RestMethod

      With that help i can now delete when i enter a digest. I had to switch to using Invoke-WebRequest rather than Invoke-RestMethod to get the response headers so i actually get the correct digest (read the docs again :-)

      Is there any way to get the published date or created date of the image from a REST api?

      I can see i could get it from the database and a join between the DockerImages and DockerImageTags tables.

      posted in Support
      J
      James.McAllister_0459
    • deleting docker images via REST API

      I am trying to use a PowerShell script to experiment with deleting docker images using the recently introduced REST API. When i issue the delete operation it returns a 401 error. I thus am assumed i needed to pass an API key. So i generated one with all permissions (overkill but it wasn't obvious which specific ones would apply). I passed that as a header and there was no change.

      The Uri value is the same one i used on a GET which returned the info on the image (config. digest, image layers etc)

      Invoke-RestMethod -Method DELETE -Uri https://MyServer/v2/Main/bhge/dcfr-microservices/manifests/280307 -ErrorVariable RestError -ErrorAction SilentlyContinue

      then went to

      Invoke-RestMethod -Method DELETE -Uri https://MyServer/v2/Main/bhge/dcfr-microservices/manifests/280307 -Headers @{"X-ApiKey" = "DdRBo6_mbzH80XEpXSfz" } -ErrorVariable RestError -ErrorAction SilentlyContinue

      i also tried a few other permutations but all end up with 401 errors.

      How should I really be doing this?

      posted in Support
      J
      James.McAllister_0459
    • 1 / 1