PHPackages                             interworks/sigmarest - 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. interworks/sigmarest

ActiveLibrary

interworks/sigmarest
====================

This package allows simple REST API communication with Sigma.

v0.0.5(10mo ago)12.6k↓35.7%MITPHPPHP ^8.0CI passing

Since Jan 27Pushed 2mo ago5 watchersCompare

[ Source](https://github.com/InterWorks/SigmaREST)[ Packagist](https://packagist.org/packages/interworks/sigmarest)[ RSS](/packages/interworks-sigmarest/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (3)Versions (10)Used By (0)

Sigma REST API for Laravel
==========================

[](#sigma-rest-api-for-laravel)

[![GitHub Workflow Status (Pest)](https://camo.githubusercontent.com/03822f4dd4b80ed1ae2d0d857bafad4b5ade79ed167b65333c4afb01582145ad/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f496e746572576f726b732f5369676d61524553542f706573742e796d6c3f6272616e63683d6d61696e266c6162656c3d50657374267374796c653d726f756e642d737175617265)](https://github.com/InterWorks/SigmaREST/actions)[![GitHub Workflow Status (PHPStan)](https://camo.githubusercontent.com/d285363598032a0e2b2fd62e9c79f8f5478755134d36c4453143de1c539ebb76/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f496e746572576f726b732f5369676d61524553542f7068707374616e2e796d6c3f6272616e63683d6d61696e266c6162656c3d5048505374616e267374796c653d726f756e642d737175617265)](https://github.com/InterWorks/SigmaREST/actions)[![Latest Version](https://camo.githubusercontent.com/56acbb69258f2e8bf56965351cbe5156ce970caac886fe5adf3ee7e68555c496/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f496e746572576f726b732f5369676d6152455354)](https://packagist.org/packages/InterWorks/SigmaREST)[![License](https://camo.githubusercontent.com/5c00a1b094dbc3ea92d0f0229d90abef787944be411dcfe2b19c161c6133f731/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f496e746572576f726b732f5369676d6152455354)](https://packagist.org/packages/InterWorks/SigmaREST)

This is a simple API for calling REST API's against Sigma. It handles authentication for you so install, add the environment variables, and start making REST API calls!

Getting Started
---------------

[](#getting-started)

### Installation

[](#installation)

Requires PHP &gt;= 8.1.

```
composer require interworks/sigmarest
```

Next, add the following required environment variables to your .env file:

```
SIGMA_API_URL="https://YOUR-API-URL.com"
SIGMA_CLIENT_ID="YOUR-CLIENT-ID"
SIGMA_CLIENT_SECRET="YOUR-CLIENT-SECRET"
```

Use the following doc from Sigma to find these values: [Get started with the Sigma REST API](https://help.sigmacomputing.com/reference/get-started-sigma-api)

Usage Guide
-----------

[](#usage-guide)

There is a function for each documented Sigma REST API endpoint. Those endpoints can be found here: [Sigma REST API Documentation](https://help.sigmacomputing.com/reference/listconnections)

### Basic Usage

[](#basic-usage)

Instantiate a SigmaREST object and start making calls!

```
use InterWorks\SigmaREST\SigmaREST;

// Instantiate
$sigma = new SigmaREST();

// Get first 100 users and create a collection.
$users = $sigma->getMembers(['limit' => 100]);
$users = collect($users['entries']);

// Get first 10 workbooks, loop through each and get their sources
$workbooks = $sigma->getWorkbooks(['limit' => 10]);
$sources   = [];
foreach ($workbooks['entries'] as $workbook) {
    $sources[] = $sigma->getWorkbookSource($workbook['workbookId']);
}
```

### Unsupported Endpoints

[](#unsupported-endpoints)

If there's an endpoint missed, you can use the `call` function to specify the URL, arguments, and method. The function returns a `Illuminate\Http\Client\Response` object.

```
$response = $sigma->call(
    url   : 'cool/unknown/endpoint',
    args  : ['name' => 'Cool thing'],
    method: 'POST'
);
$response->json();
```

### Function Return Type Options

[](#function-return-type-options)

By default, either an array or boolean will be returned depending on the endpoint. If you'd like more control over how the response is processed, you can set `returnResponseObject` to `true` in the constructor to always receive the `Illuminate\Http\Client\Response` object.

```
$sigma    = new SigmaREST(returnResponseObject: true);
$response = $sigma->getMembers(['limit' => 100]);
$success  = $response->successful();
$body     = $response->body();
$users    = $response->json();
```

License
-------

[](#license)

This package is released under the MIT License. See [`LICENSE`](LICENSE.md) for details.

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance70

Regular maintenance activity

Popularity23

Limited adoption so far

Community9

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 ~36 days

Total

5

Last Release

327d ago

PHP version history (2 changes)v0.0.1PHP ^8.2

v0.0.3PHP ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/a346b89670993cca37dec5d11f65a692f3aed9dae9c8488bdbf6b4e6be26d8ad?d=identicon)[jplcodes](/maintainers/jplcodes)

---

Top Contributors

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

###  Code Quality

TestsPest

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/interworks-sigmarest/health.svg)

```
[![Health](https://phpackages.com/badges/interworks-sigmarest/health.svg)](https://phpackages.com/packages/interworks-sigmarest)
```

PHPackages © 2026

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