Code references
Get code references statistics for flags
Get statistics about all the code references across repositories for all flags in your project that have code references in the default branch, for example, main. Optionally, you can include the flagKey query parameter to limit your request to statistics about code references for a single flag. This endpoint returns the number of references to your flag keys in your repositories, as well as a link to each repository.
Authorization
ApiKey read, writeAuthorization<token>
In: header
Scope: read, write
Path Parameters
projectKey*string
The project key
Format
stringQuery Parameters
flagKey?string
Filter results to a specific flag key
Format
stringResponse Body
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/api/v2/code-refs/statistics/string"{ "flags": { "property1": [ { "name": "LaunchDarkly-Docs", "type": "github", "sourceLink": "https://github.com/launchdarkly/LaunchDarkly-Docs", "defaultBranch": "main", "enabled": true, "version": 3, "hunkCount": 0, "fileCount": 0, "_links": { "property1": { "href": "string", "type": "string" }, "property2": { "href": "string", "type": "string" } }, "latestCommitTime": "1636558831870" } ], "property2": [ { "name": "LaunchDarkly-Docs", "type": "github", "sourceLink": "https://github.com/launchdarkly/LaunchDarkly-Docs", "defaultBranch": "main", "enabled": true, "version": 3, "hunkCount": 0, "fileCount": 0, "_links": { "property1": { "href": "string", "type": "string" }, "property2": { "href": "string", "type": "string" } }, "latestCommitTime": "1636558831870" } ] }, "_links": { "property1": { "href": "string", "type": "string" }, "property2": { "href": "string", "type": "string" } }}