Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP Proposal for People Import Helper #335

Open
wants to merge 2 commits into
base: gh-pages
from

Conversation

Projects
None yet
2 participants
@joshco
Copy link
Contributor

commented Apr 12, 2019

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

LINKS
Larry, @lperson original PR: MoveOnOrg/Spoke#967
Josh's OSDI-ifying branch: MoveOnOrg/Spoke@main...joshco:osdi_contacts
GHP Formatted spec for person_import_helper: https://joshco.github.io/osdi-docs/people_import_helper.html

@joshco joshco referenced this pull request Apr 12, 2019

Open

contacts API #967

1 of 2 tasks complete
@stale

This comment has been minimized.

Copy link

commented Jun 11, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further comments occur. Thank you for your contributions.

@stale stale bot added the stale label Jun 11, 2019

@stale stale bot closed this Jun 18, 2019

@joshco joshco reopened this Jun 24, 2019

@stale stale bot removed the stale label Jun 24, 2019

@mlncn

This comment has been minimized.

Copy link

commented Jul 12, 2019

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:

 ````json 

and likewise the use of four backticks around osdi:people_import_helper seems maybe more than intended; what does that do that one backtick doesn't do?

Thanks for this work!

@joshco

This comment has been minimized.

Copy link
Contributor Author

commented Jul 15, 2019

Thanks for the feedback and the eagle eye on the back-ticks. That's my error.
At some point my brain must have transposed the 3 and the 4 in the markdown definition for code blocks.

"Blocks of code are either fenced by lines with three back-ticks ```, or are indented with four spaces. "

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.