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 6d 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 64% 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

1992d ago

### Community

Maintainers

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

[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)
