Skip to content

Add API documentation #132

@louispotok

Description

@louispotok

Hello! I'm just discovering Curate Science, and I'm interested in building a small application on top of the API. This issue suggests improvements to the API documentation. If supporting the API is not a priority, I think the minimum would be to say that clearly somewhere in the documentation, at least. And please let me know if there's a better place to start this conversation!


The FAQ says the data is "accessible via an open API (see our GitHub repo for details)" but the repo itself doesn't have any documentation or links to documentation as far as I can see.

Given the info that the project uses the Django REST framework, I was able to figure out the URL for the autogenerated docs here, which are a great start.

Given that the API is mentioned on the website, I think it would make sense to add an API section to the README, and perhaps more about it in the main FAQ as well. That would be most helpful if it included:

  1. A link to the autogenerated docs, or any other documentation that might be available.
  2. A statement about the current status of the API (is it supported, is it expected to work, any known issues etc)
  3. Info on where to ask additional questions (if appropriate).

And then, maybe this deserves a followup issue since I suppose it would be a longer project, but depending on the degree to which you intend to support the API, more documentation about the specific options (either maintained as text, or as part of the autogenerated docs) would be great as well. For example, using the docs I was able to list articles by running a GET request to https://curatescience.org/api/articles/. But looking at the network calls on this page, I see the following request being made:
https://curatescience.org/api/articles/?ordering=created&page_size=10&transparency=open_code&transparency=open_data&transparency=open_materials

AFAICT there is no way for an API developer to see all these options or know what they mean without digging into the codebase itself. I would have expected all the possible options to be described in the documentation -- it's possible I'm missing something, though!


Anyway, hope this was helpful. Happy to contribute on some of this as well to the extent possible.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions