Model upload API change proposal, your input is requested

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

  1. hans_lambermont
    hans_lambermont Shapeways Employee Dev Team
    Hi all,

    Lots (all?) of you want to get the model_id reported when you upload a model.
    Currently the API returns the string "successful".

    Which new format would you prefer :



    "successful, model_id=12345"

    or something more XML-like ?

    I personally prefer the "successful, model_id=12345" string as that is simple and leaves room for extensions.

    If we change the return value would this break your existing clients ?
    If it does we have to move the model_id return feature to a new v2 API so that you can still use the unchanged v1 API.

    -- Hans
  2. mctrivia
    mctrivia Member
    coma delimited is fine for me but leave out the space so i can use explode without trimming.

    for hidden objects the hidden hash is needed also. ideally the hash could be found in 2 ways.

    1) returned with success string
    2) an extra function such as findURL($objectName or $objectID) or findHash either will work and id is better if you are returning the id with success.

    as for braking code it will not break mine because i assume any response other then fail is a pass. and no response or fail is a fail. so far i get no response more often then not.

    while we are at it can you possible return volume also so i can check if you calculated differently then me? or better yet make a library we can run locally to check the model before uploading?
    Last edited: Apr 19, 2011
  3. meshmixer
    meshmixer New Member
    wouldn't break anything for meshmixer, I ignore the return value...
  4. horst
    horst New Member
    As I mentioned in another thread, we do allow you to retrieve a model ID for a public (not private) model; take a look at this example code:

    if ($application_id == 'generated-creator') {
    $returnValue = $modelEntity->id;
    } else {
    $returnValue = "successful";

    So, set your application_id to be 'generated-creator', and you'll get the model ID value in return.

  5. mctrivia
    mctrivia Member
    great but when will you return the hash code for hidden objects