-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
docs(api): update api description #13429
base: main
Are you sure you want to change the base?
Conversation
Move the API description string to a separate variable to improve code readability. Add content to the (Open)API description summarized from general sections of the REST API documentation.
Rate limiting can be adjusted in the `settings.py` file; see [Throttling in Django REST framework documentation](https://www.django-rest-framework.org/api-guide/throttling/) | ||
for more details on how to configure it. | ||
|
||
In the Docker container, this can be configured with the [WEBLATE_API_RATELIMIT_ANON]({get_doc_url(page='admin/install/docker', anchor='envvar-WEBLATE_API_RATELIMIT_ANON')}) and the [WEBLATE_API_RATELIMIT_USER]({get_doc_url(page='admin/install/docker', anchor='envvar-WEBLATE_API_RATELIMIT_USER')}) environment variables. |
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.
The anchors for the URLs of both Docker variables actually use the underscore character, but the get_doc_url
function replaces them with hyphens -
.
Weblate's REST API is based on [Django REST framework](https://www.django-rest-framework.org). | ||
You can interact with it on the `/api/` URL path by using the [Weblate Client]({get_doc_url(page='wlc')}) or any third-party REST client of your choice. | ||
|
||
## Authentication |
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.
requests per day. On the other hand, authenticated requests are rate limited | ||
to 5000 requests per hour by default. | ||
|
||
## API rate limiting |
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.
Proposed changes
Checklist
Other information
The rationale behind this change is to help the OpenAPI document stand on its own.
Relates to #12584