{"id":17492954,"url":"https://github.com/datadog/datadog-api-client-ruby","last_synced_at":"2026-03-06T21:02:36.254Z","repository":{"id":36951310,"uuid":"279271772","full_name":"DataDog/datadog-api-client-ruby","owner":"DataDog","description":"Ruby client for the Datadog API","archived":false,"fork":false,"pushed_at":"2025-05-13T17:48:13.000Z","size":300116,"stargazers_count":39,"open_issues_count":38,"forks_count":22,"subscribers_count":527,"default_branch":"master","last_synced_at":"2025-05-13T18:39:36.580Z","etag":null,"topics":["datadog","datadog-api","openapi","ruby"],"latest_commit_sha":null,"homepage":"https://www.rubydoc.info/gems/datadog_api_client","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DataDog.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":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-07-13T10:31:34.000Z","updated_at":"2025-05-13T17:30:25.000Z","dependencies_parsed_at":"2024-01-18T04:51:55.829Z","dependency_job_id":"a3e28352-3ba6-4219-83c8-309225ea7dd3","html_url":"https://github.com/DataDog/datadog-api-client-ruby","commit_stats":{"total_commits":1142,"total_committers":46,"mean_commits":24.82608695652174,"dds":"0.21190893169877412","last_synced_commit":"a193cd847da5cb8595c0197db6d9e6fb40f1d8cc"},"previous_names":[],"tags_count":53,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DataDog%2Fdatadog-api-client-ruby","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DataDog%2Fdatadog-api-client-ruby/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DataDog%2Fdatadog-api-client-ruby/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DataDog%2Fdatadog-api-client-ruby/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DataDog","download_url":"https://codeload.github.com/DataDog/datadog-api-client-ruby/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254493379,"owners_count":22080126,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["datadog","datadog-api","openapi","ruby"],"created_at":"2024-10-19T11:08:21.831Z","updated_at":"2026-03-06T21:02:31.213Z","avatar_url":"https://github.com/DataDog.png","language":"Ruby","readme":"# datadog-api-client-ruby\n\nThis repository contains a Ruby API client for the [Datadog API](https://docs.datadoghq.com/api/).\nThe code is generated using [`generator`](https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator) package.\n\n## Requirements\n\nInstalling and using the API client library requires:\n\n1. Ruby 2.6+\n\n## Installation\n\nThe following steps will help you quickly start interacting with Datadog APIs using Ruby client.\n\n### Install published Ruby gem\n\n1. Add the `datadog_api_client` gem to you Gemfile:\n\n   ```ruby\n   source 'https://rubygems.org'\n   gem 'datadog_api_client'\n   ```\n\n2. Install the gem with `bundle install`\n\n3. (optional) You can configure site and [authentication](#authentication) using environment variables or code block:\n\n   ```ruby\n   DatadogAPIClient.configure do |config|\n     config.server_variables[:site] = 'datadoghq.eu'\n   end\n   ```\n\n### Build a gem\n\n1. Build the Ruby code into a gem:\n\n   ```shell\n   gem build datadog_api_client.gemspec\n   ```\n\n2. Install the gem locally:\n\n   ```shell\n   gem install ./datadog_api_client-*.gem\n   ```\n\n### Install from Git\n\n1. Add the following in the Gemfile:\n\n   ```ruby\n   gem 'datadog_api_client', :git =\u003e 'https://github.com/DataDog/datadog-api-client-ruby.git'\n   ```\n\n2. Install the gem with `bundle install`\n\n### Include the Ruby code directly\n\n1. Create `example.rb` script (find inspiration on https://docs.datadoghq.com/api/)\n\n2. Include the Ruby code directly using `-I` as follows:\n\n   ```shell\n   ruby -Ilib example.rb\n   ```\n\n## Getting Started\n\nPlease follow the [installation](#installation) instruction and execute the following Ruby code:\n\n```ruby\nrequire 'datadog_api_client'\n\napi_instance = DatadogAPIClient::V1::IPRangesAPI.new\n\nbegin\n  result = api_instance.get_ip_ranges\n  p result\nrescue DatadogAPIClient::APIError =\u003e e\n  puts \"Error when calling IPRangesAPI-\u003eget_ip_ranges: #{e}\"\nend\n```\n\n### Authentication\n\nAuthenticate with the API by providing your API and Application keys in the configuration:\n\n```ruby\nDatadogAPIClient.configure do |config|\n  config.api_key = ENV['NON_STANDARD_NAME_FOR_DD_API_KEY']\n  config.application_key = ENV['NON_STANDARD_NAME_FOR_DD_APP_KEY']\nend\n```\n\n### Unstable (Beta) Endpoints\n\nThis client includes access to Datadog API endpoints while they are in an unstable state and may undergo breaking changes. An extra configuration step is required to enable these endpoints:\n\n```ruby\nDatadogAPIClient.configure do |config|\n  config.unstable_operations[:'\u003capi_version\u003e.\u003cunstable_operation_id\u003e'] = true\nend\n```\n\nwhere `\u003cunstable_operation_id\u003e` is the name of the method used to interact with that endpoint. For example: `list_log_indexes`, or `get_logs_index`\n\n### Changing Server\n\nWhen talking to a different server, like the `eu` instance, change the `server_variables` on your configuration object:\n\n```ruby\nconfig = DatadogAPIClient::Configuration.new\nconfig.server_variables[:site] = \"datadoghq.eu\"\nclient = DatadogAPIClient::APIClient.new(config)\n```\n\n### Disable compressed payloads\n\nIf you want to disable GZIP compressed responses, set the `compress` flag\non your configuration object:\n\n```ruby\nconfig = DatadogAPIClient::Configuration.new\nconfig.compress = false\nclient = DatadogAPIClient::APIClient.new(config)\n```\n\n### Enable requests logging\n\nIf you want to enable requests logging, set the `debugging` flag\non your configuration object:\n\n```ruby\nconfig = DatadogAPIClient::Configuration.new\nconfig.debugging = true\nclient = DatadogAPIClient::APIClient.new(config)\n```\n\n### Configure proxy\n\nYou can configure the client to use proxy by setting `http_proxyaddr` and `http_proxyport` keys on configuration object:\n\n```ruby\nconfig = DatadogAPIClient::Configuration.new\nconfig.http_proxyaddr = '127.0.0.1'\nconfig.http_proxyport = '3128'\nclient = DatadogAPIClient::APIClient.new(config)\n```\n\n### Pagination\n\nSeveral listing operations have a pagination method to help consume all the items available.\nFor example, to retrieve all your incidents:\n\n```ruby\nrequire \"datadog_api_client\"\nDatadogAPIClient.configure do |config|\n  config.unstable_operations[:'v2.list_incidents'] = true\nend\napi_instance = DatadogAPIClient::V2::IncidentsAPI.new\napi_instance.list_incidents_with_pagination() do |incident|\n  p incident.id\nend\n```\n\n### Retry\n\nTo enable the client to retry when rate limited (status 429) or status 500 and above:\n\n```ruby\nconfig = DatadogAPIClient::Configuration.new\nconfig.enable_retry = true\nclient = DatadogAPIClient::APIClient.new(config)\n```\n\nThe interval between 2 retry attempts will be the value of the `x-ratelimit-reset` response header when available.\nIf not, it will be :\n\n```ruby\n(config.backoffMultiplier ** current_retry_count) * config.backoffBase\n```\n\nThe maximum number of retry attempts is `3` by default and can be modified with\n\n```ruby\nconfig.maxRetries\n```\n\n## Documentation\n\nIf you are interested in general documentation for all public Datadog API endpoints, checkout the [general documentation site][api docs].\n\nDeveloper documentation for supported endpoints and models is available in [Github pages][github pages].\n\nFor contributing, checkout the [development guide][development docs].\n\n## Author\n\nsupport@datadoghq.com\n\n[api docs]: https://docs.datadoghq.com/api/\n[github pages]: https://datadoghq.dev/datadog-api-client-ruby/\n[development docs]: https://github.com/DataDog/datadog-api-client-ruby/blob/master/DEVELOPMENT.md\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdatadog%2Fdatadog-api-client-ruby","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdatadog%2Fdatadog-api-client-ruby","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdatadog%2Fdatadog-api-client-ruby/lists"}