PHPackages                             mrdth/decipher-api - 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. mrdth/decipher-api

AbandonedArchivedLibrary[API Development](/categories/api)

mrdth/decipher-api
==================

PHP Wrapper for the FocusVision Decipher REST Api

1.1.1(5y ago)07452[2 PRs](https://github.com/mrdth/decipher-api/pulls)MITPHP

Since Nov 17Pushed 3y ago1 watchersCompare

[ Source](https://github.com/mrdth/decipher-api)[ Packagist](https://packagist.org/packages/mrdth/decipher-api)[ RSS](/packages/mrdth-decipher-api/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (3)Dependencies (4)Versions (11)Used By (0)

Decipher API
------------

[](#decipher-api)

This package provides a PHP wrapper for the FocusVision Decipher API, along with binding for using it in Laravel applications.

#### Installation

[](#installation)

Install with composer:

```
composer require mrdth/decipher-api
```

#### Usage In Laravel

[](#usage-in-laravel)

Add two new env vars:

- DECIPHER\_API\_URI\_BASE - base URI for the decipher api (E.g. )
- DECIPHER\_API\_KEY - API key for the application

The package will be auto-registered, and can be accessed via it's facade.

All calls to the API via the wrapper should be carried out inside a try - catch block; The wrapper does not deal with any Exceptions thrown by the underlying Guzzle client.

```
$directory = 'selfserve/99d';
$survey_id = '12345';

\Decipher::setServerDirectory($directory)->setSurveyId($survey_id);

try {
    $survey_structure = \Decipher::getSurveyStructure('json');

    // Do whatever with $survey object
} catch (\GuzzleHttp\Exception\RequestException $e) {
    echo 'Error making request, server responded: ' . $e->getCode();
}
```

#### Usage as a standalone PHP Package

[](#usage-as-a-standalone-php-package)

```
use MrDth\DecipherApi\Factories\Client;
use MrDth\DecipherApi\Decipher;

$api_uri = 'https://v2.decipherinc.com/api/v1/';
$api_key = 'OBVIOUSLYFAKEAPIKEY';
$directory = 'selfserve/99d';
$survey_id = '12345';

$client = new Client($api_uri, $api_key);
$decipher = new Decipher($client, $api_uri, $api_key);
```

All calls to the API via the wrapper should be carried out inside a try - catch block; The wrapper does not deal with any Exceptions thrown by the underlying Guzzle client.

```
$decipher->setServerDirectory($directory)->setSurveyId($survey_id);

try {
    $survey_structure = $decipher->getSurveyStructure('json');

    // Do whatever with $survey object
} catch (\GuzzleHttp\Exception\RequestException $e) {
    echo 'Error making request, server responded: ' . $e->getCode();
}
```

#### Methods exposed via the wrapper

[](#methods-exposed-via-the-wrapper)

- getSurveyList() - Get a list of all surveys available with the current API key.
- setServerDirectory(string $directory) - Directory where your projects are stored on the decipher server
- setSurveyId(int $id) - Set the ID of the current survey to work with.
- setCondition(string $condition) - Condition required to retrieve the participant. This is a Python condition as if you would enter in survey logic or crosstabs. For example, “qualified and q3.r2” retrieves only participants that were qualified and answered q3 as r2.
- getSurveyStructure(string $format) - Retrieve the structure of available questions for a survey, returning htem in the specified format. Valid formats are: html, json, text, tab
- getSurveyData(array $fields = \['all'\], string $format = 'json') - Retrieve the responses to the question IDs passed in $fields from Decipher. Note: uuid &amp; status fields will always be returned. Any condition set using ::setCondition() will be applied
- getSurveyFile(string $filename) - Retrieve the survey file called $filename as a string.

###  Health Score

30

—

LowBetter than 62% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 95.5% 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 ~63 days

Recently: every ~89 days

Total

7

Last Release

2038d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/781215?v=4)[mrdth](/maintainers/mrdth)[@mrdth](https://github.com/mrdth)

---

Top Contributors

[![mrdth](https://avatars.githubusercontent.com/u/781215?v=4)](https://github.com/mrdth "mrdth (21 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/mrdth-decipher-api/health.svg)

```
[![Health](https://phpackages.com/badges/mrdth-decipher-api/health.svg)](https://phpackages.com/packages/mrdth-decipher-api)
```

###  Alternatives

[statamic/cms

The Statamic CMS Core Package

4.8k3.6M983](/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)
