| Model upload API change proposal, your input is requested [message #26200] Tue, 19 April 2011 09:38 UTC |
 |
|
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 :
12345
or
"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
|
|
|
| Re: Model upload API change proposal, your input is requested [message #26210 is a reply to message #26200 ] Tue, 19 April 2011 14:51 UTC |
  |
|
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?
[Updated on: Tue, 19 April 2011 15:07 UTC] Follow me on twitter http://twitter.com/mctrivia or my blog at http://4ddice.blogspot.com/
|
|
|
| Re: Model upload API change proposal, your input is requested [message #26329 is a reply to message #26210 ] Thu, 21 April 2011 20:52 UTC |
  |
|
|
wouldn't break anything for meshmixer, I ignore the return value...
|
|
|
| Re: Model upload API change proposal, your input is requested [message #26615 is a reply to message #26200 ] Wed, 27 April 2011 15:19 UTC |
  |
|
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.
-Ben
Shapeways Front-End Product Lead
|
|
|
| Re: Model upload API change proposal, your input is requested [message #26622 is a reply to message #26615 ] Wed, 27 April 2011 15:37 UTC |
 |
|
great but when will you return the hash code for hidden objects
Follow me on twitter http://twitter.com/mctrivia or my blog at http://4ddice.blogspot.com/
|
|
|