{"metadata":{"image":[],"title":"","description":""},"api":{"url":"","auth":"required","params":[],"settings":"","results":{"codes":[]}},"next":{"description":"","pages":[]},"title":"Searching Collections with Gooru API","type":"basic","slug":"searching-collections-with-gooru-api","excerpt":"How to use Gooru's Search Collections API","body":"[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"Authentication\"\n}\n[/block]\nAll Gooru API calls must be authenticated using Access tokens. To acquire an access token refer to this [document](http://readme.gooru.org/docs/generate-authenticate-user-access-token-2) to be used for authorization for search API.\n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"API Syntax\"\n}\n[/block]\n{REST_END_POINT}/gooru-search/rest/v2/search/{type}?pageNum={pageNum}&pageSize={pageSize}&q={search term}\n\nExample:\n\n{REST_END_POINT}/gooru-search/rest/v2/search/scollection?pageNum=1&pageSize=20&q=water\n\n[block:api-header]\n{\n \"title\": \"Input Parameters\"\n}\n[/block]\n\n[block:parameters]\n{\n \"data\": {\n \"0-0\": \"pageSize\",\n \"1-0\": \"startAt\",\n \"2-0\": \"pageNum\",\n \"3-0\": \"q\",\n \"4-0\": \"Authorization\",\n \"5-0\": \"type\",\n \"h-0\": \"Name\",\n \"h-1\": \"Data Type\",\n \"h-2\": \"Param Type\",\n \"h-3\": \"Default Value\",\n \"h-4\": \"Optional?\",\n \"h-5\": \"Allowed Values\",\n \"0-5\": \"Only Integer values 1 to 20\",\n \"1-5\": \"Only Integer values\",\n \"2-5\": \"Only Integer values\",\n \"3-5\": \"Numbers , String, Logical expression(i.e query1 OR query2),Prefix filter query (i.e water:video, ocean:webpage)\\n\\nNote: The query term should be meaningful and must contain more than 3 characters\",\n \"4-5\": \"Session Token obtained from Gooru Core Authentication API. Ex: Authorization: Token MTQ2NjU5MjA3NTQ5NTxhMDI3M2Y3OS05NWZjLTQ0MGItOGEwYy00NzI1NWE2YzcyNzI6YmE5NTZhOTctYWUxNS0xMWU1LWEzMDItZjhhOTYzMDY1OTc2\",\n \"5-5\": \"Only “resource,scollection” values supported. \\n\\nCollection refers to an individual resource, while scollection refers to a collection of resource.\",\n \"0-1\": \"Integer\",\n \"1-1\": \"Integer\",\n \"2-1\": \"Integer\",\n \"3-1\": \"String\",\n \"4-1\": \"String\",\n \"5-1\": \"String\",\n \"0-2\": \"Request Param\",\n \"1-2\": \"Request Param\",\n \"2-2\": \"Request Param\",\n \"3-2\": \"Request Param\",\n \"4-2\": \"Request Header\",\n \"5-2\": \"PathVariable\",\n \"0-3\": \"8\",\n \"1-3\": \"0\",\n \"2-3\": \"1\",\n \"3-3\": \"Nil\",\n \"4-3\": \"Nil\",\n \"5-3\": \"Nil\",\n \"0-4\": \"Yes\",\n \"1-4\": \"Yes\",\n \"2-4\": \"Yes\",\n \"3-4\": \"No\",\n \"4-4\": \"No\",\n \"5-4\": \"No\"\n },\n \"cols\": 6,\n \"rows\": 6\n}\n[/block]\n\n[block:api-header]\n{\n \"title\": \"Search Filters\"\n}\n[/block]\n\n[block:parameters]\n{\n \"data\": {\n \"h-0\": \"Name\",\n \"h-1\": \"Description\",\n \"h-2\": \"Example\",\n \"h-3\": \"Allowed Values\",\n \"1-0\": \"flt.subjectName\",\n \"1-1\": \"Filter using taxonomy subjectName\",\n \"1-2\": \"flt.subjectName=science~~math\",\n \"1-3\": \"Gooru subject names - Math,Science,English language arts, social science\",\n \"2-0\": \"flt.courseName\",\n \"3-0\": \"flt.creator\",\n \"4-0\": \"flt.standard\",\n \"5-0\": \"flt.grade\",\n \"6-0\": \"flt.language\",\n \"7-0\": \"flt.publisher\",\n \"8-0\": \"flt.owner\",\n \"9-0\": \"flt.countryCode\",\n \"2-1\": \"Filter using taxonomy courseName\",\n \"3-1\": \"Filter using creator firstname or lastName or userName or userFullname\",\n \"4-1\": \"Filter by standards\",\n \"4-2\": \"flt.standard=CCSS.M.6.SP.A\",\n \"3-2\": \"flt.creator=John\",\n \"2-2\": \"flt.courseName=Astronomy\",\n \"2-3\": \"Gooru taxonomy course names\",\n \"4-3\": \"Gooru standards\",\n \"5-1\": \"Filter by grade\",\n \"5-2\": \"flt.grade=K-4,12,11\",\n \"6-1\": \"Filter by language\",\n \"6-2\": \"flt.language=eng\",\n \"7-1\": \"Filter by publisher\",\n \"7-2\": \"flt.publisher=The Metropolitan Museum of Art\",\n \"8-1\": \"Filter by owner firstname or lastName or userName or userFullname\",\n \"8-2\": \"flt.owner=Rocky\",\n \"9-1\": \"Filter by info.countryCode\",\n \"9-2\": \"flt.countryCode=US\",\n \"0-0\": \"flt.collectionType\",\n \"0-1\": \"Filter by type of collection\",\n \"0-2\": \"flt.collectionType=collection\",\n \"0-3\": \"collection, assessment\"\n },\n \"cols\": 4,\n \"rows\": 10\n}\n[/block]\n\n[block:api-header]\n{\n \"title\": \"Sample Request\"\n}\n[/block]\n\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"curl -i 'http://gooru.org/gooru-search/rest/v2/search/scollection?q=solar&flt.collectionType=collection&start=1&length=20' -H 'Authorization: Token MTQ4OTU1NzEzMzcyMTphbm9ueW1vdXM6YmE5NTZhOTctYWUxNS0xMWU1LWEzMDItZjhhOTYzMDY1OTc2'\",\n \"language\": \"curl\",\n \"name\": \"Sample Request to Search Collections\"\n }\n ]\n}\n[/block]\n\n[block:api-header]\n{\n \"title\": \"Understanding Search Results\"\n}\n[/block]\n\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"{\\n\\t\\\"executionTime\\\": 15,\\n\\t\\\"query\\\": {\\n\\t\\t\\\"rewrittenQueryString\\\": \\\"solar\\\",\\n\\t\\t\\\"userQueryString\\\": \\\"solar\\\"\\n\\t},\\n\\t\\\"resultCount\\\": 1,\\n\\t\\\"searchCount\\\": 0,\\n\\t\\\"searchResults\\\": [{\\n\\t\\t\\\"addDate\\\": \\\"2013-03-19T05:56:51Z\\\",\\n\\t\\t\\\"assetURI\\\": null,\\n\\t\\t\\\"audience\\\": null,\\n\\t\\t\\\"averageTimeSpent\\\": null,\\n\\t\\t\\\"category\\\": \\\"noQuestion\\\",\\n\\t\\t\\\"collaboratorCount\\\": 2,\\n\\t\\t\\\"collaboratorIds\\\": [\\\"e6f39b7f-82bf-44d8-83f8-c41d8c1cdc8f\\\", \\\"e726e79f-b350-4153-b2f6-1f53456fe568\\\"],\\n\\t\\t\\\"collectionItemCount\\\": 0,\\n\\t\\t\\\"collectionItems\\\": [],\\n\\t\\t\\\"collectionType\\\": \\\"collection\\\",\\n\\t\\t\\\"contentId\\\": 0,\\n\\t\\t\\\"contentOrganizationCode\\\": null,\\n\\t\\t\\\"contentOrganizationName\\\": null,\\n\\t\\t\\\"contentOrganizationUid\\\": null,\\n\\t\\t\\\"course\\\": null,\\n\\t\\t\\\"creatorFirstname\\\": \\\"Paul\\\",\\n\\t\\t\\\"creatorId\\\": \\\"bac737f6-4945-4990-b3d6-8c07ec09f9c8\\\",\\n\\t\\t\\\"creatorLastname\\\": \\\"Wong\\\",\\n\\t\\t\\\"creatorProfileImage\\\": null,\\n\\t\\t\\\"creatornameDisplay\\\": \\\"paulwong\\\",\\n\\t\\t\\\"depthOfknowledge\\\": null,\\n\\t\\t\\\"description\\\": \\\"Student will summarize the overall properties of the Sun.\\\",\\n\\t\\t\\\"distinguish\\\": null,\\n\\t\\t\\\"folder\\\": null,\\n\\t\\t\\\"goals\\\": \\\"Student will summarize the overall properties of the Sun.\\\",\\n\\t\\t\\\"gooruUId\\\": \\\"bac737f6-4945-4990-b3d6-8c07ec09f9c8\\\",\\n\\t\\t\\\"grade\\\": \\\"9\\\",\\n\\t\\t\\\"id\\\": \\\"4208ff43-8411-420e-bd93-00681f8dabe1\\\",\\n\\t\\t\\\"instructionalMethod\\\": null,\\n\\t\\t\\\"isFeatured\\\": null,\\n\\t\\t\\\"keyPoints\\\": null,\\n\\t\\t\\\"language\\\": null,\\n\\t\\t\\\"languageObjective\\\": \\\"Student will summarize the overall properties of the Sun.\\\",\\n\\t\\t\\\"lastModified\\\": \\\"2015-07-27T07:36:36Z\\\",\\n\\t\\t\\\"lastModifiedBy\\\": \\\"bac737f6-4945-4990-b3d6-8c07ec09f9c8\\\",\\n\\t\\t\\\"learningAndInovation\\\": null,\\n\\t\\t\\\"libraryNames\\\": null,\\n\\t\\t\\\"license\\\": null,\\n\\t\\t\\\"narrationLink\\\": null,\\n\\t\\t\\\"notes\\\": null,\\n\\t\\t\\\"numberOfResources\\\": null,\\n\\t\\t\\\"profileUserVisibility\\\": false,\\n\\t\\t\\\"publishStatus\\\": \\\"published\\\",\\n\\t\\t\\\"questionCount\\\": \\\"0\\\",\\n\\t\\t\\\"ratings\\\": {\\n\\t\\t\\t\\\"average\\\": 0,\\n\\t\\t\\t\\\"count\\\": 0\\n\\t\\t},\\n\\t\\t\\\"resourceCount\\\": \\\"3\\\",\\n\\t\\t\\\"resultUId\\\": \\\"1decb229-bab6-46b7-8018-10b664ec6465\\\",\\n\\t\\t\\\"scollectionRemixCount\\\": 0,\\n\\t\\t\\\"sharing\\\": \\\"public\\\",\\n\\t\\t\\\"skills\\\": [],\\n\\t\\t\\\"subject\\\": null,\\n\\t\\t\\\"tags\\\": [],\\n\\t\\t\\\"taxonomyDataSet\\\": \\\"{\\\\\\\"subject\\\\\\\":[],\\\\\\\"course\\\\\\\":[],\\\\\\\"domain\\\\\\\":[],\\\\\\\"curriculum\\\\\\\":{\\\\\\\"curriculumCode\\\\\\\":[],\\\\\\\"curriculumDesc\\\\\\\":[],\\\\\\\"curriculumName\\\\\\\":[],\\\\\\\"curriculumInfo\\\\\\\":[]}}\\\",\\n\\t\\t\\\"taxonomySet\\\": {\\n\\t\\t\\t\\\"subject\\\": [],\\n\\t\\t\\t\\\"domain\\\": [],\\n\\t\\t\\t\\\"course\\\": [],\\n\\t\\t\\t\\\"curriculum\\\": {\\n\\t\\t\\t\\t\\\"curriculumName\\\": [],\\n\\t\\t\\t\\t\\\"curriculumCode\\\": [],\\n\\t\\t\\t\\t\\\"curriculumInfo\\\": [],\\n\\t\\t\\t\\t\\\"curriculumDesc\\\": []\\n\\t\\t\\t}\\n\\t\\t},\\n\\t\\t\\\"taxonomySkills\\\": null,\\n\\t\\t\\\"thumbnail\\\": \\\"f000/0735/1339/458e1afe-2b29-49b4-9d5a-464c50f6fe0e.jpg\\\",\\n\\t\\t\\\"thumbnails\\\": null,\\n\\t\\t\\\"title\\\": \\\"Solar Structure\\\",\\n\\t\\t\\\"type\\\": \\\"collection\\\",\\n\\t\\t\\\"userFirstName\\\": \\\"Paul\\\",\\n\\t\\t\\\"userLastName\\\": \\\"Wong\\\",\\n\\t\\t\\\"userProfileImage\\\": null,\\n\\t\\t\\\"usernameDisplay\\\": \\\"paulwong\\\",\\n\\t\\t\\\"viewCount\\\": 28\\n\\t}],\\n\\t\\\"stats\\\": {\\n\\t\\t\\\"pageSize\\\": 1,\\n\\t\\t\\\"totalHitCount\\\": 188,\\n\\t\\t\\\"pageNumber\\\": null\\n\\t},\\n\\t\\\"totalHitCount\\\": 188\\n}\",\n \"language\": \"json\",\n \"name\": \"Sample Response\"\n }\n ]\n}\n[/block]\n\n[block:parameters]\n{\n \"data\": {\n \"h-0\": \"JSON Field\",\n \"h-1\": \"Description\",\n \"0-0\": \"**searchResults** \",\n \"0-1\": \"Search result array object contains all the collection fields check below for all field description\",\n \"1-0\": \"addDate\",\n \"1-1\": \"Collection added date\",\n \"2-0\": \"assetURI\",\n \"2-1\": \"Collection content base file path\",\n \"3-0\": \"collaboratorCount\",\n \"3-1\": \"No of collaborator involved in the collection\",\n \"7-0\": \"id\",\n \"7-1\": \"Unique id of the collection\",\n \"8-0\": \"grade\",\n \"8-1\": \"Grade associated with this collection\",\n \"9-0\": \"instructionalMethod\",\n \"9-1\": \"Collection instructional\",\n \"10-0\": \"lastModified\",\n \"10-1\": \"Last modified date\",\n \"13-0\": \"sharing\",\n \"13-1\": \"Sharing type ‘s public,private,share anyonle with link\",\n \"14-0\": \"thumbnail\",\n \"14-1\": \"Thumbnail details of the collection\",\n \"15-0\": \"title\",\n \"15-1\": \"Title of the collection\",\n \"17-0\": \"viewCount\",\n \"17-1\": \"View count of a collection\",\n \"18-0\": \"**taxonomySet** \",\n \"18-1\": \"Taxonomy info object\",\n \"19-0\": \"taxonomySet->subject\",\n \"19-1\": \"Taxonomy subject that is tagged to particular collection\",\n \"20-0\": \"taxonomySet->course\",\n \"20-1\": \"Taxonomy course that is tagged to particular collection\",\n \"21-0\": \"taxonomySet->domain\",\n \"21-1\": \"Taxonomy domain that is tagged to particular collection\",\n \"22-0\": \"**taxonomySet->curriculum** \",\n \"22-1\": \"Taxonomy curriculum object\",\n \"23-0\": \"taxonomySet->curriculum->curriculumName\",\n \"23-1\": \"Curriculum name\",\n \"24-0\": \"taxonomySet->curriculum->curriculumDesc\",\n \"24-1\": \"Curriculum description\",\n \"25-0\": \"taxonomySet->curriculum->curriculumInfo\",\n \"25-1\": \"Curriculum info object\",\n \"26-0\": \"taxonomySet->curriculum->curriculumCode\",\n \"26-1\": \"Curriculum code\",\n \"27-0\": \"**license** \",\n \"27-1\": \"License object\",\n \"28-0\": \"Licence -> name\",\n \"28-1\": \"Licence name of a collection\",\n \"29-0\": \"Licence -> url\",\n \"29-1\": \"Licence url\",\n \"30-0\": \"**Thumbnails** \",\n \"30-1\": \"Resource thumbnail object\",\n \"31-0\": \"Thumbnails -> defaultImage\",\n \"31-1\": \"Default Image URL of a collection\",\n \"32-0\": \"Thumbnails -> dimensions\",\n \"32-1\": \"ThumbNail Image Size\",\n \"33-0\": \"Thumbnails -> url\",\n \"33-1\": \"ThumbNail URL\",\n \"34-0\": \"**query** \",\n \"34-1\": \"Query object contains details of current search query.\",\n \"35-0\": \"userQueryString\",\n \"35-1\": \"User searched query\",\n \"36-0\": \"rewrittenQueryString\",\n \"36-1\": \"Final query after rewritten by query rewrite process\",\n \"37-0\": \"**stats** \",\n \"37-1\": \"Search hits stats\",\n \"38-0\": \"executionTime\",\n \"38-1\": \"Search response time\",\n \"39-0\": \"pageResultsCount\",\n \"39-1\": \"Search results count on the current page\",\n \"40-0\": \"pageSize\",\n \"40-1\": \"Result count requested by end user\",\n \"41-0\": \"pageNumber\",\n \"41-1\": \"Current page number\",\n \"42-0\": \"totalHitCount\",\n \"42-1\": \"Total hit count of current search\",\n \"4-0\": \"creatorFirstname\",\n \"4-1\": \"First name of the collection creator\",\n \"5-0\": \"creatorId\",\n \"5-1\": \"Gooru User ID of the collection creator\",\n \"6-0\": \"creatorLastname\",\n \"6-1\": \"Last name of the collection creator\",\n \"11-0\": \"questionCount\",\n \"11-1\": \"How many questions in this collection\",\n \"12-0\": \"resourceCount\",\n \"12-1\": \"How many resources in this collection\",\n \"16-0\": \"type\",\n \"16-1\": \"Type of the collection\"\n },\n \"cols\": 2,\n \"rows\": 43\n}\n[/block]","updates":[],"order":1,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"_id":"58c8d9d09396340f003e6af5","createdAt":"2017-03-15T06:06:08.241Z","version":{"version":"1","version_clean":"1.0.0","codename":"","is_stable":false,"is_beta":true,"is_hidden":false,"is_deprecated":false,"categories":["56439dff9eebf70d00490d58","56439e17c92c470d002dec71","564ce88e802cd02100444274","564d07ff3657c43500bf1d33","564d0a312da1982d00b19b64","564d2aa92da1982d00b19b8c","564d30a8b88a37210082253e","564d362c2da1982d00b19ba0","569d664371e3650d00acf018","569d7eacec29360d00f667c9","569d8006ec29360d00f667cb","569d855e0306a10d00ce99b9","569d91d571e3650d00acf04c","569d91eeceb7510d00f2a6a3","569e8c262d320817003b806d","569e8f802d320817003b8072","56b038c914dfea0d0007cf05","5717b4f0681bb41900fc575a","5718e0a4cd483219007c2c9a","571924c8e967cb1700d078e9","571e2648edc4a92b00a4cc65","576a677a6f15260e001f899b","576c5eaf5738570e00ff070f","578d127ed9c55c2000d4f213","579f90927ebe9b0e00059c50","582c0af888708a0f00570a69"],"_id":"56439dff9eebf70d00490d57","createdAt":"2015-11-11T19:58:55.144Z","project":"56439dfe9eebf70d00490d54","releaseDate":"2015-11-11T19:58:55.144Z","__v":26},"__v":0,"parentDoc":null,"project":"56439dfe9eebf70d00490d54","user":"5706dce42138ed0e0060f8ab","githubsync":"","category":{"sync":{"isSync":false,"url":""},"pages":[],"title":"New Search API","slug":"new-search-api","order":18,"from_sync":false,"reference":false,"_id":"576a677a6f15260e001f899b","project":"56439dfe9eebf70d00490d54","version":"56439dff9eebf70d00490d57","createdAt":"2016-06-22T10:24:58.776Z","__v":0}}
Searching Collections with Gooru API
How to use Gooru's Search Collections API