Project

Profile

Help

Task #2091

Create a plan for the REST API in 3.0

Added by mhrivnak over 3 years ago. Updated 6 months ago.

Status:
CLOSED - DUPLICATE
Priority:
Normal
Assignee:
Category:
-
Sprint/Milestone:
Start date:
Due date:
% Done:

0%

Platform Release:
Blocks Release:
Backwards Incompatible:
No
Groomed:
No
Sprint Candidate:
Yes
Tags:
QA Contact:
Complexity:
Smash Test:
Verified:
No
Verification Required:
No
Sprint:

Description

There seems to be agreement on using the django rest framework. These questions need to be answered:

  • Which version and why?
  • How do we communicate to developers how to document the REST API?
  • How will docs get built and distributed?
  • How will search work, and how will we determine which fields to make searchable on each model?
  • What is the best option for auto-generating client libraries?

Below are notes from the team:

Q: Will we definitely use django-rest-framework (DRF)? What version?
Yes. The latest version of DRF supports Django 1.8+, is not packaged in Fedora, and is currently at major version 3 (3.4.0). This is the version we should target.
Q: How will docs be generated?
Docs for API endpoints are generated using the docstring of the View class that provides that endpoint. Visiting the endpoint using a browser will render the docs, and DRF also works with swagger and other API docs generation tools to put all the docs in a single browseable place.
http://www.django-rest-framework.org/topics/documenting-your-api/
Q: How will search work? How will we ensure we meet user needs?
Investigation is still needed here. Assuming that we don't really need full-blown "full text" search with stemming features, we can likely get everything we need using the django-filter plugin, which DRF supports.
https://django-filter.readthedocs.io/en/latest/
http://www.django-rest-framework.org/api-guide/filtering/#djangofilterbackend
Q: Can we auto-generate a client library or similar?
This is a major feature that came with DRF 3.4:
http://www.django-rest-framework.org/topics/3.4-announcement/#schemas-client-libraries
http://www.django-rest-framework.org/topics/api-clients/#client-side-core-api

Checklist


Related issues

Duplicates Pulp - Task #1873: Plan REST API for 3.0 CLOSED - CURRENTRELEASE Actions

History

#1 Updated by mhrivnak over 3 years ago

  • Blocked by Task #2090: Create a plan for user/auth in 3.0 added

#2 Updated by semyers about 3 years ago

  • Status changed from NEW to ASSIGNED
  • Assignee set to semyers
  • Tags Pulp 3 added

#3 Updated by semyers about 3 years ago

  • Duplicates Task #1873: Plan REST API for 3.0 added

#4 Updated by mhrivnak about 3 years ago

  • Blocked by deleted (Task #2090: Create a plan for user/auth in 3.0)

#5 Updated by mhrivnak about 3 years ago

  • Status changed from ASSIGNED to CLOSED - DUPLICATE

#6 Updated by daviddavis 6 months ago

  • Sprint/Milestone set to 3.0

#7 Updated by bmbouter 6 months ago

  • Tags deleted (Pulp 3)

Please register to edit this issue

Also available in: Atom PDF