---
search:
  tags:
    - Owner and agent
    - GET
seo:
  description: >-
    Caller must be allowed the action's device function. The outcome can be
    unknown… Reference for the GET /v1/actions/{actionId} endpoint in the
    openlaunch API.
sidebar:
  label: Get action state
  badge: GET
title: Get action state
type: openapi-operation
---
Caller must be allowed the action's device function. The outcome can be unknown after disconnect; delivery is not exactly once.

`GET /v1/actions/{actionId}`

**ol CLI · Shell**

```bash
ol actions get "$ACTION_ID"
```

**openlaunch SDK · TypeScript**

```ts
import { createClient } from "@openlaunch/sdk";
const agent = createClient({ url: process.env.OPENLAUNCH_URL ?? "https://www.openlaunch.dev", token: process.env.OPENLAUNCH_AGENT_TOKEN! });
const action = await agent.getAction(actionId);
```

**ol CLI · Shell (2)**

```bash
ol actions watch "$ACTION_ID"
```

**openlaunch SDK · TypeScript (2)**

```ts
import { createClient } from "@openlaunch/sdk";
const agent = createClient({ url: process.env.OPENLAUNCH_URL ?? "https://www.openlaunch.dev", token: process.env.OPENLAUNCH_AGENT_TOKEN! });
const terminal = new Set(["succeeded", "failed", "expired", "cancelled", "unknown"]);
let action; do { action = await agent.getAction(actionId); if (!terminal.has(action.status)) await new Promise(resolve => setTimeout(resolve, 1000)); } while (!terminal.has(action.status));
```
