email notification

Discussion in 'Shapeways API' started by mctrivia, Apr 19, 2011.

  1. mctrivia
    mctrivia New Member
    i just used api to upload 195 models. i got almost 400 emails. need an option to not get emails from api uploads
  2. pete
    pete Shapeways Employee CEO & Co-Founder
    OK! Fair enough :) What are you using the API with? Solidworks? Blender? Something else? Would love to know...
  3. mctrivia
    mctrivia New Member
    i wrote my own php script.
  4. horst
    horst New Member
    Wow, that's a lot of emails! We'll definitely address this to make the deluge preventable.

  5. pete
    pete Shapeways Employee CEO & Co-Founder
    Cool! Can you provide a little more details? Perhaps it is usable knowledge for others?
  6. mctrivia
    mctrivia New Member
    I am not sure what you would like to know.

    it is pretty easy to interface a web server with your server through the API. It is rediculously dificult to parse your main web site and interface that way. Unfortunetly your API has some majer restrictions which are keeping me from going public with my web site.

    Major Problems:
    1) No way to get hash code of hidden models. Need a findURL or findHash function.
    2) No way to upload stl files larger then 16MB.

    Minor Problems:
    3) No way to restrict material types
    4) No way to alter product pricing(If I could get 1 I could parse the page check the price is correct but even then I could not alter it. My pricing is usually +-2cents do to rounding errors)

    The 195 dice I uploaded today were designed with Alibre bulk uploaded to my FTP server then wrote a script to quickly upload the entire batch to your server as it would have taken all day to manually upload through your interface.

    As for what my web site it consists of 4 parts:

    1) site code, lets user see initial page. This code runs once per page reload
    2) ajax back end - handles interface between demons and the site code. Lets user see what is going on
    3) render demon - This demon sits on server and takes render job cue and renders the jobs in order. I do jobs sequentially instead of in parallel so that the server does not crash from high load and so if the user leaves my site the job will keep going and I can send an email when it is done.
    4) upload demon - This demon sits on server and uploads all finished rendered jobs sequentially to the server. I am doing these sequentially because I have a multi gigabit backbone connection and could probably take down shapeways if I tried to upload say 195 files in parallel.
  7. pete
    pete Shapeways Employee CEO & Co-Founder
    Would love to see your site: PM me if private atm.
  8. mctrivia
    mctrivia New Member
    sent pm. would love to know what you think.
  9. hans_lambermont
    hans_lambermont Shapeways Employee Dev Team
    Maybe it makes sense to limit the SOAP API mails to error mails only ?

    -- Hans
  10. mctrivia
    mctrivia New Member
    email on error is not ideal. ideal would be for you to triger a specific url on fail so my server can handle error.

    how about on upload you add an 'onerror' field which contains an email address or a url. for simplicity if url send error information by get values.
  11. horst
    horst New Member
    Hans--what do we lose if we simply switch for API notification entirely away from email and use URLs with get values instead? It's clearly more scalable and programmable for API users that way.
  12. hans_lambermont
    hans_lambermont Shapeways Employee Dev Team
    Yes, I agree this is the better way. The only question remaining is how to prevent swapping an event-driven method for a polling one.

    -- Hans