openapi: 3.0.3 info: title: OSSInsight Public API description: > Here are documentation about the OSSInsight Public APIs (beta) which help developers integrate OSSInsight data into their applications easily and quickly. ## Usage The OSSInsight Public API is designed to follow the OpenAPI specification and can be accessed by initiating HTTP requests using the command line `curl` or web request libraries in different programming languages. ### Base URL All API requests are based on the following URL: ```shell https://api.ossinsight.io/public ``` ### Authentication No authentication is required for beta version of public APIs, but there are [rate limits](#rate-limit) for API requests. > Note: > We will add authentication way for larger API requests in future releases. ### Rate Limit For each IP address, the rate limit allows for up to **600 requests per hour**. ### Example For example, if you want to know what countries the stargazers in the `pingcap/tidb` repository are located in, you can make a request using the curl command as follows: ```shell curl https://api.ossinsight.io/public/repos/pingcap/tidb/stargazers/countries ```
Example Response ```json { "type": "sql_endpoint", "data": { "columns": [ { "col": "country_or_area", "data_type": "CHAR", "nullable": true }, { "col": "count", "data_type": "BIGINT", "nullable": true }, { "col": "percentage", "data_type": "DECIMAL", "nullable": true } ], "rows": [ { "count": "9183", "country_or_area": "CN", "percentage": "0.5936" }, { "count": "1542", "country_or_area": "US", "percentage": "0.0997" }, { "count": "471", "country_or_area": "JP", "percentage": "0.0304" } ], "result": { "code": 200, "message": "Query OK!", "start_ms": 1690351487809, "end_ms": 1690351487930, "latency": "121ms", "row_count": 132, "row_affect": 0, "limit": 300, "databases": [ "gharchive_dev" ] } } } ```
## Categories ```mdx-code-block import DocCardList from '@theme/DocCardList'; import {useCurrentSidebarCategory} from '@docusaurus/theme-common'; { // Exclude Introduction and Showcase pages return item.docId !== 'api/showcase' && item.docId !== 'api/ossinsight-public-api'; })}/> ``` ## Request New API If the API in the documentation does not meet your query requirements, please contact us as follows: - Email us at ossinsight@pingcap.com - Open an issue in the [OSSInsight GitHub repository](https://github.com/pingcap/ossinsight/issues/new?assignees=&labels=type%2Ffeature&projects=&template=feature_request.md&title=New%20API) version: 0.0.1 components: schemas: {} paths: /trends/repos/: get: operationId: list-trending-repos summary: List trending repos tags: - Trends description: >- Trending repos is an open source alternative to GitHub trends, which showcases recently popular open source projects in the GitHub community. ☁️ Daily run on [TiDB Cloud](https://tidbcloud.com/?utm_source=ossinsight&utm_medium=ossinsight_api), analyze upon dataset that has over 6 billion GitHub events. parameters: - schema: type: string enum: - past_24_hours - past_week - past_month - past_3_months default: past_24_hours in: query name: period required: false description: Specify the period of time to calculate trending repos. - schema: type: string enum: - All - JavaScript - Java - Python - PHP - C++ - C# - TypeScript - Shell - C - Ruby - Rust - Go - Kotlin - HCL - PowerShell - CMake - Groovy - PLpgSQL - TSQL - Dart - Swift - HTML - CSS - Elixir - Haskell - Solidity - Assembly - R - Scala - Julia - Lua - Clojure - Erlang - Common Lisp - Emacs Lisp - OCaml - MATLAB - Objective-C - Perl - Fortran default: All in: query name: language required: false description: Specify using which programming language to filter trending repos. If not specified, all languages will be included. responses: "200": description: Default Response content: application/json: schema: type: object required: - type - data properties: type: type: string description: The type of the endpoint. enum: - sql_endpoint example: sql_endpoint data: type: object required: - columns - rows - result properties: columns: type: array items: type: object required: - col - data_type - nullable properties: col: type: string description: The name of the column in the query result. data_type: type: string enum: - CHAR - BIGINT - DECIMAL - INT - UNSIGNED BIGINT - TINYINT - TIMESTAMP - TEXT - VARCHAR - DATETIME - DOUBLE - FLOAT - DATE - TIME - YEAR - MEDIUMINT - SMALLINT - BIT - BINARY - VARBINARY - JSON - ENUM - SET - TINYTEXT - MEDIUMTEXT - LONGTEXT - TINYBLOB - MEDIUMBLOB - BLOB - LONGBLOB description: The data type of the column. nullable: type: boolean description: Whether the column is nullable. example: - col: repo_id data_type: INT nullable: true - col: repo_name data_type: VARCHAR nullable: true - col: primary_language data_type: VARCHAR nullable: true - col: description data_type: VARCHAR nullable: true - col: stars data_type: INT nullable: true - col: forks data_type: INT nullable: true - col: pull_requests data_type: INT nullable: true - col: pushes data_type: INT nullable: true - col: total_score data_type: DOUBLE nullable: true - col: contributor_logins data_type: VARCHAR nullable: true - col: collection_names data_type: VARCHAR nullable: true rows: type: array items: type: object properties: repo_id: type: string description: ID of the repo repo_name: type: string description: Name of the repo primary_language: type: string description: Primary programing language used by the repo description: type: string description: Description of the repo stars: type: string description: Number of stars in the period forks: type: string description: Number of forks in the period pull_requests: type: string description: Number of pull requests in the period pushes: type: string description: Number of pushes in the period total_score: type: string description: Total score of the repo contributor_logins: type: string description: Comma separated list of active contributor logins collection_names: type: string description: Comma separated list of collection names example: - collection_names: CICD contributor_logins: cplee,nektos-ci,usagirei,ae-ou,MrNossiom description: Run your GitHub Actions locally 🚀 forks: "5" primary_language: Go pull_requests: "6" pushes: "17" repo_id: "163883279" repo_name: nektos/act stars: "395" total_score: "1565.7526" - collection_names: ChatGPT Alternatives contributor_logins: antonkesy,ruanslv,starplatinum3,AlexandroLuis,realhaik description: Inference code for LLaMA models forks: "48" primary_language: Python pull_requests: "41" pushes: "7" repo_id: "601538369" repo_name: facebookresearch/llama stars: "209" total_score: "1079.0274" - collection_names: Stable Diffusion Ecosystem contributor_logins: atiorh,SaladDays831,ZachNagengast,TimYao18,vzsg description: Stable Diffusion with Core ML on Apple Silicon forks: "5" primary_language: Python pull_requests: "7" pushes: "5" repo_id: "566576114" repo_name: apple/ml-stable-diffusion stars: "99" total_score: "575.2498" - collection_names: Stable Diffusion Ecosystem contributor_logins: danonymous856,EvilPhi666,FurkanGozukara,Prathyusha-98,ca-kishida description: High-Resolution Image Synthesis with Latent Diffusion Models forks: "6" primary_language: Python pull_requests: "2" pushes: "" repo_id: "569927055" repo_name: Stability-AI/stablediffusion stars: "75" total_score: "483.0236" result: type: object properties: code: type: number description: The code of the response. message: type: string description: The message of the response. start_ms: type: number description: The start time of the query in milliseconds. end_ms: type: number description: The end time of the query in milliseconds. latency: type: string description: The latency of the query. row_count: type: number description: The number of rows in the query result. row_affect: type: number description: The number of rows affected by the query. limit: type: number description: The maximum number of rows in the query result. databases: type: array description: The databases used in the query. items: type: string example: code: 200 message: Query OK! start_ms: 1690957407469 end_ms: 1690957407499 latency: 30ms row_count: 4 row_affect: 0 limit: 50 databases: - gharchive_dev "/repos/{owner}/{repo}/issue_creators/countries/": get: operationId: list-countries-of-issue-creators summary: List countries/regions of issue creators tags: - Issue Creators description: List countries/regions of stargazers for the specified repository. parameters: - schema: type: string default: 2000-01-01 in: query name: from required: false description: The start date of the range. - schema: type: string default: 2099-01-01 in: query name: to required: false description: The end date of the range. - schema: type: string example: pingcap in: path name: owner required: true description: The owner of the repo. - schema: type: string example: tidb in: path name: repo required: true description: The name of the repo. responses: "200": description: Default Response content: application/json: schema: type: object required: - type - data properties: type: type: string description: The type of the endpoint. enum: - sql_endpoint example: sql_endpoint data: type: object required: - columns - rows - result properties: columns: type: array items: type: object required: - col - data_type - nullable properties: col: type: string description: The name of the column in the query result. data_type: type: string enum: - CHAR - BIGINT - DECIMAL - INT - UNSIGNED BIGINT - TINYINT - TIMESTAMP - TEXT - VARCHAR - DATETIME - DOUBLE - FLOAT - DATE - TIME - YEAR - MEDIUMINT - SMALLINT - BIT - BINARY - VARBINARY - JSON - ENUM - SET - TINYTEXT - MEDIUMTEXT - LONGTEXT - TINYBLOB - MEDIUMBLOB - BLOB - LONGBLOB description: The data type of the column. nullable: type: boolean description: Whether the column is nullable. example: - col: country_code data_type: CHAR nullable: true - col: percentage data_type: DECIMAL nullable: true - col: issue_creators data_type: BIGINT nullable: true rows: type: array items: type: object properties: country_code: type: string description: Country/region code issue_creators: type: string description: Number of issue creators from the country/region percentage: type: string description: Percentage of issue creators from the country/region example: - country_code: CN issue_creators: "7131" percentage: "0.8749" - country_code: US issue_creators: "316" percentage: "0.0388" - country_code: CA issue_creators: "243" percentage: "0.0298" - country_code: NL issue_creators: "223" percentage: "0.0274" result: type: object properties: code: type: number description: The code of the response. message: type: string description: The message of the response. start_ms: type: number description: The start time of the query in milliseconds. end_ms: type: number description: The end time of the query in milliseconds. latency: type: string description: The latency of the query. row_count: type: number description: The number of rows in the query result. row_affect: type: number description: The number of rows affected by the query. limit: type: number description: The maximum number of rows in the query result. databases: type: array description: The databases used in the query. items: type: string example: code: 200 message: Query OK! start_ms: 1690957407469 end_ms: 1690957407499 latency: 30ms row_count: 4 row_affect: 0 limit: 50 databases: - gharchive_dev "/repos/{owner}/{repo}/issue_creators/organizations/": get: operationId: list-organizations-of-issue-creators summary: List organizations of stargazers tags: - Issue Creators description: List organizations of stargazers for the specified repository. parameters: - schema: type: string default: 2000-01-01 in: query name: from required: false description: The start date of the range. - schema: type: string default: 2099-01-01 in: query name: to required: false description: The end date of the range. - schema: type: string example: pingcap in: path name: owner required: true description: The owner of the repo. - schema: type: string example: tidb in: path name: repo required: true description: The name of the repo. responses: "200": description: Default Response content: application/json: schema: type: object required: - type - data properties: type: type: string description: The type of the endpoint. enum: - sql_endpoint example: sql_endpoint data: type: object required: - columns - rows - result properties: columns: type: array items: type: object required: - col - data_type - nullable properties: col: type: string description: The name of the column in the query result. data_type: type: string enum: - CHAR - BIGINT - DECIMAL - INT - UNSIGNED BIGINT - TINYINT - TIMESTAMP - TEXT - VARCHAR - DATETIME - DOUBLE - FLOAT - DATE - TIME - YEAR - MEDIUMINT - SMALLINT - BIT - BINARY - VARBINARY - JSON - ENUM - SET - TINYTEXT - MEDIUMTEXT - LONGTEXT - TINYBLOB - MEDIUMBLOB - BLOB - LONGBLOB description: The data type of the column. nullable: type: boolean description: Whether the column is nullable. example: - col: org_name data_type: VARCHAR nullable: true - col: issue_creators data_type: BIGINT nullable: true - col: percentage data_type: DECIMAL nullable: true rows: type: array items: type: object properties: issue_creators: type: string description: Number of issue creators from the organization org_name: type: string description: Name of the organization percentage: type: string description: Percentage of issue creators from the organization example: - issue_creators: "117" org_name: pingcap percentage: "0.2833" - issue_creators: "9" org_name: tencent percentage: "0.0218" - issue_creators: "7" org_name: alibaba percentage: "0.0169" - issue_creators: "6" org_name: bytedance percentage: "0.0145" result: type: object properties: code: type: number description: The code of the response. message: type: string description: The message of the response. start_ms: type: number description: The start time of the query in milliseconds. end_ms: type: number description: The end time of the query in milliseconds. latency: type: string description: The latency of the query. row_count: type: number description: The number of rows in the query result. row_affect: type: number description: The number of rows affected by the query. limit: type: number description: The maximum number of rows in the query result. databases: type: array description: The databases used in the query. items: type: string example: code: 200 message: Query OK! start_ms: 1690957407469 end_ms: 1690957407499 latency: 30ms row_count: 4 row_affect: 0 limit: 50 databases: - gharchive_dev "/repos/{owner}/{repo}/issue_creators/history/": get: operationId: issue-creators-history summary: Issue creators history tags: - Issue Creators description: Querying the historical trend of the number of issue creators in a given repository parameters: - schema: type: string enum: - day - week - month default: month in: query name: per required: false description: The time interval of the data points. - schema: type: string default: 2000-01-01 in: query name: from required: false description: The start date of the time range. - schema: type: string default: 2099-01-01 in: query name: to required: false description: The end date of the time range. - schema: type: string example: pingcap in: path name: owner required: true description: The owner of the repo. - schema: type: string example: tidb in: path name: repo required: true description: The name of the repo. responses: "200": description: Default Response content: application/json: schema: type: object required: - type - data properties: type: type: string description: The type of the endpoint. enum: - sql_endpoint example: sql_endpoint data: type: object required: - columns - rows - result properties: columns: type: array items: type: object required: - col - data_type - nullable properties: col: type: string description: The name of the column in the query result. data_type: type: string enum: - CHAR - BIGINT - DECIMAL - INT - UNSIGNED BIGINT - TINYINT - TIMESTAMP - TEXT - VARCHAR - DATETIME - DOUBLE - FLOAT - DATE - TIME - YEAR - MEDIUMINT - SMALLINT - BIT - BINARY - VARBINARY - JSON - ENUM - SET - TINYTEXT - MEDIUMTEXT - LONGTEXT - TINYBLOB - MEDIUMBLOB - BLOB - LONGBLOB description: The data type of the column. nullable: type: boolean description: Whether the column is nullable. example: - col: date data_type: VARCHAR nullable: true - col: issue_creators data_type: DECIMAL nullable: true rows: type: array items: type: object properties: date: type: string description: The date of the data point issue_creators: type: string description: The number of issue creators on the date point example: - date: 2023-04-01 issue_creators: "1546" - date: 2023-05-01 issue_creators: "1560" - date: 2023-06-01 issue_creators: "1568" - date: 2023-07-01 issue_creators: "1579" - date: 2023-08-01 issue_creators: "1580" result: type: object properties: code: type: number description: The code of the response. message: type: string description: The message of the response. start_ms: type: number description: The start time of the query in milliseconds. end_ms: type: number description: The end time of the query in milliseconds. latency: type: string description: The latency of the query. row_count: type: number description: The number of rows in the query result. row_affect: type: number description: The number of rows affected by the query. limit: type: number description: The maximum number of rows in the query result. databases: type: array description: The databases used in the query. items: type: string example: code: 200 message: Query OK! start_ms: 1690957407469 end_ms: 1690957407499 latency: 30ms row_count: 5 row_affect: 0 limit: 50 databases: - gharchive_dev "/repos/{owner}/{repo}/stargazers/history/": get: operationId: stargazers-history summary: Stargazers history tags: - Stargazers description: Querying the historical trend of the number of stargazers in a given repository parameters: - schema: type: string enum: - day - week - month default: month in: query name: per required: false description: The time interval of the data points. - schema: type: string default: 2000-01-01 in: query name: from required: false description: The start date of the time range. - schema: type: string default: 2099-01-01 in: query name: to required: false description: The end date of the time range. - schema: type: string example: pingcap in: path name: owner required: true description: The owner of the repo. - schema: type: string example: tidb in: path name: repo required: true description: The name of the repo. responses: "200": description: Default Response content: application/json: schema: type: object required: - type - data properties: type: type: string description: The type of the endpoint. enum: - sql_endpoint example: sql_endpoint data: type: object required: - columns - rows - result properties: columns: type: array items: type: object required: - col - data_type - nullable properties: col: type: string description: The name of the column in the query result. data_type: type: string enum: - CHAR - BIGINT - DECIMAL - INT - UNSIGNED BIGINT - TINYINT - TIMESTAMP - TEXT - VARCHAR - DATETIME - DOUBLE - FLOAT - DATE - TIME - YEAR - MEDIUMINT - SMALLINT - BIT - BINARY - VARBINARY - JSON - ENUM - SET - TINYTEXT - MEDIUMTEXT - LONGTEXT - TINYBLOB - MEDIUMBLOB - BLOB - LONGBLOB description: The data type of the column. nullable: type: boolean description: Whether the column is nullable. example: - col: date data_type: VARCHAR nullable: true - col: pull_request_creators data_type: DECIMAL nullable: true rows: type: array items: type: object properties: date: type: string description: The date of the data point stargazers: type: string description: The cumulative number of stargazers example: - date: 2023-04-01 stargazers: "35389" - date: 2023-05-01 stargazers: "35593" - date: 2023-06-01 stargazers: "35805" - date: 2023-07-01 stargazers: "36019" - date: 2023-08-01 stargazers: "36026" result: type: object properties: code: type: number description: The code of the response. message: type: string description: The message of the response. start_ms: type: number description: The start time of the query in milliseconds. end_ms: type: number description: The end time of the query in milliseconds. latency: type: string description: The latency of the query. row_count: type: number description: The number of rows in the query result. row_affect: type: number description: The number of rows affected by the query. limit: type: number description: The maximum number of rows in the query result. databases: type: array description: The databases used in the query. items: type: string example: code: 200 message: Query OK! start_ms: 1690957407469 end_ms: 1690957407499 latency: 30ms row_count: 5 row_affect: 0 limit: 50 databases: - gharchive_dev "/repos/{owner}/{repo}/stargazers/countries/": get: operationId: list-countries-of-stargazers summary: List countries/regions of stargazers tags: - Stargazers description: List countries/regions of stargazers for the specified repository. parameters: - schema: type: string default: 2000-01-01 in: query name: from required: false description: The start date of the range. - schema: type: string default: 2099-01-01 in: query name: to required: false description: The end date of the range. - schema: type: string example: pingcap in: path name: owner required: true description: The owner of the repo. - schema: type: string example: tidb in: path name: repo required: true description: The name of the repo. responses: "200": description: Default Response content: application/json: schema: type: object required: - type - data properties: type: type: string description: The type of the endpoint. enum: - sql_endpoint example: sql_endpoint data: type: object required: - columns - rows - result properties: columns: type: array items: type: object required: - col - data_type - nullable properties: col: type: string description: The name of the column in the query result. data_type: type: string enum: - CHAR - BIGINT - DECIMAL - INT - UNSIGNED BIGINT - TINYINT - TIMESTAMP - TEXT - VARCHAR - DATETIME - DOUBLE - FLOAT - DATE - TIME - YEAR - MEDIUMINT - SMALLINT - BIT - BINARY - VARBINARY - JSON - ENUM - SET - TINYTEXT - MEDIUMTEXT - LONGTEXT - TINYBLOB - MEDIUMBLOB - BLOB - LONGBLOB description: The data type of the column. nullable: type: boolean description: Whether the column is nullable. example: - col: country_code data_type: CHAR nullable: true - col: stargazers data_type: BIGINT nullable: true - col: percentage data_type: DECIMAL nullable: true rows: type: array items: type: object properties: country_code: type: string description: Country/region code stargazers: type: string description: Number of stargazers from the country/region percentage: type: string description: Percentage of stargazers from the country/region example: - country_code: CN percentage: "0.5935" stargazers: "9189" - country_code: US percentage: "0.0996" stargazers: "1542" - country_code: JP percentage: "0.0305" stargazers: "473" - country_code: DE percentage: "0.0267" stargazers: "413" result: type: object properties: code: type: number description: The code of the response. message: type: string description: The message of the response. start_ms: type: number description: The start time of the query in milliseconds. end_ms: type: number description: The end time of the query in milliseconds. latency: type: string description: The latency of the query. row_count: type: number description: The number of rows in the query result. row_affect: type: number description: The number of rows affected by the query. limit: type: number description: The maximum number of rows in the query result. databases: type: array description: The databases used in the query. items: type: string example: code: 200 message: Query OK! start_ms: 1690957407469 end_ms: 1690957407499 latency: 30ms row_count: 4 row_affect: 0 limit: 50 databases: - gharchive_dev "/repos/{owner}/{repo}/stargazers/organizations/": get: operationId: list-organizations-of-stargazers summary: List organizations of stargazers tags: - Stargazers description: List organizations of stargazers for the specified repository. parameters: - schema: type: string default: 2000-01-01 in: query name: from required: false description: The start date of the range. - schema: type: string default: 2099-01-01 in: query name: to required: false description: The end date of the range. - schema: type: string example: pingcap in: path name: owner required: true description: The owner of the repo. - schema: type: string example: tidb in: path name: repo required: true description: The name of the repo. responses: "200": description: Default Response content: application/json: schema: type: object required: - type - data properties: type: type: string description: The type of the endpoint. enum: - sql_endpoint example: sql_endpoint data: type: object required: - columns - rows - result properties: columns: type: array items: type: object required: - col - data_type - nullable properties: col: type: string description: The name of the column in the query result. data_type: type: string enum: - CHAR - BIGINT - DECIMAL - INT - UNSIGNED BIGINT - TINYINT - TIMESTAMP - TEXT - VARCHAR - DATETIME - DOUBLE - FLOAT - DATE - TIME - YEAR - MEDIUMINT - SMALLINT - BIT - BINARY - VARBINARY - JSON - ENUM - SET - TINYTEXT - MEDIUMTEXT - LONGTEXT - TINYBLOB - MEDIUMBLOB - BLOB - LONGBLOB description: The data type of the column. nullable: type: boolean description: Whether the column is nullable. example: - col: org_name data_type: VARCHAR nullable: true - col: stargazers data_type: BIGINT nullable: true - col: percentage data_type: DECIMAL nullable: true rows: type: array items: type: object properties: org_name: type: string description: Name of the organization percentage: type: string description: Percentage of stargazers from the organization stargazers: type: string description: Number of stargazers from the organization example: - org_name: tencent percentage: "0.0217" stargazers: "199" - org_name: bytedance percentage: "0.0192" stargazers: "176" - org_name: alibaba percentage: "0.0162" stargazers: "148" - org_name: pingcap percentage: "0.0119" stargazers: "109" result: type: object properties: code: type: number description: The code of the response. message: type: string description: The message of the response. start_ms: type: number description: The start time of the query in milliseconds. end_ms: type: number description: The end time of the query in milliseconds. latency: type: string description: The latency of the query. row_count: type: number description: The number of rows in the query result. row_affect: type: number description: The number of rows affected by the query. limit: type: number description: The maximum number of rows in the query result. databases: type: array description: The databases used in the query. items: type: string example: code: 200 message: Query OK! start_ms: 1690957407469 end_ms: 1690957407499 latency: 30ms row_count: 4 row_affect: 0 limit: 50 databases: - gharchive_dev "/repos/{owner}/{repo}/pull_request_creators/countries/": get: operationId: list-countries-of-pr-creators summary: List countries/regions of PR creators tags: - Pull Request Creators description: List countries/regions of pull request creators for the specified repository. parameters: - schema: type: string default: 2000-01-01 in: query name: from required: false description: The start date of the range. - schema: type: string default: 2099-01-01 in: query name: to required: false description: The end date of the range. - schema: type: string example: pingcap in: path name: owner required: true description: The owner of the repo. - schema: type: string example: tidb in: path name: repo required: true description: The name of the repo. responses: "200": description: Default Response content: application/json: schema: type: object required: - type - data properties: type: type: string description: The type of the endpoint. enum: - sql_endpoint example: sql_endpoint data: type: object required: - columns - rows - result properties: columns: type: array items: type: object required: - col - data_type - nullable properties: col: type: string description: The name of the column in the query result. data_type: type: string enum: - CHAR - BIGINT - DECIMAL - INT - UNSIGNED BIGINT - TINYINT - TIMESTAMP - TEXT - VARCHAR - DATETIME - DOUBLE - FLOAT - DATE - TIME - YEAR - MEDIUMINT - SMALLINT - BIT - BINARY - VARBINARY - JSON - ENUM - SET - TINYTEXT - MEDIUMTEXT - LONGTEXT - TINYBLOB - MEDIUMBLOB - BLOB - LONGBLOB description: The data type of the column. nullable: type: boolean description: Whether the column is nullable. example: - col: country_code data_type: CHAR nullable: true - col: pull_request_creators data_type: BIGINT nullable: true - col: percentage data_type: DECIMAL nullable: true rows: type: array items: type: object properties: country_code: type: string description: Country/region code percentage: type: string description: Percentage of pull request creators from the country/region pull_request_creators: type: string description: Number of pull request creators from the country/region example: - country_code: CN percentage: "0.8802" pull_request_creators: "13619" - country_code: NL percentage: "0.0508" pull_request_creators: "786" - country_code: US percentage: "0.0400" pull_request_creators: "619" result: type: object properties: code: type: number description: The code of the response. message: type: string description: The message of the response. start_ms: type: number description: The start time of the query in milliseconds. end_ms: type: number description: The end time of the query in milliseconds. latency: type: string description: The latency of the query. row_count: type: number description: The number of rows in the query result. row_affect: type: number description: The number of rows affected by the query. limit: type: number description: The maximum number of rows in the query result. databases: type: array description: The databases used in the query. items: type: string example: code: 200 message: Query OK! start_ms: 1690957407469 end_ms: 1690957407499 latency: 30ms row_count: 3 row_affect: 0 limit: 50 databases: - gharchive_dev "/repos/{owner}/{repo}/pull_request_creators/history/": get: operationId: pull-request-creators-history summary: Pull request creators history tags: - Pull Request Creators description: Querying the historical trend of the number of pull request creators in a given repository parameters: - schema: type: string enum: - day - week - month default: month in: query name: per required: false description: The time interval of the data points. - schema: type: string default: 2000-01-01 in: query name: from required: false description: The start date of the time range. - schema: type: string default: 2099-01-01 in: query name: to required: false description: The end date of the time range. - schema: type: string example: pingcap in: path name: owner required: true description: The owner of the repo. - schema: type: string example: tidb in: path name: repo required: true description: The name of the repo. responses: "200": description: Default Response content: application/json: schema: type: object required: - type - data properties: type: type: string description: The type of the endpoint. enum: - sql_endpoint example: sql_endpoint data: type: object required: - columns - rows - result properties: columns: type: array items: type: object required: - col - data_type - nullable properties: col: type: string description: The name of the column in the query result. data_type: type: string enum: - CHAR - BIGINT - DECIMAL - INT - UNSIGNED BIGINT - TINYINT - TIMESTAMP - TEXT - VARCHAR - DATETIME - DOUBLE - FLOAT - DATE - TIME - YEAR - MEDIUMINT - SMALLINT - BIT - BINARY - VARBINARY - JSON - ENUM - SET - TINYTEXT - MEDIUMTEXT - LONGTEXT - TINYBLOB - MEDIUMBLOB - BLOB - LONGBLOB description: The data type of the column. nullable: type: boolean description: Whether the column is nullable. example: - col: date data_type: VARCHAR nullable: true - col: pull_request_creators data_type: DECIMAL nullable: true rows: type: array items: type: object properties: date: type: string description: The date of the data point pull_request_creators: type: string description: The cumulative number of pull request creators example: - date: 2023-03-01 pull_request_creators: "912" - date: 2023-04-01 pull_request_creators: "915" - date: 2023-05-01 pull_request_creators: "924" - date: 2023-06-01 pull_request_creators: "932" - date: 2023-08-01 pull_request_creators: "933" result: type: object properties: code: type: number description: The code of the response. message: type: string description: The message of the response. start_ms: type: number description: The start time of the query in milliseconds. end_ms: type: number description: The end time of the query in milliseconds. latency: type: string description: The latency of the query. row_count: type: number description: The number of rows in the query result. row_affect: type: number description: The number of rows affected by the query. limit: type: number description: The maximum number of rows in the query result. databases: type: array description: The databases used in the query. items: type: string example: code: 200 message: Query OK! start_ms: 1690957407469 end_ms: 1690957407499 latency: 30ms row_count: 5 row_affect: 0 limit: 50 databases: - gharchive_dev "/repos/{owner}/{repo}/pull_request_creators/organizations/": get: operationId: list-organizations-of-pr-creators summary: List organizations of PR creators tags: - Pull Request Creators description: "List organizations of pull request creators for the specified repository. > **Note**:\ > The API does not consider users without the company information when counting the organization percentage. \ " parameters: - schema: type: string default: 2000-01-01 in: query name: from required: false description: The start date of the range. - schema: type: string default: 2099-01-01 in: query name: to required: false description: The end date of the range. - schema: type: string example: pingcap in: path name: owner required: true description: The owner of the repo. - schema: type: string example: tidb in: path name: repo required: true description: The name of the repo. responses: "200": description: Default Response content: application/json: schema: type: object required: - type - data properties: type: type: string description: The type of the endpoint. enum: - sql_endpoint example: sql_endpoint data: type: object required: - columns - rows - result properties: columns: type: array items: type: object required: - col - data_type - nullable properties: col: type: string description: The name of the column in the query result. data_type: type: string enum: - CHAR - BIGINT - DECIMAL - INT - UNSIGNED BIGINT - TINYINT - TIMESTAMP - TEXT - VARCHAR - DATETIME - DOUBLE - FLOAT - DATE - TIME - YEAR - MEDIUMINT - SMALLINT - BIT - BINARY - VARBINARY - JSON - ENUM - SET - TINYTEXT - MEDIUMTEXT - LONGTEXT - TINYBLOB - MEDIUMBLOB - BLOB - LONGBLOB description: The data type of the column. nullable: type: boolean description: Whether the column is nullable. example: - col: org_name data_type: VARCHAR nullable: true - col: pull_request_creators data_type: BIGINT nullable: true - col: percentage data_type: DECIMAL nullable: true rows: type: array items: type: object properties: org_name: type: string description: Name of the organization percentage: type: string description: Percentage of pull request creators from the organization pull_request_creators: type: string description: Number of pull request creators from the organization example: - org_name: pingcap percentage: "0.3064" pull_request_creators: "106" - org_name: bytedance percentage: "0.0318" pull_request_creators: "11" - org_name: alibaba percentage: "0.0260" pull_request_creators: "9" - org_name: tencent percentage: "0.0173" pull_request_creators: "6" result: type: object properties: code: type: number description: The code of the response. message: type: string description: The message of the response. start_ms: type: number description: The start time of the query in milliseconds. end_ms: type: number description: The end time of the query in milliseconds. latency: type: string description: The latency of the query. row_count: type: number description: The number of rows in the query result. row_affect: type: number description: The number of rows affected by the query. limit: type: number description: The maximum number of rows in the query result. databases: type: array description: The databases used in the query. items: type: string example: code: 200 message: Query OK! start_ms: 1690957407469 end_ms: 1690957407499 latency: 30ms row_count: 4 row_affect: 0 limit: 50 databases: - gharchive_dev servers: - url: https://api.ossinsight.io/public