{"id":15486020,"url":"https://github.com/cloudydeno/deno-datadog_api","last_synced_at":"2025-04-10T16:50:33.949Z","repository":{"id":45944041,"uuid":"303692132","full_name":"cloudydeno/deno-datadog_api","owner":"cloudydeno","description":"Lightweight client for accessing several Datadog APIs","archived":false,"fork":false,"pushed_at":"2023-12-23T12:18:10.000Z","size":38,"stargazers_count":1,"open_issues_count":1,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-10-19T07:04:11.758Z","etag":null,"topics":["datadog-api","deno","deno-apis","typescript","typescript-library"],"latest_commit_sha":null,"homepage":"https://deno.land/x/datadog_api","language":"TypeScript","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/cloudydeno.png","metadata":{"files":{"readme":"README.md","changelog":null,"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}},"created_at":"2020-10-13T12:14:59.000Z","updated_at":"2021-11-25T18:28:27.000Z","dependencies_parsed_at":"2023-12-23T13:31:25.195Z","dependency_job_id":"323f37fd-aff1-4f39-a4aa-109822c2ec87","html_url":"https://github.com/cloudydeno/deno-datadog_api","commit_stats":{"total_commits":19,"total_committers":4,"mean_commits":4.75,"dds":0.368421052631579,"last_synced_commit":"4226f733b199ccfcdcb3d6b5163e4e5868f9cb75"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudydeno%2Fdeno-datadog_api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudydeno%2Fdeno-datadog_api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudydeno%2Fdeno-datadog_api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudydeno%2Fdeno-datadog_api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cloudydeno","download_url":"https://codeload.github.com/cloudydeno/deno-datadog_api/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248255737,"owners_count":21073371,"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-api","deno","deno-apis","typescript","typescript-library"],"created_at":"2024-10-02T06:05:46.424Z","updated_at":"2025-04-10T16:50:33.929Z","avatar_url":"https://github.com/cloudydeno.png","language":"TypeScript","readme":"![Deno CI](https://github.com/cloudydeno/deno-datadog_api/workflows/CI/badge.svg?branch=main)\n\n# `/x/datadog_api`: Deno library for Datadog\n\nVery incomplete Typescript client\nfor [Datadog's API](https://docs.datadoghq.com/api/v1/).\n\n## Purpose\n\nMy primary goal is to give important parts of the Datadog API\na typed interface for use in Deno scripts.\nI'm comparing API docs with actual API payloads as much as possible.\nIf you just want to make calls and get JSON back,\nyou can use the `datadog.fetchJson({...})` function.\n\nPS: This library doesn't really depend on Deno APIs,\nit's just targetting Deno as a runtime (Typescript, URL imports, fetch, etc).\n\n### Implemented APIs\n\n* `v1Dashboards`: get by id, list all\n* `v1Metrics`: submit custom data series points to Datadog\n    * For a working example of metrics submission, see `examples/emit-metrics.ts`\n* `v1Monitors`: get by id, get all, search by query\n* `v1ServiceChecks`: submit 'check run' statuses to Datadog\n* `v1ServiceDependencies`: list APM services and their dependencies\n* `v1Events`: submit events to Datadog\n* `v1UsageMetering`: get billable summary, get top custom metrics\n* `v2Roles`: list and describe roles \u0026 permissions\n* `v2Users`: list, search, and describe datadog users\n\nIf you want a different API not listed here,\nplease open a Github issue or PR into `v1/` or `v2/` as appropriate.\nIn the meantime you can use `fetchJson` for such APIs.\n\n## Usage\n\nImporting `mod.ts` gives you the whole implemented API surface.\n\n```typescript\nimport DatadogApi from \"https://deno.land/x/datadog_api/mod.ts\";\n\n// Set up an API client using DATADOG_API_KEY and such\nconst datadog = DatadogApi.fromEnvironment(Deno.env);\n\n// Optionally check that our API key works, without actually doing anything\nawait datadog.validateAccess();\n\n// Perform a monitor search by tag\nconst {monitors} = await datadog.v1Monitors.search('env:\"prod\"');\nconsole.log(\"First monitor:\", monitors[0]);\n\n// Or, directly fetch JSON (for using APIs that don't have functions yet)\nconst dashboardLists = await datadog.fetchJson({\n  path: '/api/v2/dashboard/lists/manual',\n});\n```\n\n### Selective Imports\n\nYou can also import specific parts of this module by\nstarting with `client.ts` and adding specific APIs from `v1/` or `v2/`.\nThis lets you skip downloading APIs you don't plan on using.\n\n```typescript\n// Assemble an API client manually\nimport ApiClient from \"https://deno.land/x/datadog_api/client.ts\";\nconst datadog = new ApiClient({\n  apiKey: Deno.env.get(\"DATADOG_API_KEY\"),\n  appKey: Deno.env.get(\"DATADOG_APP_KEY\"),\n  apiBase: Deno.env.get(\"DATADOG_HOST\"), // defaults to US server\n});\n\n// Set up a Monitors API client\nimport V1MonitorsApi from \"https://deno.land/x/datadog_api/v1/monitors.ts\";\nconst monitorsApi = new V1MonitorsApi(datadog);\n\n// Get a monitor\nconsole.log(await monitorsApi.getOne(\"234231\"));\n```\n\n## License\n\nMIT License\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcloudydeno%2Fdeno-datadog_api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcloudydeno%2Fdeno-datadog_api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcloudydeno%2Fdeno-datadog_api/lists"}