{"_id":"559a9069155eef1700f4e68a","__v":0,"category":{"_id":"543435b1edce040800409240","project":"54343170fa5527080064f449","version":"54343531bfaa3d0800c4d4af","__v":17,"pages":["5434906a5b10711400c6c45b","543492315b10711400c6c474","5480a347a3e4ea22000976c4","5480a36ea3e4ea22000976c5","5480a568e952bb1a006b31fb","54ae8b0686f2690b0072b76f","54aeac7b86f2690b0072b7ac","54aeae133697fc1600d894e3","54aed028194a5f1f00a1d172","54aed212194a5f1f00a1d176","54aedfb4194a5f1f00a1d199","54aee0eb194a5f1f00a1d19e","54aee1aa194a5f1f00a1d1a3","54bd5f54c264d50c00d9ef7e","54bd5f5aa0d4080c005f5449","54bd6b1fc264d50c00d9ef8e","559a9069155eef1700f4e68a"],"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2014-10-07T18:49:21.998Z","from_sync":false,"order":2,"slug":"assets","title":"Assets"},"version":{"_id":"54343531bfaa3d0800c4d4af","project":"54343170fa5527080064f449","__v":27,"forked_from":"54343170fa5527080064f44c","createdAt":"2014-10-07T18:47:13.086Z","releaseDate":"2014-10-07T18:47:13.086Z","categories":["54343531bfaa3d0800c4d4b0","543435b1edce040800409240","543435b9edce040800409241","543435bcedce040800409243","543435bfedce040800409244","543435c2edce040800409245","54370cc426469424002a6dfa","54370cf026469424002a6dfd","5437129d26469424002a6e2f","543712d226469424002a6e30","5480c8fd74904f1a00053c86","54aafc6eefb39016009e4d71","54ac1d36de18cc1400226e01","54ad59369219922100751732","54b41bcf4f25cb1600518d2c","54b533a3a806f40c0050d53c","54b54bbf96fe3c0b00d38d2a","54b688a27379a90c00f53a8a","54b699efbc1a46160005edfa","54b8191691011f0b00068804","54bfb002d03bfc0d0000e814","54bfb33ed03bfc0d0000e816","55a3e94e912a6e2300882cdb","55a56c370f354f0d00fd02a8","55e85ad034516037002e9325","5638ecb62fc5520d001a4cf9","572cba2fc310640e008f63d5"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"3.0.0","version":"3.0"},"project":"54343170fa5527080064f449","parentDoc":null,"user":"54343147fa5527080064f43f","updates":[],"next":{"pages":[],"description":""},"createdAt":"2015-07-06T14:27:53.053Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":15,"body":"MediaSilo can return standard search facets to make navigating large data sets easy. To return facets, simply add the query parameter: includeAggregates=true.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"GET /v3/assets?_pageSize=100&_page=1&_includeAggregates=true\",\n      \"language\": \"http\"\n    }\n  ]\n}\n[/block]\nThe response object differs from the default asset response object since it now wraps assets as entities. See example below:\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"total\\\": 4614,\\n  \\\"aggregates\\\": {\\n    \\\"tags\\\": [\\n      {\\n        \\\"total\\\": 324,\\n        \\\"url\\\": \\\"url-to-new-search\\\",\\n        \\\"key\\\": \\\"ocean\\\"\\n      }\\n    ],\\n    \\\"uploadedBy\\\": [\\n      {\\n        \\\"total\\\": 3523,\\n        \\\"url\\\": \\\"url-to-new-search\\\",\\n        \\\"key\\\": \\\"kaipradel\\\"\\n      }\\n    ],\\n    \\\"approvalStatus\\\": [\\n      {\\n        \\\"total\\\": 4455,\\n        \\\"url\\\": \\\"url-to-new-search\\\",\\n        \\\"key\\\": \\\"none\\\"\\n      }\\n    ],\\n    \\\"type\\\": [\\n      {\\n        \\\"total\\\": 2666,\\n        \\\"url\\\": \\\"url-to-new-search\\\",\\n        \\\"key\\\": \\\"video\\\"\\n      }\\n    ]\\n  },\\n  \\\"entities\\\": [\\n    #ARRAY OF ASSETS\\n  ]\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\nEach aggregate contains a total number of assets found for a specific facet, a self-documenting URL that can be passed to the api directly, and a key.\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Aggregate Name\",\n    \"h-1\": \"Description\",\n    \"0-0\": \"tags\",\n    \"0-1\": \"Any tag used on an asset. Note that MediaSilo breaks tags down. For Example: \\\"Location Shots Season 7\\\" would be broken down into Location, Shots, Season, 7. This allows a user to search for individual works and provides more flexibility with tags.\",\n    \"1-0\": \"uploadedBy\",\n    \"1-1\": \"User ids of the user who uploaded content.\",\n    \"2-0\": \"approvalStatus\",\n    \"2-1\": \"Non, Pending, Rejected\",\n    \"3-0\": \"type\",\n    \"3-1\": \"video, image, archive, video, document\"\n  },\n  \"cols\": 2,\n  \"rows\": 4\n}\n[/block]","excerpt":"","slug":"facets--filters","type":"basic","title":"Facets / Filters"}
MediaSilo can return standard search facets to make navigating large data sets easy. To return facets, simply add the query parameter: includeAggregates=true. [block:code] { "codes": [ { "code": "GET /v3/assets?_pageSize=100&_page=1&_includeAggregates=true", "language": "http" } ] } [/block] The response object differs from the default asset response object since it now wraps assets as entities. See example below: [block:code] { "codes": [ { "code": "{\n \"total\": 4614,\n \"aggregates\": {\n \"tags\": [\n {\n \"total\": 324,\n \"url\": \"url-to-new-search\",\n \"key\": \"ocean\"\n }\n ],\n \"uploadedBy\": [\n {\n \"total\": 3523,\n \"url\": \"url-to-new-search\",\n \"key\": \"kaipradel\"\n }\n ],\n \"approvalStatus\": [\n {\n \"total\": 4455,\n \"url\": \"url-to-new-search\",\n \"key\": \"none\"\n }\n ],\n \"type\": [\n {\n \"total\": 2666,\n \"url\": \"url-to-new-search\",\n \"key\": \"video\"\n }\n ]\n },\n \"entities\": [\n #ARRAY OF ASSETS\n ]\n}", "language": "json" } ] } [/block] Each aggregate contains a total number of assets found for a specific facet, a self-documenting URL that can be passed to the api directly, and a key. [block:parameters] { "data": { "h-0": "Aggregate Name", "h-1": "Description", "0-0": "tags", "0-1": "Any tag used on an asset. Note that MediaSilo breaks tags down. For Example: \"Location Shots Season 7\" would be broken down into Location, Shots, Season, 7. This allows a user to search for individual works and provides more flexibility with tags.", "1-0": "uploadedBy", "1-1": "User ids of the user who uploaded content.", "2-0": "approvalStatus", "2-1": "Non, Pending, Rejected", "3-0": "type", "3-1": "video, image, archive, video, document" }, "cols": 2, "rows": 4 } [/block]