---
agentTools:
  projectIndex: https://developers.pipefy.com/llms.txt
---

# Get Organization Report

Retrieve a specific organization report by its ID

## Before You Begin

🔗 **Use the [GraphQL Playground](https://app.pipefy.com/graphiql)** to execute the queries in this guide.

➡️ **New to GraphQL?** Learn how to navigate the Playground with our **[Playground Basics Guide](https://developers.pipefy.com/reference/exploring-the-playground)**.

## Prerequisites

1. **Authentication**: Use a [Service Account token](https://developers.pipefy.com/reference/service-accounts) (Personal Access Tokens are deprecated).
2. **Permissions**: Ensure your token has the necessary permissions to access the specific report.
3. **Report ID**: Identify the Organization Report you want to fetch.

## Step 1: Find The Report ID

1. **Via Pipefy UI:**

   1. Open the Organization Report in your browser.
   2. The URL will include the Report ID: `https://app.pipefy.com/organizations/123/reports/987654321`.
   3. **Report ID = `987654321`** (the number after `/reports/`).

2. **Via GraphQL Query:**
   1. Use the `organizationReports` query to list all reports and find the specific report ID you need.
   2. [How to get organization reports.](https://developers.pipefy.com/reference/get-organization-reports)

## Step 2: Query Organization Report

Execute the `organizationReport` query to retrieve the specific report:

```graphql
{
  organizationReport(id: 456789123) {
    id
    name
    cardCount
    color
    createdAt
    lastUpdatedAt
    fields
    filter
    sortBy {
      field
      direction
    }
    repos {
      id
      name
    }
  }
}
```

### Response Example

```json
{
  "data": {
    "organizationReport": {
      "id": "456789123",
      "name": "Sales Pipeline Report",
      "cardCount": 1250,
      "color": "#FF6B6B",
      "createdAt": "2024-01-15T10:30:00Z",
      "lastUpdatedAt": "2024-03-13T14:45:00Z",
      "fields": ["title", "status", "assignee", "due_date", "priority"],
      "filter": {
        "status": ["in_progress", "review"],
        "priority": ["high", "medium"]
      },
      "sortBy": {
        "field": "due_date",
        "direction": "ASC"
      },
      "repos": [
        {
          "id": "789123456",
          "name": "Sales Pipeline"
        },
        {
          "id": "789123457",
          "name": "Lead Management"
        },
        {
          "id": "789123458",
          "name": "Customer Success"
        }
      ]
    }
  }
}
```

## Key Fields Explained

### Report Information

* `id`: Unique identifier for the report
* `name`: Display name of the report
* `cardCount`: Total number of cards included in the report (calculated in real-time)
* `color`: Hex color code for the report's visual representation
* `createdAt`: Timestamp when the report was created
* `lastUpdatedAt`: Timestamp when the report was last modified

### Report Configuration

* `fields`: Array of field names to display in the report columns
* `filter`: JSON object containing filter criteria applied to the report
  * Can include complex filtering logic for status, priority, assignee, etc.
* `sortBy`: Object defining how cards are sorted in the report
  * `field`: The field name to sort by (e.g., "due\_date", "priority", "created\_at")
  * `direction`: Sort direction (`ASC` for ascending, `DESC` for descending)

### Associated Resources

* `repos`: Array of pipes/databases included in the report
  * `id`: Pipe/database ID
  * `name`: Pipe/database name