<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p>Hi,</p>
    <p>I realized that I can get the href of an artifact selecting its
      sha512 in the URI path.</p>
    <p><a class="moz-txt-link-freetext" href="https://docs.pulpproject.org/en/3.0/nightly/restapi.html#operation/artifacts_list">https://docs.pulpproject.org/en/3.0/nightly/restapi.html#operation/artifacts_list</a><br>
    </p>
    <p> This simplifies the use of jq as I get directly the good
      artifact.<br>
    </p>
    <p><tt>[vagrant@dev-pulp-server ~]$ http
$PORT/pulp/api/v3/artifacts/?sha512=9df10268233e243ef8b6c0fc9fea6452bf81eea8b2627c90d0a652304b5acf05e4996768c68adb4f6d224a369e7f3b6cf77d3fb62b5989bfce3fa94d46ce9ec7</tt><tt><br>
      </tt><tt>HTTP/1.1 200 OK</tt><tt><br>
      </tt><tt>Allow: GET, POST, HEAD, OPTIONS</tt><tt><br>
      </tt><tt>Connection: close</tt><tt><br>
      </tt><tt>Content-Length: 745</tt><tt><br>
      </tt><tt>Content-Type: application/json</tt><tt><br>
      </tt><tt>Date: Fri, 24 May 2019 08:39:23 GMT</tt><tt><br>
      </tt><tt>Server: gunicorn/19.9.0</tt><tt><br>
      </tt><tt>Vary: Accept, Cookie</tt><tt><br>
      </tt><tt>X-Frame-Options: SAMEORIGIN</tt><tt><br>
      </tt><tt><br>
      </tt><tt>{</tt><tt><br>
      </tt><tt>    "count": 1, </tt><tt><br>
      </tt><tt>    "next": null, </tt><tt><br>
      </tt><tt>    "previous": null, </tt><tt><br>
      </tt><tt>    "results": [</tt><tt><br>
      </tt><tt>        {</tt><tt><br>
      </tt><tt>            "_created": "2019-05-24T08:08:58.445890Z", </tt><tt><br>
      </tt><tt>            "_href":
        "/pulp/api/v3/artifacts/aaefcc88-9bb7-4a70-9e98-19e039b0f95e/",
      </tt><tt><br>
      </tt><tt>            "file":
"artifact/5b/6b81a0bbe944ab393ea8dea0ab2cf906a1f6fd81ad139efd125d2454752780",
      </tt><tt><br>
      </tt><tt>            "md5": "0011ff65d03dde05b4370f7879b4bd0c", </tt><tt><br>
      </tt><tt>            "sha1":
        "db05ead3a760d5906ea5cd9c1e4d713379785b90", </tt><tt><br>
      </tt><tt>            "sha224":
        "6b0da4b1ef04d25344d924f8785cc5fd34f7b58554fbcc9e902fb1a3", </tt><tt><br>
      </tt><tt>            "sha256":
        "5b6b81a0bbe944ab393ea8dea0ab2cf906a1f6fd81ad139efd125d2454752780",
      </tt><tt><br>
      </tt><tt>            "sha384":
"8598ba74004db73b0f02bed5bc5ef0313539123986be910fda07187bff926a7d608dcec1815a7a248cd8a218dc53f6ad",
      </tt><tt><br>
      </tt><tt>            "sha512":
"9df10268233e243ef8b6c0fc9fea6452bf81eea8b2627c90d0a652304b5acf05e4996768c68adb4f6d224a369e7f3b6cf77d3fb62b5989bfce3fa94d46ce9ec7",
      </tt><tt><br>
      </tt><tt>            "size": 31264</tt><tt><br>
      </tt><tt>        }</tt><tt><br>
      </tt><tt>    ]</tt><tt><br>
      </tt><tt>}</tt><br>
      <br>
    </p>
    <p>I see in
<a class="moz-txt-link-freetext" href="https://pulp-rpm.readthedocs.io/en/latest/restapi.html#operation/content_rpm_packages_list">https://pulp-rpm.readthedocs.io/en/latest/restapi.html#operation/content_rpm_packages_list</a><br>
    </p>
    <p>that there is a possible "name" query.  But to what this query
      corresponds?</p>
    <p><tt>[vagrant@dev-pulp-server ~]$ http
$PORT/pulp/api/v3/content/rpm/packages/?name=mailcap-2.1.41-2.el7.noarch.rpm
      </tt><tt><br>
      </tt><tt>HTTP/1.1 200 OK</tt><tt><br>
      </tt><tt>Allow: GET, POST, HEAD, OPTIONS</tt><tt><br>
      </tt><tt>Connection: close</tt><tt><br>
      </tt><tt>Content-Length: 52</tt><tt><br>
      </tt><tt>Content-Type: application/json</tt><tt><br>
      </tt><tt>Date: Fri, 24 May 2019 09:05:08 GMT</tt><tt><br>
      </tt><tt>Server: gunicorn/19.9.0</tt><tt><br>
      </tt><tt>Vary: Accept, Cookie</tt><tt><br>
      </tt><tt>X-Frame-Options: SAMEORIGIN</tt><tt><br>
      </tt><tt><br>
      </tt><tt>{</tt><tt><br>
      </tt><tt>    "count": 0, </tt><tt><br>
      </tt><tt>    "next": null, </tt><tt><br>
      </tt><tt>    "previous": null, </tt><tt><br>
      </tt><tt>    "results": []</tt><tt><br>
      </tt><tt>}</tt><tt><br>
      </tt><br>
    </p>
    <p>Sincerely</p>
    <p>Juan<br>
    </p>
    <div class="moz-signature">-- <br>
      <div style="font-family: Verdana, Helvetica, Arial, sans-serif;
        font-size: 8pt; font-weight: normal; color: #616365;"> <img
          src="cid:part1.3A0D1BE0.86077DC2@unamur.be" style="display:
          block; margin: 1em 0em;">
        <p style="margin: 1em;"> <span style="font-weight: bold;">Juan
            CABRERA</span><br>
          <span style="color: #69BE28;">Correspondant informatique</span><br>
          <span>Département de Mathématiques</span> </p>
        <p style="margin: 1em;">
          <span style="font-weight: bold;">T.</span> 081724919<br>
          <a style="color: #69BE28;"
            href="mailto:juan.cabrera@unamur.be">juan.cabrera@unamur.be</a><br>
          <a style="color: #69BE28;"
            href="http://staff.unamur.be/jbcabrer">http://staff.unamur.be/jbcabrer</a>
        </p>
        <p style="margin: 1em;"> <span style="font-weight: bold;
            font-size: 8pt;">Université de Namur ASBL</span><br>
          <span>Rue de Bruxelles 61 - 5000 Namur</span><br>
          <span>Belgique</span><br>
        </p>
        <p style="margin: 1em; font-size: 6pt; color: #69BE28;"> <span>Let’s
            respect the environment together.</span><br>
          <span style="font-weight: bold;">Only print this message if
            necessary!</span><br>
        </p>
      </div>
    </div>
  </body>
</html>