<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div><div style="direction: inherit;">Check the API wiki for the exact syntax. You can get the file id by GETting the file list from the nbi.</div><div style="direction: inherit;"><span style="background-color: rgba(255, 255, 255, 0);"><br></span></div><div style="direction: inherit;"><span style="background-color: rgba(255, 255, 255, 0);">curl -i '</span><a moz-do-not-send="true" href="http://localhost:7557/devices/YOUR_ACS_ID/tasks?timeout=3000&connection_request" style="background-color: rgba(255, 255, 255, 0);">http://localhost:7557/</a>files'</div><div style="direction: inherit;"><br></div>-dan</div><div><br>On Sep 28, 2016, at 3:08 AM, Sergio <<a href="mailto:sergio.fernandez@electronicamartinez.com">sergio.fernandez@electronicamartinez.com</a>> wrote:<br><br></div><blockquote type="cite"><div>
  
    <meta content="text/html; charset=windows-1252" http-equiv="Content-Type">
  
  
    <p>Thank you very much, Dan!!<br>
      <br>
      Only one question: How do you get the File ID of the uploaded
      file? II think I should query it somehow, and then passing it to
      the last command you wrote.<br>
      <br>
      Thank you!<br>
    </p>
    <br>
    <div class="moz-cite-prefix">El 21/09/16 a las 17:54, Dan Morphis
      escribió:<br>
    </div>
    <blockquote cite="mid:CAHwrMLcu7eZ1DTVysT_Q4VvEOFpkaMHWr7wXjickTw5ruqM18w@mail.gmail.com" type="cite">
      <div dir="ltr">Using the API you can accomplish this. First query
        the NBI for all CPE with the version number you would like to
        upgrade from:
        <div><br>
        </div>
        <div>curl -i '<a moz-do-not-send="true" href="http://localhost:7557/devices?query=%7B%22summary.softwareVersion%22%3A%222.5.0.8%22%7D&projection=_id">http://localhost:7557/devices?query=%7B%22summary.softwareVersion%22%3A%222.5.0.8%22%7D&projection=_id</a>'<br>
        </div>
        <div><br>
        </div>
        <div>Using the language of your choice, you can then take the
          results and push out the firmware to the CPEs<br>
          <br>
          <pre style="box-sizing:border-box;font-family:consolas,"liberation mono",menlo,courier,monospace;font-size:13.6px;margin-top:0px;margin-bottom:16px;font-stretch:normal;line-height:1.45;word-wrap:normal;padding:16px;overflow:auto;border-radius:3px;color:rgb(51,51,51);background-color:rgb(247,247,247)"><code style="box-sizing:border-box;font-family:consolas,"liberation mono",menlo,courier,monospace;font-size:13.6px;padding:0px;margin:0px;border-radius:3px;word-break:normal;border:0px;display:inline;overflow:visible;line-height:inherit;word-wrap:normal;background-image:initial;background-color:transparent;background-size:initial;background-origin:initial;background-clip:initial;background-position:initial;background-repeat:initial">curl -i '<a moz-do-not-send="true" href="http://localhost:7557/devices/YOUR_ACS_ID/tasks?timeout=3000&connection_request">http://localhost:7557/devices/YOUR_ACS_ID/tasks?timeout=3000&connection_request</a>' \
    -X POST \
    --data '{ "name": "download", "file":"YOUR_FILE_ID","filename":"YOUR_FILE_NAME"}'</code></pre>
        </div>
      </div>
      <div class="gmail_extra"><br>
        <div class="gmail_quote">On Fri, Sep 16, 2016 at 1:09 AM, Sergio
          <span dir="ltr"><<a moz-do-not-send="true" href="mailto:sergio.fernandez@electronicamartinez.com" target="_blank">sergio.fernandez@electronicamartinez.com</a>></span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">Good
            morning!<br>
            <br>
            I would like to use GenieACS to update the firmware of a lot
            of CPEs.<br>
            I was thinking, first, to try to implement it via
            GenieACS-GUI, but I even don't know how to start. Maybe a
            selectizer in a new tab will fit, but I don't know, and I
            would need guidance.<br>
            The other way I was thinking of, it's via API. But I don't
            know if it would collapse or if it would be more difficult
            to accomplish.<br>
            <br>
            Hope you could help me with your advice!<br>
            <br>
            Thank you.<br>
            <br>
            Sergio F.<br>
            <br>
            ______________________________<wbr>_________________<br>
            Users mailing list<br>
            <a moz-do-not-send="true" href="mailto:Users@lists.genieacs.com" target="_blank">Users@lists.genieacs.com</a><br>
            <a moz-do-not-send="true" href="http://lists.genieacs.com/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.genieacs.com/mail<wbr>man/listinfo/users</a><br>
          </blockquote>
        </div>
        <br>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.genieacs.com">Users@lists.genieacs.com</a>
<a class="moz-txt-link-freetext" href="http://lists.genieacs.com/mailman/listinfo/users">http://lists.genieacs.com/mailman/listinfo/users</a>
</pre>
    </blockquote>
    <br>
  

</div></blockquote><blockquote type="cite"><div><span>_______________________________________________</span><br><span>Users mailing list</span><br><span><a href="mailto:Users@lists.genieacs.com">Users@lists.genieacs.com</a></span><br><span><a href="http://lists.genieacs.com/mailman/listinfo/users">http://lists.genieacs.com/mailman/listinfo/users</a></span><br></div></blockquote></body></html>