Skip to content

Instantly share code, notes, and snippets.

@bessarabov
Last active October 25, 2019 22:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bessarabov/96d10584577a06bfd9f0790ade38a6aa to your computer and use it in GitHub Desktop.
Save bessarabov/96d10584577a06bfd9f0790ade38a6aa to your computer and use it in GitHub Desktop.

https://explorer.metacpan.org

Endpoint

/v1/release

Request

{
  "aggs": {
    "status": {
      "terms": {
        "field": "status"
      }
    }
  },
  "query": {
    "match_all": {}
  },
  "size": 0
}

Response


{
   "timed_out" : false,
   "aggregations" : {
      "status" : {
         "sum_other_doc_count" : 0,
         "doc_count_error_upper_bound" : 0,
         "buckets" : [
            {
               "key" : "backpan",
               "doc_count" : 192273
            },
            {
               "doc_count" : 99043,
               "key" : "cpan"
            },
            {
               "doc_count" : 36433,
               "key" : "latest"
            }
         ]
      }
   },
   "_shards" : {
      "successful" : 3,
      "failed" : 0,
      "total" : 3
   },
   "hits" : {
      "max_score" : 0.0,
      "hits" : [],
      "total" : 327749
   },
   "took" : 24
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment