-
Notifications
You must be signed in to change notification settings - Fork 42
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
GET categories/<slug> does not work #15
Comments
I think there's maybe a misunderstanding here of what this endpoint is supposed to do. /api/v1/categories/slug - returns with the category object associated to that category slug /api/v1/docs/slug - returns with the doc object associated to the doc slug (which will return with the category id required to update the doc) The category slug isn't typically surfaced by default in the UI, but it can be useful if you wanted to built a wrapper around the API using the category slugs instead of using the ids. Edit: As mentioned in here, that's probably work that should be done via this module so you can safely use category slugs: https://readmeio.canny.io/feature-requests/p/make-export-and-import-formats-consistent. The reason why we didn't do that originally was due to potential ambiguity with what to do when new categories are created vs existing categories being renamed/deleted. |
@domharrington thank you. note that as a workaround I'm perfectly happy with my second option above, document details: category = details.get('category') that works well to retrieve the "category slug" from a "document slug". |
Sorry for referring to the underlying HTTP API again, but in the end this is just a wrapper. I'm using Python to demonstrate my point. If I use:
That will result in an error message, although the page exists and has a category. I can even confirm this by reading slug details for the same doc:
so either I'm doing something fundamentally wrong or the endpoint doesn't work as expected
The text was updated successfully, but these errors were encountered: