> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.cloudraker.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.cloudraker.com/_mcp/server.

# Get one playbook run

GET https://api.cloudraker.com/spaces/{spaceId}/playbook-runs/{runId}

Fetches one playbook run with full detail: current status, task progress, any pending approval, current activity, result/error, and the immutable snapshot of the playbook (tasks + actions + fileScope) captured at launch. Authorization: `space:read` (org admins bypass); missing → 404; 404 also when the run does not exist in this space. Returns `{ data: PlaybookRunDetail }`.

Reference: https://docs.cloudraker.com/api/cloud-raker-api/workspace/playbooks/get-playbook-run

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: CloudRaker API
  version: 1.0.0
paths:
  /spaces/{spaceId}/playbook-runs/{runId}:
    get:
      operationId: get-playbook-run
      summary: Get one playbook run
      description: >-
        Fetches one playbook run with full detail: current status, task
        progress, any pending approval, current activity, result/error, and the
        immutable snapshot of the playbook (tasks + actions + fileScope)
        captured at launch. Authorization: `space:read` (org admins bypass);
        missing → 404; 404 also when the run does not exist in this space.
        Returns `{ data: PlaybookRunDetail }`.
      tags:
        - playbooks
      parameters:
        - name: spaceId
          in: path
          required: true
          schema:
            type: string
        - name: runId
          in: path
          required: true
          schema:
            type: string
        - name: Authorization
          in: header
          description: Bearer authentication
          required: true
          schema:
            type: string
      responses:
        '200':
          description: The playbook run, with its launch snapshot.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PlaybookRunEnvelope'
        '404':
          description: Run not found, or caller lacks space:read
          content:
            application/json:
              schema:
                description: Any type
servers:
  - url: https://api.cloudraker.com
    description: Production
  - url: https://api.staging.raker.one
    description: Staging
  - url: https://api.dev.raker.one
    description: Development
components:
  schemas:
    PlaybookRunDetailStatus:
      type: string
      enum:
        - running
        - waiting_approval
        - waiting_action
        - waiting_user
        - paused
        - completed
        - failed
        - cancelled
      title: PlaybookRunDetailStatus
    PlaybookFileScope0:
      type: object
      properties:
        mode:
          type: string
          enum:
            - space
      required:
        - mode
      title: PlaybookFileScope0
    PlaybookFileScope1:
      type: object
      properties:
        mode:
          type: string
          enum:
            - picked
        fileIds:
          type: array
          items:
            type: string
      required:
        - mode
        - fileIds
      title: PlaybookFileScope1
    PlaybookFileScope:
      oneOf:
        - $ref: '#/components/schemas/PlaybookFileScope0'
        - $ref: '#/components/schemas/PlaybookFileScope1'
      title: PlaybookFileScope
    PlaybookRunDetailTaskProgress:
      type: object
      properties:
        total:
          type: integer
        completed:
          type: integer
      required:
        - total
        - completed
      title: PlaybookRunDetailTaskProgress
    PlaybookRunDetailPendingApprovalKind:
      type: string
      enum:
        - pre
        - post
      title: PlaybookRunDetailPendingApprovalKind
    PlaybookRunDetailPendingApproval:
      type: object
      properties:
        id:
          type: string
        kind:
          $ref: '#/components/schemas/PlaybookRunDetailPendingApprovalKind'
        actionName:
          type: string
        requestedAt:
          type: string
          format: date-time
      required:
        - id
        - kind
        - actionName
        - requestedAt
      title: PlaybookRunDetailPendingApproval
    PlaybookRunDetailSnapshotTasksItemsStatus:
      type: string
      enum:
        - pending
        - completed
      title: PlaybookRunDetailSnapshotTasksItemsStatus
    PlaybookRunDetailSnapshotTasksItems:
      type: object
      properties:
        id:
          type: string
        title:
          type: string
        instructions:
          type:
            - string
            - 'null'
        dependsOn:
          type: array
          items:
            type: string
        status:
          $ref: '#/components/schemas/PlaybookRunDetailSnapshotTasksItemsStatus'
        summary:
          type:
            - string
            - 'null'
        completedAt:
          type:
            - string
            - 'null'
          format: date-time
      required:
        - id
        - title
        - dependsOn
        - status
        - summary
        - completedAt
      title: PlaybookRunDetailSnapshotTasksItems
    PlaybookRunDetailSnapshotActionsItemsTrigger:
      type: string
      enum:
        - agent
        - user
      title: PlaybookRunDetailSnapshotActionsItemsTrigger
    PlaybookRunDetailSnapshotActionsItemsBrowserSessionStatus:
      type: string
      enum:
        - pairing
        - live
        - ended
        - expired
      title: PlaybookRunDetailSnapshotActionsItemsBrowserSessionStatus
    PlaybookRunDetailSnapshotActionsItemsBrowserSession:
      type: object
      properties:
        status:
          $ref: >-
            #/components/schemas/PlaybookRunDetailSnapshotActionsItemsBrowserSessionStatus
        createdAt:
          type: string
          format: date-time
      required:
        - status
        - createdAt
      title: PlaybookRunDetailSnapshotActionsItemsBrowserSession
    PlaybookRunDetailSnapshotActionsItems:
      type: object
      properties:
        installedActionId:
          type: string
        preApproval:
          type: boolean
        postApproval:
          type: boolean
        dependsOn:
          type: array
          items:
            type: string
        actionSlug:
          type: string
        actionName:
          type: string
        trigger:
          $ref: '#/components/schemas/PlaybookRunDetailSnapshotActionsItemsTrigger'
        browserSession:
          oneOf:
            - $ref: >-
                #/components/schemas/PlaybookRunDetailSnapshotActionsItemsBrowserSession
            - type: 'null'
      required:
        - installedActionId
        - preApproval
        - postApproval
        - dependsOn
        - actionSlug
        - actionName
        - trigger
        - browserSession
      title: PlaybookRunDetailSnapshotActionsItems
    PlaybookRunDetailSnapshot:
      type: object
      properties:
        playbookId:
          type: string
        version:
          type: integer
        name:
          type: string
        description:
          type: string
        tasks:
          type: array
          items:
            $ref: '#/components/schemas/PlaybookRunDetailSnapshotTasksItems'
        actions:
          type: array
          items:
            $ref: '#/components/schemas/PlaybookRunDetailSnapshotActionsItems'
        fileScope:
          $ref: '#/components/schemas/PlaybookFileScope'
      required:
        - playbookId
        - version
        - name
        - description
        - tasks
        - actions
        - fileScope
      description: The playbook as captured at launch. Later edits never affect a run.
      title: PlaybookRunDetailSnapshot
    PlaybookRunDetail:
      type: object
      properties:
        id:
          type: string
        spaceId:
          type: string
        playbookId:
          type: string
        playbookVersion:
          type: integer
        playbookName:
          type: string
        status:
          $ref: '#/components/schemas/PlaybookRunDetailStatus'
        fileScope:
          $ref: '#/components/schemas/PlaybookFileScope'
        taskProgress:
          $ref: '#/components/schemas/PlaybookRunDetailTaskProgress'
        pendingApproval:
          oneOf:
            - $ref: '#/components/schemas/PlaybookRunDetailPendingApproval'
            - type: 'null'
        result:
          type:
            - string
            - 'null'
        error:
          type:
            - string
            - 'null'
        startedBy:
          type: string
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
        finishedAt:
          type:
            - string
            - 'null'
          format: date-time
        currentActivity:
          type:
            - string
            - 'null'
        snapshot:
          $ref: '#/components/schemas/PlaybookRunDetailSnapshot'
          description: The playbook as captured at launch. Later edits never affect a run.
      required:
        - id
        - spaceId
        - playbookId
        - playbookVersion
        - playbookName
        - status
        - fileScope
        - taskProgress
        - pendingApproval
        - result
        - error
        - startedBy
        - createdAt
        - updatedAt
        - finishedAt
        - currentActivity
        - snapshot
      title: PlaybookRunDetail
    PlaybookRunEnvelope:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/PlaybookRunDetail'
      required:
        - data
      title: PlaybookRunEnvelope
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

```

## Examples



**Request**

```json
{}
```

**Response**

```json
{
  "data": {
    "id": "a1b2c3d4-e5f6-7890-ab12-cd34ef567890",
    "spaceId": "space-1234",
    "playbookId": "playbook-5678",
    "playbookVersion": 3,
    "playbookName": "Incident Response Playbook",
    "status": "running",
    "fileScope": {
      "mode": "space"
    },
    "taskProgress": {
      "total": 10,
      "completed": 4
    },
    "pendingApproval": {
      "id": "approval-9876",
      "kind": "pre",
      "actionName": "Restart Server",
      "requestedAt": "2024-04-20T14:45:00Z"
    },
    "result": null,
    "error": null,
    "startedBy": "user-42",
    "createdAt": "2024-04-20T14:00:00Z",
    "updatedAt": "2024-04-20T15:00:00Z",
    "finishedAt": null,
    "currentActivity": "Waiting for approval on 'Restart Server'",
    "snapshot": {
      "playbookId": "playbook-5678",
      "version": 3,
      "name": "Incident Response Playbook",
      "description": "Steps to handle server incidents and outages.",
      "tasks": [
        {
          "id": "task-001",
          "title": "Identify Issue",
          "dependsOn": [],
          "status": "completed",
          "summary": "Issue identified as network outage.",
          "completedAt": "2024-04-20T14:10:00Z",
          "instructions": "Gather logs and error messages from affected systems."
        },
        {
          "id": "task-002",
          "title": "Notify Team",
          "dependsOn": [
            "task-001"
          ],
          "status": "completed",
          "summary": "Team notified via Slack and email.",
          "completedAt": "2024-04-20T14:15:00Z",
          "instructions": "Send alert to on-call engineers."
        },
        {
          "id": "task-003",
          "title": "Restart Server",
          "dependsOn": [
            "task-002"
          ],
          "status": "pending",
          "summary": null,
          "completedAt": null,
          "instructions": "Perform a controlled restart of the affected server."
        }
      ],
      "actions": [
        {
          "installedActionId": "action-abc123",
          "preApproval": true,
          "postApproval": false,
          "dependsOn": [
            "task-002"
          ],
          "actionSlug": "restart-server",
          "actionName": "Restart Server",
          "trigger": "agent",
          "browserSession": {
            "status": "pairing",
            "createdAt": "2024-04-20T14:40:00Z"
          }
        }
      ],
      "fileScope": {
        "mode": "space"
      }
    }
  }
}
```

**SDK Code**

```python
import requests

url = "https://api.cloudraker.com/spaces/spaceId/playbook-runs/runId"

payload = {}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.get(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.cloudraker.com/spaces/spaceId/playbook-runs/runId';
const options = {
  method: 'GET',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.cloudraker.com/spaces/spaceId/playbook-runs/runId"

	payload := strings.NewReader("{}")

	req, _ := http.NewRequest("GET", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.cloudraker.com/spaces/spaceId/playbook-runs/runId")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.cloudraker.com/spaces/spaceId/playbook-runs/runId")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.cloudraker.com/spaces/spaceId/playbook-runs/runId', [
  'body' => '{}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.cloudraker.com/spaces/spaceId/playbook-runs/runId");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.cloudraker.com/spaces/spaceId/playbook-runs/runId")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```