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.1(1y ago)05[1 PRs](https://github.com/cx-reports/api-client-php/pulls)MITPHP

Since Feb 24Pushed 2mo 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 1mo ago

READMEChangelog (1)Dependencies (2)Versions (3)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

28

—

LowBetter than 54% of packages

Maintenance67

Regular maintenance activity

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity29

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

Unknown

Total

1

Last Release

448d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/314d8f46122919df5ed53995d2771c23160cc335994bc7a95983f7a6be30dfb1?d=identicon)[ognjenst](/maintainers/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

[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3731.2M42](/packages/tencentcloud-tencentcloud-sdk-php)[convertkit/convertkitapi

Kit PHP SDK for the Kit API

2167.1k1](/packages/convertkit-convertkitapi)[mapado/rest-client-sdk

Rest Client SDK for hydra API

1125.9k2](/packages/mapado-rest-client-sdk)

PHPackages © 2026

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