@@ -2,7 +2,7 @@ openapi: 3.0.2
22info :
33 title : Catroweb API
44 description : API for the Catrobat Share Platform
5- version : " v1.0.57 "
5+ version : " v1.0.58 "
66 termsOfService : ' https://share.catrob.at/pocketcode/termsOfUse'
77 contact :
88 name : Catrobat
3434 description : Utility frunctionality for infrastructure
3535 - name : Notifications
3636 description : Everything related for notifications
37+ - name : Search
38+ description : Everything related to searching
3739
3840paths :
3941
@@ -905,6 +907,40 @@ paths:
905907 ' 406 ' :
906908 $ref : ' #/components/responses/NotAcceptable'
907909
910+ # #####################################################
911+ # Search
912+ # ##
913+ /search :
914+ get :
915+ tags :
916+ - Search
917+ summary : Search for projects, users,...
918+ parameters :
919+ - name : query
920+ in : query
921+ required : true
922+ schema :
923+ type : string
924+ - $ref : ' #/components/parameters/SearchType'
925+ - $ref : ' #/components/parameters/Limit'
926+ - $ref : ' #/components/parameters/Offset'
927+ responses :
928+ ' 200 ' :
929+ description : OK
930+ content :
931+ application/json :
932+ schema :
933+ $ref : ' #/components/schemas/SearchResponse'
934+ headers :
935+ X-Response-Hash :
936+ schema :
937+ type : string
938+ example : ' 56asfd5a56sfd564a56dsf65a56sdf'
939+ description : ' MD5 Hash of response body. Used for caching responses.'
940+ ' 400 ' :
941+ $ref : ' #/components/responses/BadRequest'
942+ ' 406 ' :
943+ $ref : ' #/components/responses/NotAcceptable'
908944
909945components :
910946
@@ -1063,6 +1099,19 @@ components:
10631099 To ensure correct results use the following format '[0-9]\.[0-9]{3}'
10641100 example : ' 0.999'
10651101
1102+ # #
1103+ # Search specific
1104+ #
1105+ SearchType :
1106+ name : type
1107+ in : query
1108+ schema :
1109+ type : string
1110+ enum :
1111+ - all
1112+ - projects
1113+ - users
1114+
10661115 schemas :
10671116
10681117 # #############################################
@@ -1655,3 +1704,26 @@ components:
16551704 type : string
16561705 example : https://www.surveylegend.com/survey/#/d29yZHByZXNzMTQzODU2~-MRPPYfbYj7-rPUTK3HH
16571706 description : Url to a survey for the given language
1707+
1708+ # #####################################################
1709+ # Search Schemas
1710+ # ##
1711+ SearchResponse :
1712+ type : object
1713+ properties :
1714+ projects :
1715+ type : array
1716+ description : Array of projects
1717+ items :
1718+ $ref : ' #/components/schemas/ProjectResponse'
1719+ projectsTotal :
1720+ type : integer
1721+ example : 15
1722+ users :
1723+ type : array
1724+ description : Array of users
1725+ items :
1726+ $ref : ' #/components/schemas/BasicUserDataResponse'
1727+ usersTotal :
1728+ type : integer
1729+ example : 15
0 commit comments