File tree Expand file tree Collapse file tree
openedx_authz/rest_api/v1 Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1010import edx_api_doc_tools as apidocs
1111from django .contrib .auth import get_user_model
1212from django .http import HttpRequest
13+ from edx_api_doc_tools import schema_for
1314from organizations .models import Organization
1415from rest_framework import filters , generics , status
1516from rest_framework .response import Response
@@ -454,6 +455,18 @@ def get(self, request: HttpRequest) -> Response:
454455
455456
456457@view_auth_classes ()
458+ @schema_for (
459+ "get" ,
460+ parameters = [
461+ apidocs .query_parameter ("search" , str , description = "Filter orgs by name or short_name" ),
462+ apidocs .query_parameter ("page" , int , description = "Page number for pagination" ),
463+ apidocs .query_parameter ("page_size" , int , description = "Number of items per page" ),
464+ ],
465+ responses = {
466+ status .HTTP_200_OK : OrganizationSerializer (many = True ),
467+ status .HTTP_401_UNAUTHORIZED : "The user is not authenticated" ,
468+ },
469+ )
457470class OrgsAPIView (generics .ListAPIView ):
458471 """
459472 API view for listing orgs
You can’t perform that action at this time.
0 commit comments