PHPackages                             damidevelopment/yii2-api-utils - 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. damidevelopment/yii2-api-utils

ActiveYii2-extension[API Development](/categories/api)

damidevelopment/yii2-api-utils
==============================

API utils for Yii2 framework

v1.2.3(6y ago)141[8 issues](https://github.com/damidevelopment/yii2-api-utils/issues)[2 PRs](https://github.com/damidevelopment/yii2-api-utils/pulls)1MITPHPPHP &gt;=7.2

Since Mar 28Pushed 6y ago2 watchersCompare

[ Source](https://github.com/damidevelopment/yii2-api-utils)[ Packagist](https://packagist.org/packages/damidevelopment/yii2-api-utils)[ RSS](/packages/damidevelopment-yii2-api-utils/feed)WikiDiscussions master Synced 5d ago

READMEChangelogDependencies (1)Versions (13)Used By (1)

Yii2 API module
===============

[](#yii2-api-module)

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

[](#installation)

To be able to install this module, first you have to modify your `composer.json` file like this.

```
{
    "minimum-stability": "dev",
    "repositories": [
        {
            "type": "git",
            "url": "gogs@gogs.damidev.com:dami-libraries/yii2-api-module.git"
        }
    ]
}

```

You can use https url version when you don't have ssh key in gogs.

```
{
    "minimum-stability": "dev",
    "repositories": [
        {
            "type": "git",
            "url": "https://gogs.damidev.com/dami-libraries/yii2-api-module.git"
        }
    ]
}

```

After this you can call composer require.

```
composer require dami-libraries/yii2-api-module

```

Authentication
--------------

[](#authentication)

As default every request for logged user must contain `Access-Token` header. You can configure this behavior thru `damidevelopment\apiutils\controllers\RestController::$authenticator` property.

Multilangual API output
-----------------------

[](#multilangual-api-output)

ContentNegotiator works with `Accept-Language` header. If you need multilangual API, you need to add `Accept-Language` header to request and define acceptLanguages array in app params. See example bellow.

```
// config/params.php
return [
    'acceptLanguages' => [
        'en' => 'en-GB', // accept en as en-GB
        'cs-CZ',         // accept cs or cs-CZ as cs-CZ
        'de',            // accept de only (should not be used, better use de => de-DE)
    ]
];

```

See [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) to find language code.

If no `Accept-Language` header is found or language is not supported, first language in acceptLanguages array will be used as default. If no acceptLanguages is defined, is used base app language.

TODO make generating of language list in `acceptLanguages` param automatic, not user defined.

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 52% 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 ~46 days

Recently: every ~78 days

Total

8

Last Release

2195d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7a9d02bef4deaf2369bae885f187a5e8dfe73087bfcd57a699a51ada577e6b8f?d=identicon)[damidevelopment](/maintainers/damidevelopment)

---

Top Contributors

[![martinstepanek](https://avatars.githubusercontent.com/u/17912717?v=4)](https://github.com/martinstepanek "martinstepanek (26 commits)")[![hrasekj](https://avatars.githubusercontent.com/u/6674565?v=4)](https://github.com/hrasekj "hrasekj (23 commits)")[![Rutherther](https://avatars.githubusercontent.com/u/12197024?v=4)](https://github.com/Rutherther "Rutherther (1 commits)")

---

Tags

apiyii2

### Embed Badge

![Health badge](/badges/damidevelopment-yii2-api-utils/health.svg)

```
[![Health](https://phpackages.com/badges/damidevelopment-yii2-api-utils/health.svg)](https://phpackages.com/packages/damidevelopment-yii2-api-utils)
```

###  Alternatives

[dotzero/yii2-amocrm

Расширение для Yii Framework 2 реализующее клиент для работы с API amoCRM

1639.7k](/packages/dotzero-yii2-amocrm)[skeeks/yii2-google-api

Component for work with google api based on google/apiclient

1243.1k1](/packages/skeeks-yii2-google-api)

PHPackages © 2026

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