Files
triggerdotdev--trigger.dev/docs/management/overview.mdx
T
James Ritchie 99f2caf5c2 Docs/new reference section (#1719)
* Moves API reference to a new dropdown section

* Move toubleshooting higher up

* Separates the reference Overview page into new pages

* Removed Projects api and redirects old page to overview

* typo
2025-02-20 11:30:32 +00:00

47 lines
1.0 KiB
Plaintext

---
title: Overview
sidebarTitle: Overview
description: Using the Trigger.dev management API
---
## Installation
The management API is available through the same `@trigger.dev/sdk` package used in defining and triggering tasks. If you have already installed the package in your project, you can skip this step.
<CodeGroup>
```bash npm
npm i @trigger.dev/sdk@latest
```
```bash pnpm
pnpm add @trigger.dev/sdk@latest
```
```bash yarn
yarn add @trigger.dev/sdk@latest
```
</CodeGroup>
## Usage
All `v3` functionality is provided through the `@trigger.dev/sdk/v3` module. You can import the entire module or individual resources as needed.
```ts
import { configure, runs } from "@trigger.dev/sdk/v3";
configure({
// this is the default and if the `TRIGGER_SECRET_KEY` environment variable is set, can omit calling configure
secretKey: process.env["TRIGGER_SECRET_KEY"],
});
async function main() {
const runs = await runs.list({
limit: 10,
status: ["COMPLETED"],
});
}
main().catch(console.error);
```