{"id":16584483,"url":"https://github.com/brettlangdon/node-dogapi","last_synced_at":"2025-04-13T02:24:38.904Z","repository":{"id":7660191,"uuid":"9021649","full_name":"brettlangdon/node-dogapi","owner":"brettlangdon","description":"Datadog API Node.JS Client","archived":false,"fork":false,"pushed_at":"2023-03-08T16:46:06.000Z","size":246,"stargazers_count":105,"open_issues_count":17,"forks_count":45,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-30T00:28:07.394Z","etag":null,"topics":["api","client","datadog","datadog-api","javascript"],"latest_commit_sha":null,"homepage":"https://brettlangdon.github.io/node-dogapi/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/brettlangdon.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2013-03-26T03:03:51.000Z","updated_at":"2024-09-19T05:43:21.000Z","dependencies_parsed_at":"2024-06-18T12:39:03.532Z","dependency_job_id":"f2c46d4b-5865-4553-845f-0cbd1ae6bf5a","html_url":"https://github.com/brettlangdon/node-dogapi","commit_stats":{"total_commits":221,"total_committers":26,"mean_commits":8.5,"dds":"0.22171945701357465","last_synced_commit":"54f6164f584b763ceb612f744f6b285034725375"},"previous_names":[],"tags_count":40,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brettlangdon%2Fnode-dogapi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brettlangdon%2Fnode-dogapi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brettlangdon%2Fnode-dogapi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brettlangdon%2Fnode-dogapi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/brettlangdon","download_url":"https://codeload.github.com/brettlangdon/node-dogapi/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248655031,"owners_count":21140417,"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":["api","client","datadog","datadog-api","javascript"],"created_at":"2024-10-11T22:44:45.247Z","updated_at":"2025-04-13T02:24:38.866Z","avatar_url":"https://github.com/brettlangdon.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"dogapi\n======\n\n[![npm version](https://badge.fury.io/js/dogapi.svg)](https://www.npmjs.com/package/dogapi)\n[![Build Status](https://travis-ci.org/brettlangdon/node-dogapi.svg?branch=master)](https://travis-ci.org/brettlangdon/node-dogapi)\n[![Dependency Status](https://david-dm.org/brettlangdon/node-dogapi.svg)](https://david-dm.org/brettlangdon/node-dogapi)\n\nDatadog API Node.JS Client.\n\nOfficial Datadog API Documentation: http://docs.datadoghq.com/api/\n\ndogapi API Docs: http://brettlangdon.github.io/node-dogapi/\n\n## StatsD\n\n`dogapi` does not provide any functionality to talk to a local `dogstatsd` server.\nThis library is purely an interface to the HTTP api.\n\nIf you are looking for a good Datadog StatsD library, I recommend checking out [node-dogstatsd](https://github.com/joybro/node-dogstatsd).\n\n## Installation\n\n**From NPM:**\n```bash\n[sudo] npm install dogapi\n```\n\n**From source:**\n```bash\ngit clone git://github.com/brettlangdon/node-dogapi.git\ncd ./node-dogapi\nnpm install\n```\n\n## Configuration\n\nYou will need your Datadog api key as well as an application key to use `dogapi`.\n\nKeys can be found at: https://app.datadoghq.com/account/settings#api\n\n```javascript\nvar dogapi = require(\"dogapi\");\n\nvar options = {\n api_key: \"YOUR_KEY_HERE\",\n app_key: \"YOUR_KEY_HERE\",\n // if you are on the Datadog EU site, you need to overwrite the default value of api_host key:\n // api_host: \"app.datadoghq.eu\"\n};\n\ndogapi.initialize(options);\n```\n\n### HTTPS Proxy\n\nIf you are behind a proxy you need to a proxy agent. You can use the https proxy agent from\nhttp://blog.vanamco.com/proxy-requests-in-node-js/ if you like.\nTo configure dogapi with the agent just add it to the options.\n\n```javascript\nvar dogapi = require(\"dogapi\");\n\n//Code from http://blog.vanamco.com/proxy-requests-in-node-js/\nvar HttpsProxyAgent = require(\"./httpsproxyagent\");\n\nvar agent = new HttpsProxyAgent({\n   proxyHost: \"MY_PROXY_HOST\",\n   proxyPort: 3128\n});\n\nvar options = {\n   api_key: \"YOUR_KEY_HERE\",\n   app_key: \"YOUR_KEY_HERE\",\n   proxy_agent: agent\n};\n\ndogapi.initialize(options);\n```\n\n## CLI Usage\n\n`dogapi` now ships with a command line interface `dogapi`. To use it you\nwill need a `.dogapirc` file which meets the standards of\nhttps://github.com/dominictarr/rc\n\nThe config file must contain both `api_key` and `app_key` keys (you can find\nyour datadog api and app keys here\nhttps://app.datadoghq.com/account/settings#api)\n\nExample:\n\n```json\n{\n  \"api_key\": \"\u003cAPI_KEY\u003e\",\n  \"app_key\": \"\u003cAPP_KEY\u003e\"\n}\n```\n\n### Usage\n\nPlease run `dogapi --help` to see current usage documentation for the tool.\n\nEvery api method available in `dogapi` is exposed via the cli tool.\n\n## Major changes from 1.x.x to 2.x.x\nWe have updated major versions for this library due to a backwards incompatible change to the argument format for `dogapi.metric.send` and `dogapi.metric.send_all`.\n\n### dogapi.metric.send\nPreviously in `1.x.x`:\n\n```javascript\nvar now = parseInt(new Date().getTime() / 1000);\ndogapi.metric.send(\"metric.name\", 50);\ndogapi.metric.send(\"metric.name\", [now, 50]);\n```\n\nNow in `2.x.x`:\n\n```javascript\nvar now = parseInt(new Date().getTime() / 1000);\ndogapi.metric.send(\"metric.name\", 50);\ndogapi.metric.send(\"metric.name\", [50, 100]);\ndogapi.metric.send(\"metric.name\", [[now, 50]]);\n```\n\n### dogapi.metric.send_all\nPreviously in `1.x.x`:\n\n```javascript\nvar now = parseInt(new Date().getTime() / 1000);\nvar metrics = [\n  {\n    metric: \"metric.name\",\n    points: [now, 50]\n  },\n  {\n    metric: \"metric.name\",\n    points: 50\n  }\n];\ndogapi.metric.send_all(metrics);\n```\n\nNow in `2.x.x`:\n\n```javascript\nvar now = parseInt(new Date().getTime() / 1000);\nvar metrics = [\n  {\n    metric: \"metric.name\",\n    points: [[now, 50]]\n  },\n  {\n    metric: \"metric.name\",\n    points: [50, 100]\n  },\n  {\n    metric: \"metric.name\",\n    points: 50\n  }\n];\ndogapi.metric.send_all(metrics);\n```\n\n## License\n\nThe MIT License (MIT)\nCopyright (c) 2013 Brett Langdon \u003cme@brett.is\u003e\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrettlangdon%2Fnode-dogapi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrettlangdon%2Fnode-dogapi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrettlangdon%2Fnode-dogapi/lists"}