PHPackages                             cx-reports/api-client - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. cx-reports/api-client

ActiveLibrary[API Development](/categories/api)

cx-reports/api-client
=====================

A client for interacting and downloading reports from the CxReports

0.0.5(1mo ago)05[1 PRs](https://github.com/cx-reports/api-client-php/pulls)MITPHPPHP ^8.1

Since Feb 24Pushed 4mo ago1 watchersCompare

[ Source](https://github.com/cx-reports/api-client-php)[ Packagist](https://packagist.org/packages/cx-reports/api-client)[ RSS](/packages/cx-reports-api-client/feed)WikiDiscussions main Synced today

READMEChangelog (1)Dependencies (4)Versions (4)Used By (0)

CxReports PHP Library
=====================

[](#cxreports-php-library)

Overview
--------

[](#overview)

The `cx-reports/api-client` provides an easy-to-use interface for interacting with the CxReports API. This library allows developers to preview reports, download reports as PDFs, retrieve workspace information, and more.

Features
--------

[](#features)

- Authentication with API tokens
- Preview reports by ID
- Download reports as PDF
- Fetch workspaces
- Retrieve report types

Installation
------------

[](#installation)

You can install the library via Composer:

```
composer require cx-reports/api-client
```

Usage
-----

[](#usage)

### Initializing the Client

[](#initializing-the-client)

```
require 'vendor/autoload.php';

use CxReports\Client\CxReportsClient;

$url = "";
$workspace_id = 0;
$pat = "";
$client = new CxReportsClient($url, $workspace_id, $pat);
```

### Downloading a Report as PDF

[](#downloading-a-report-as-pdf)

```
$response = $client->downloadPdf("149", [], 26);
$response = $client->downloadPdf("149", [], 26);
```

### Fetching Workspaces

[](#fetching-workspaces)

```
$workspaces = $client->getWorkspaces();
```

### Fetching Report Types

[](#fetching-report-types)

```
$reportTypes = $client->getReportTypes();
```

Error Handling
--------------

[](#error-handling)

The library provides built-in error handling:

```
try {
    $report = $client->getReport("invalid-id");
} catch (Exception $e) {
    echo "Error: " . $e->getMessage();
}
```

License
-------

[](#license)

This library is licensed under the MIT License.

Contributing
------------

[](#contributing)

Contributions are welcome! Please submit a pull request or open an issue on GitHub.

Support
-------

[](#support)

For any issues or questions, contact .

###  Health Score

35

—

LowBetter than 77% of packages

Maintenance84

Actively maintained with recent releases

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity39

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~458 days

Total

2

Last Release

36d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/45719288?v=4)[Ognjen Stefanovic](/maintainers/ognjenst)[@ognjenst](https://github.com/ognjenst)

---

Top Contributors

[![ognjenst](https://avatars.githubusercontent.com/u/45719288?v=4)](https://github.com/ognjenst "ognjenst (16 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/cx-reports-api-client/health.svg)

```
[![Health](https://phpackages.com/badges/cx-reports-api-client/health.svg)](https://phpackages.com/packages/cx-reports-api-client)
```

###  Alternatives

[statamic/cms

The Statamic CMS Core Package

4.8k3.6M985](/packages/statamic-cms)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3741.3M47](/packages/tencentcloud-tencentcloud-sdk-php)[neuron-core/neuron-ai

The PHP Agentic Framework.

2.0k656.1k38](/packages/neuron-core-neuron-ai)[avalara/avataxclient

Client library for Avalara's AvaTax suite of business tax calculation and processing services. Uses the REST v2 API.

528.5M7](/packages/avalara-avataxclient)[eslazarev/wildberries-sdk

Wildberries OpenAPI clients (generated).

273.0k](/packages/eslazarev-wildberries-sdk)[files.com/files-php-sdk

Files.com PHP SDK

2481.1k](/packages/filescom-files-php-sdk)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
