{"id":33937307,"url":"https://github.com/puetzp/prometheus-http-query","last_synced_at":"2026-04-07T19:31:56.222Z","repository":{"id":43126768,"uuid":"353335347","full_name":"puetzp/prometheus-http-query","owner":"puetzp","description":"Prometheus HTTP API client","archived":false,"fork":false,"pushed_at":"2026-01-24T16:04:42.000Z","size":327,"stargazers_count":17,"open_issues_count":3,"forks_count":10,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-01-25T05:46:37.706Z","etag":null,"topics":["api-client","library","prometheus","promql","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/puetzp.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2021-03-31T11:39:35.000Z","updated_at":"2026-01-24T16:04:47.000Z","dependencies_parsed_at":"2023-12-22T14:46:13.114Z","dependency_job_id":"30a57148-fcfa-4858-b391-55dc21aadd59","html_url":"https://github.com/puetzp/prometheus-http-query","commit_stats":{"total_commits":330,"total_committers":6,"mean_commits":55.0,"dds":"0.36969696969696975","last_synced_commit":"ae2d6a5f99a86d394f97cf04dea399b0d3a78a0a"},"previous_names":[],"tags_count":27,"template":false,"template_full_name":null,"purl":"pkg:github/puetzp/prometheus-http-query","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/puetzp%2Fprometheus-http-query","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/puetzp%2Fprometheus-http-query/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/puetzp%2Fprometheus-http-query/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/puetzp%2Fprometheus-http-query/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/puetzp","download_url":"https://codeload.github.com/puetzp/prometheus-http-query/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/puetzp%2Fprometheus-http-query/sbom","scorecard":{"id":749196,"data":{"date":"2025-08-11","repo":{"name":"github.com/puetzp/prometheus-http-query","commit":"6877178f49997afe2972cbbac86b93b64d259094"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.2,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":1,"reason":"Found 4/21 approved changesets -- score normalized to 1","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 13 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-22T19:45:29.935Z","repository_id":43126768,"created_at":"2025-08-22T19:45:29.936Z","updated_at":"2025-08-22T19:45:29.936Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31526666,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-07T16:28:08.000Z","status":"ssl_error","status_checked_at":"2026-04-07T16:28:06.951Z","response_time":105,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api-client","library","prometheus","promql","rust"],"created_at":"2025-12-12T14:57:11.099Z","updated_at":"2026-04-07T19:31:56.217Z","avatar_url":"https://github.com/puetzp.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# prometheus-http-query\n\nThis crate provides an interface to the [Prometheus HTTP API](https://prometheus.io/docs/prometheus/latest/querying/api/) and leverage Rust's type system in the process where applicable.\n\n## Example\n\n```rust\nuse prometheus_http_query::{Client, Error, Selector, RuleKind};\n\n#[tokio::main(flavor = \"current_thread\")]\nasync fn main() -\u003e Result\u003c(), Error\u003e {\n    let client = Client::default();\n\n    // Evaluate a PromQL query.\n    let q = \"topk by (code) (5, prometheus_http_requests_total)\";\n    let response = client.query(q).get().await?;\n    assert!(response.data().as_vector().is_some());\n\n    // Retrieve active alerts.\n    let alerts = client.alerts().await;\n    assert!(alerts.is_ok());\n\n    // Retrieve recording rules.\n    let recording_rules = client.rules().kind(RuleKind::Recording).get().await;\n    assert!(recording_rules.is_ok());\n\n    // Retrieve a list of time series that match certain labels sets (\"series selectors\").\n    let select1 = Selector::new()\n        .eq(\"handler\", \"/api/v1/query\");\n\n    let select2 = Selector::new()\n        .eq(\"job\", \"node\")\n        .regex_eq(\"mode\", \".+\");\n\n    let time_series = client.series(\u0026[select1, select2]).get().await;\n    assert!(time_series.is_ok());\n\n    Ok(())\n}\n```\n\n## Compatibility\n\nThis library is generally compatible with Prometheus versions starting from v2.30. Individual client methods might fail with older versions as newer versions of Prometheus server support additional methods and query parameters. Run Prometheus server version \u003e= 2.46 to ensure maximum compatibility.\n\n## Tests\n\nIn order to run all tests a Prometheus server must be running at `http://localhost:9090`. No special configuration is required at this point, simply run: `cargo test`\n\n## Contributing\n\nPlease do not hesitate to file issues in order to report bugs, ask questions or make suggestions. You are also welcome to tackle open issues if there are any.\n\nIf you are looking to submit code, please make sure that the tests pass successfully.\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpuetzp%2Fprometheus-http-query","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpuetzp%2Fprometheus-http-query","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpuetzp%2Fprometheus-http-query/lists"}