Report Examples

Examples and use cases for the report builder.

Below is a list of examples and use cases for the builder.

Application Users

List Application Users with Application Details

Get application users with their associated application information.

Permissions:

  • Application Users: team:read
  • Applications: applications:read
{
  "builder": {
    "application_users": {
      "fields": [
        {
          "name": "email",
          "as": "user_email"
        },
        {
          "name": "active",
          "as": "is_active"
        }
      ],
      "with": {
        "applications": {
          "fields": [
            {
              "name": "app_label",
              "as": "application_name"
            },
            {
              "name": "category",
              "as": "category"
            }
          ]
        }
      }
    }
  },
  "sort": "+user_email",
  "limit": 50
}

Applications

Get Total Spend, Grouped by Application Category

This example demonstrates how to retrieve the total spend on applications, grouped by their respective categories. It utilizes the applications and payments zips to aggregate spend data effectively.

Permissions:

  • Applications: applications:read
  • Software Charges: spend:read
{
  "builder": {
    "applications": {
      "fields": [
        {
          "name": "category",
          "as": "category"
        }
      ],
      "with": {
        "payments": {
          "fields": [
            {
              "name": "amount",
              "op": "sum",
              "as": "total_amount"
            }
          ]
        }
      }
    }
  },
  "sort": "+total_amount",
  "limit": 50
}

Applications with User Count

Get applications with the count of their associated users.

Permissions:

  • Applications: applications:read
  • Application Users: team:read
{
  "builder": {
    "applications": {
      "fields": [
        {
          "name": "app_label",
          "as": "application"
        },
        {
          "name": "status",
          "as": "status"
        }
      ],
      "with": {
        "application_users": {
          "fields": [
            {
              "name": "id",
              "op": "count",
              "as": "user_count"
            }
          ]
        }
      }
    }
  },
  "sort": "-user_count",
  "limit": 50
}

Contract Line Items

Contracts

Integrations

Software Charges

Payments with Application and Zybrary Details

Get payments with their associated application and supplier information.

Permissions:

  • Software Charges: spend:read
  • Applications: applications:read
  • Zybrary: applications:read
{
  "builder": {
    "payments": {
      "fields": [
        {
          "name": "payment_name",
          "as": "payment"
        },
        {
          "name": "amount",
          "as": "amount"
        }
      ],
      "with": {
        "applications": {
          "fields": [
            {
              "name": "app_label",
              "as": "application"
            }
          ]
        },
        "zybrary": {
          "fields": [
            {
              "name": "app_name",
              "as": "zybrary_app"
            }
          ]
        }
      }
    }
  },
  "sort": "-amount",
  "limit": 50
}

PO Line Items

Purchase Orders

Suppliers

Suppliers with Purchase Orders

Get suppliers with the count of their purchase orders.

Permissions:

  • Suppliers: applications:read
  • Purchase Orders: applications:read AND spend:read
{
  "builder": {
    "suppliers": {
      "fields": [
        {
          "name": "name",
          "as": "supplier_name"
        }
      ],
      "with": {
        "purchase_orders": {
          "fields": [
            {
              "name": "id",
              "op": "count",
              "as": "po_count"
            }
          ]
        }
      }
    }
  },
  "sort": "-po_count",
  "limit": 50
}

Usage Connect

Recent Usage Imports by Application

List recent usage data imports with their associated applications.

Permissions:

  • Usage Connect: integrations:read
  • Applications: applications:read
{
  "builder": {
    "usage_connect": {
      "fields": [
        {
          "name": "file_name",
          "as": "file"
        },
        {
          "name": "import_status",
          "as": "status"
        }
      ],
      "with": {
        "applications": {
          "fields": [
            {
              "name": "app_label",
              "as": "application"
            }
          ]
        }
      }
    }
  },
  "sort": "+file",
  "limit": 50
}

View Applications

View Applications with Application and View Details

Get view-application mappings with their associated application and view information.

Permissions:

  • View Applications: admin
  • Applications: applications:read
  • Views: admin
{
  "builder": {
    "view_applications": {
      "fields": [
        {
          "name": "id",
          "as": "mapping_id"
        }
      ],
      "with": {
        "applications": {
          "fields": [
            {
              "name": "app_label",
              "as": "application"
            }
          ]
        },
        "views": {
          "fields": [
            {
              "name": "name",
              "as": "view_name"
            }
          ]
        }
      }
    }
  },
  "sort": "+application",
  "limit": 50
}

View Zylo Users

Zybrary

Zybrary Applications with Payment Totals

Get Zybrary applications with aggregated payment information.

Permissions:

  • Zybrary: applications:read
  • Software Charges: spend:read
{
  "builder": {
    "zybrary": {
      "fields": [
        {
          "name": "app_name",
          "as": "application"
        },
        {
          "name": "app_description",
          "as": "description"
        }
      ],
      "with": {
        "payments": {
          "fields": [
            {
              "name": "amount",
              "op": "sum",
              "as": "total_spend"
            }
          ]
        }
      }
    }
  },
  "sort": "-total_spend",
  "limit": 50
}

Views

Zylo Users

Zylo Users with View Assignments

Get Zylo users with their view assignment details.

Permissions:

  • Zylo Users: admin
  • View Zylo Users: admin
{
  "builder": {
    "zylo_users": {
      "fields": [
        {
          "name": "email",
          "as": "email"
        },
        {
          "name": "first_name",
          "as": "first_name"
        },
        {
          "name": "last_name",
          "as": "last_name"
        }
      ],
      "with": {
        "view_zylo_users": {
          "fields": [
            {
              "name": "id",
              "op": "count",
              "as": "view_count"
            }
          ]
        }
      }
    }
  },
  "sort": "+email",
  "limit": 50
}