ForumsDevelopersIssue with rows\get.php returning ref field


Issue with rows\get.php returning ref field
Author Message
JTMcFarland

Posted: Dec 22, 2017
Score: 0 Reference
Endpoint https://api.toodledo.com/3/rows/get.php appears to be supplying a ref value. I'm not sure why it's there or where it came from.
Based on the documentation at http://api.toodledo.com/3/rows/index.php I expect ref could be returned by add, edit and delete, but not get or deleted.

I would appreciate any feedback on this issue.
Jake

Toodledo Founder
Posted: Dec 27, 2017
Score: 0 Reference
When you create a row in your app, you'll have to give it a unique ID and then pass this as "ref" when you add the row. Then, this "ref" will be echoed back to you for each row when you fetch those rows back from the API. This will make it possible for you to match up the rows that you added with the ones that we have after we create our own unique ID for that row. So, this is intentional.
spam.jtmcfarland

Posted: Dec 28, 2017
Score: 0 Reference
Thanks for your feedback. Yes, I believe I understand what you've mentioned as it applies to rows\add.php. I supply the ref value, and can use that as a means to cross-reference the results of that call.

The problem I've run into is that I'm getting ref values (which I did not supply) back from rows\get.php. When I attempt to deserialize those values into the type that I provide/expect (UUID), they fail because they actually contain large int values.

It's possible that the ref value was provided at the time that the row was added by some other client, however I'm not understanding why I would be getting those ref values from calls to rows\get.php from this client if they are only echo'd back during calls to rows\add.php.

Upon re-checking, I've found that after removing my workaround, I'm unable to reproduce this error. So... unless I run across this issue again, or you know of anything else that's relevant, it's probably safe to ignore this potential issue.
Jake

Toodledo Founder
Posted: Dec 28, 2017
Score: 0 Reference
Yes. If some other client created the rows, then you would see their "ref" values in rows/get.php. I supposed this should be changed so that only the client that created them could see the ref values. I'll consider this. For now, you will need to add some error checking around the "ref" value from rows/get.php and if its not in a format that you understand or if its not a ref that you created, then assume that its from some other client and add it to your client's data.
You cannot reply yet

U Back to topic home

R Post a reply

To participate in these forums, you must be signed in.