Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
WIP Proposal for People Import Helper #335
Based on the need of apps like Spoke or CRMs to have people imported in batches vs single API call per person, this is a proposal for a new helper osdi:people_import_helper. It's been prototyped as a Spoke contacts API with links below.
This helper allows a client to essentially batch up a set of person_signup_helper object into an array and upload all at once. By wrapping the signup objects, rather than an array of people, this allows the helper action functions like add_tags et al to be invoked individually for each person in the array.
The implementation could use the same endpoint for the osdi:person_signup_helper and osdi:people_import_helper but parse the body and behave accordingly. This allows a client to discover if it can do a batched import, or if it must go through the pain of individually uploading each person.
As for the response to the batch helper, I think Larry has the right idea. The response should be status information on errors/validation failures. We currently have osdi:error defined which could be a good way to represent this, and the data Larry's code is returning. I've added a new attribute within osdi:errors to accommodate batch requests.
I've added some stats attributes to the response object as a stake in the ground, but am interested in hearing what others think about what's necessary. Please let me know
Technically seems like a great idea.
Minor question on the markdown formatting of the documentation:
Sometimes JSON is introduced with four backticks instead of three:
and likewise the use of four backticks around
Thanks for this work!
Thanks for the feedback and the eagle eye on the back-ticks. That's my error.
As far as I know, there's no other benefit to the 4th back-tick, except perhaps the visual order of even / balanced back-ticks.
If you have the time, please put together a pull request changing them to 3 back-ticks,, so you'll be recognized for your contribution.
If not, LMK, I'll handle it.