-
Notifications
You must be signed in to change notification settings - Fork 2
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
Create modeler api tutorial #5
Conversation
@pepopowitz I think this is ready for a first glance, but I have a few loose ends I'm not sure about. If you'd rather, feel free to pop a half hour on my calendar and we can discuss. |
@christinaausley I'll give this demo a walkthrough locally today, to finalize a review! |
Co-authored-by: Steven Hicks <[email protected]>
Note that this tutorial will need to be updated based on #7, as in camunda/camunda-docs#3708. |
@pepopowitz I've cleaned this up to mirror the updated auth -- let me know if you want to review this async, or jump on a call 👍 |
@christinaausley I wasn't sure where to place this feedback relative to the changed code, so I'm making a general comment. I propose that we implement at least one API call different than we currently are. We're implementing two methods in this tutorial: one to retrieve details of a specific file, one to delete a specific file. The challenge for the user is that they'll need to go into the Modeler to find a file suitable for deletion, and capture only its ID from the URL. The URLs for files in Modeler don't make it easy to capture the ID -- for example, the ID for I have two proposals -- one more involved than the other.
What do you think? I'm open to other suggestions too, including iterative approaches like "let's do these methods and then come back and do one of the above suggestions." I'm also happy to contribute any changes or help if you are annoyed by me kicking this review a month down the road, and then suggesting such drastic changes. |
@pepopowitz This is an easy fix! I can probably do this today. But, do you have a preference on how we handle this? Could always open a backlog issue for iterations on these tutorials. |
@pepopowitz I ended up using POST for the first API call, so the user creates a semi-meaningless file, the output reveals the name and ID, and then the user deletes it with this ID. WDYT? |
Did that work for you against the actual API? When I was playing with the API in Insomnia, I was unable to create a file that didn't have contents. |
I don't have a preference. In case you'd like to handle it with a follow-up, I'll approve this one as-is, once I confirm that posting a file without contents functions against the real API. |
No, this API call does not work. See my previous comment about the File resource in the modeler API. Creating a file has several requirements, all of which will make it more work for us compared to a resource like Folder. Most of the requirements are captured in the swagger description, though not all of them (like there need to be valid file contents). If you'd like to treat the swapping of resources from Files to Folders iteratively, then I recommend reverting the changes to create the file. |
AH! I understand now. I'll just adjust the calls to the Projects 👍 |
This is ready for review @pepopowitz, but if you don't get to it today, I can have @conceptualshark and/or @akeller have a look while you're away 😄 Upon approval, I'll update the documentation. Thanks for your help! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IGNORE this review, the suggestions somehow ended up on the incorrect lines.
Oh man, I tried to make all my suggestions from within VS code, and it botched all the line numbers. I'm going to dismiss my previous review after re-submitting through the UI so that it's not suggesting misaligned changes 😭 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nicely done, again! I left a few blocking requests re: variable names; anything non-blocking is specified as such.
Thanks for your patience with my requests to refine this!
Co-authored-by: Steven Hicks <[email protected]>
Co-authored-by: Steven Hicks <[email protected]>
Co-authored-by: Steven Hicks <[email protected]>
Co-authored-by: Steven Hicks <[email protected]>
Co-authored-by: Steven Hicks <[email protected]>
Co-authored-by: Steven Hicks <[email protected]>
…d view and delete projects
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While playing with the code in this tutorial, I think I settled on a more ideal approach. I've written the code for it in #9.
Basically, it encapsulates the creation of a project and the addition of a collaborator into one action. It will take a little more explanation in the docs, to tell them why we're adding a second API call to this action and to walk them through the code.
But I think this aligns with what a user of our APIs would likely do in this situation. It doesn't appear that there's any endpoint in the Modeler API that can be used without the pre-existence of some other entity. In this case, the pre-existence required is the own user's account, which I think we can assume.
@pepopowitz Thank you for this! I'll update the documentation once this PR is finalized, and Slack you if I have any questions about how you've set it up. |
…dates Modeler API tutorial updates
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💪 💪 💪 💪 💪 💪 💪
Drafting up Modeler API tutorial. Docs to follow once this is polished up, but a few questions.