v11

OpenAPI 3.0.3raw.githubusercontent.com2024-01-1200163.6 KB
Collections

Repository ranking by prs

Rank the GitHub repositories in the specified collection according to the number of pull requests.

get/collections/{collection_id}/ranking_by_prs/

Path parameters

collection_idnumber required

The ID of collection

Query parameters

period'past_28_days' | 'past_month'

The period of the range.

Response

Default Response

type'sql_endpoint' required

The type of the endpoint.

Example response

{
  "type": "sql_endpoint",
  "data": {
    "columns": [
      {
        "col": "repo_id",
        "data_type": "BIGINT",
        "nullable": false
      },
      {
        "col": "repo_name",
        "data_type": "VARCHAR",
        "nullable": false
      },
      {
        "col": "current_period_growth",
        "data_type": "BIGINT",
        "nullable": false
      },
      {
        "col": "current_period_rank",
        "data_type": "BIGINT",
        "nullable": false
      },
      {
        "col": "past_period_growth",
        "data_type": "BIGINT",
        "nullable": false
      },
      {
        "col": "past_period_rank",
        "data_type": "BIGINT",
        "nullable": false
      },
      {
        "col": "growth_pop",
        "data_type": "DECIMAL",
        "nullable": false
      },
      {
        "col": "rank_pop",
        "data_type": "BIGINT",
        "nullable": false
      },
      {
        "col": "total",
        "data_type": "BIGINT",
        "nullable": false
      }
    ],
    "rows": [
      {
        "repo_id": "16563587",
        "repo_name": "cockroachdb/cockroach",
        "current_period_growth": "677",
        "past_period_growth": "729",
        "growth_pop": "-7.13",
        "rank_pop": "0",
        "total": "54541",
        "current_period_rank": "1",
        "past_period_rank": "1"
      },
      {
        "repo_id": "60246359",
        "repo_name": "clickhouse/clickhouse",
        "current_period_growth": "268",
        "past_period_growth": "296",
        "growth_pop": "-9.46",
        "rank_pop": "-1",
        "total": "16732",
        "current_period_rank": "2",
        "past_period_rank": "3"
      },
      {
        "repo_id": "41986369",
        "repo_name": "pingcap/tidb",
        "current_period_growth": "263",
        "past_period_growth": "214",
        "growth_pop": "22.90",
        "rank_pop": "-3",
        "total": "15622",
        "current_period_rank": "3",
        "past_period_rank": "6"
      },
      {
        "repo_id": "105944401",
        "repo_name": "yugabyte/yugabyte-db",
        "current_period_growth": "246",
        "past_period_growth": "298",
        "growth_pop": "-17.45",
        "rank_pop": "2",
        "total": "15079",
        "current_period_rank": "4",
        "past_period_rank": "2"
      },
      {
        "repo_id": "208728772",
        "repo_name": "milvus-io/milvus",
        "current_period_growth": "234",
        "past_period_growth": "237",
        "growth_pop": "-1.27",
        "rank_pop": "0",
        "total": "8675",
        "current_period_rank": "5",
        "past_period_rank": "5"
      },
      {
        "repo_id": "507775",
        "repo_name": "elastic/elasticsearch",
        "current_period_growth": "214",
        "past_period_growth": "144",
        "growth_pop": "48.61",
        "rank_pop": "-3",
        "total": "31578",
        "current_period_rank": "6",
        "past_period_rank": "9"
      }
    ],
    "result": {
      "code": 200,
      "message": "Query OK!",
      "start_ms": 1690957407469,
      "end_ms": 1690957407499,
      "latency": "30ms",
      "row_count": 7,
      "row_affect": 0,
      "limit": 50,
      "databases": [
        "gharchive_dev"
      ]
    }
  }
}