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

Beginner friendly API documentation #6086

Closed
pdurbin opened this issue Aug 12, 2019 · 4 comments · Fixed by #6107
Closed

Beginner friendly API documentation #6086

pdurbin opened this issue Aug 12, 2019 · 4 comments · Fixed by #6107

Comments

@pdurbin
Copy link
Member

pdurbin commented Aug 12, 2019

As I mentioned in the "Upcoming talk on the Dataverse API" thread on the mailing list, I'm adding some more introductory material to the guides to explain what Dataverse APIs are and how they can be used by support teams and others are not deeply technical and programmer-y: https://groups.google.com/d/msg/dataverse-community/V5WkMGDS4VI/maxXTdmzDwAJ

I don't plan to create a ton of diagrams but here's an example of what I've come up with so far:

Screen Shot 2019-08-12 at 10 22 03 AM

I'm constantly deploying some proposed changes the the one above to this server if anyone would like a sneak peek: https://dev2.dataverse.org/guides/

I may or may not try to address other smallish issues flagged as "API Guide" while I'm in there: Feature: API Guide

Here's a screenshot of those many issues:

Issues_·IQSS_dataverse-_2019-08-12_10 24 01

@pdurbin pdurbin self-assigned this Aug 12, 2019
@pdurbin pdurbin added the Small label Aug 12, 2019
@sbarbosadataverse
Copy link

sbarbosadataverse commented Aug 12, 2019 via email

@pdurbin
Copy link
Member Author

pdurbin commented Aug 14, 2019

I gave talk called "Introduction to Dataverse APIs" to the support team for Harvard Dataverse and others who were interested.

Here was the handout I provided, which is simply the table of contents from the "Introduction" page from the API Guide that I re-wrote (in the pull request I intend to create) and a new image explaining what an API is. I didn't have any slides. (Sorry, @shlake, I did see your tweet at https://twitter.com/shlakeuva/status/1161315003342835712 😄 )

Screen Shot 2019-08-14 at 5 09 14 PM

The talk emphasized the following points:

  • When I originally wrote the API guide, I hadn't considered multiple audiences. The new intro page provides starting points for the following audiences for a given installation such as Harvard Dataverse:
    • Users of Integrations and Apps
    • Power Users (who want to automate depositing "streaming data", for example)
    • Support Teams and Superusers (the primary audience for this talk)
    • Sysadmins
    • In House Developers (not all installations are lucky enough to have these)
  • Other API users are not focused on any particular installation of Dataverse:
    • Developers of Integrations, External Tools, and Apps (OJS, OSF, RSpace, DvUploader, etc.)
    • Developers of Dataverse API Client Libraries (pyDataverse, etc.)
    • Developers of Dataverse Itself (me and other full and part time contributors)
  • The new "Getting Started" section is intended for researchers and curators and will include common operations such as creating a dataset and uploading files. I could use some help knowing what researchers and curators are often trying to do. Some ideas I picked up from people who came to the talk include:
    • I want to download many files at once.
    • I want to upload many files each with their own description at once.
  • The "Lists of Dataverse APIs" write up is new. I recognize that people have had a hard time knowing what's even possible via API. I pointed out the comment at Use OpenAPI standard for Dataverse API's (Swagger) #5794 (comment) that shows that getting a complete list in Swagger format is technically possible in an automated way if we deploy Dataverse to Payara.
  • The "Examples" section is just a link to "Getting Started" which is where I plan to put examples. I haven't actually written any examples yet.
  • The "Frequently Asked Questions" section is also new. I could use help knowing what questions are frequently asked. One suggestion was knowing what's newly available in APIs so we're thinking we might add an API changelog.
  • For support teams and superusers I stubbed out a couple questions under the (existing) "troubleshooting" page in the API Guide. These are the questions we came up with but I don't know what else support teams encounter so suggestions are very welcome:
    • My Dataset Is Locked And Cannot Be Edited or Published
    • Someone Created Spam Datasets and I Need to Delete Them
    • I need to convert my account
    • I want to identify test content (over three years old, for example) and delete it.
  • We talked a bit about what's not possible via API. Right now I have a "Tasks That Cannot Be Automated Via API" stub under "getting started" and in some cases, the task can't be done through the GUI either ("unpublish" is an example).
  • I recognize that the API Guide is not very consistent. Color coding was suggested so API users know when then need to replace variables with DOIs or whatever. We also talked about how it's unfortunate that many curl commands are so long they scroll off the screen. Maybe this can be fixed with CSS.

For anyone who attended (thanks!) please feel free to add comments here.

I'll get to work on that pull request to get my proposed changes into the API Guide. 😄

@pdurbin
Copy link
Member Author

pdurbin commented Aug 19, 2019

I recognize that the API Guide is not very consistent. Color coding was suggested so API users know when then need to replace variables with DOIs or whatever. We also talked about how it's unfortunate that many curl commands are so long they scroll off the screen. Maybe this can be fixed with CSS.

I wanted to mention that I'm attempting to fix both problems. Note that in the example below, color highlighting has been added for variables and long lines wrap across multiple lines:

Screen Shot 2019-08-19 at 12 31 31 PM

@pdurbin
Copy link
Member Author

pdurbin commented Aug 20, 2019

I just created pull request #6107 and I'd love feedback. I'm happy to add on to it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants