PHPackages                             rockielin/yii2-basic-restful-api-template - 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. rockielin/yii2-basic-restful-api-template

ActiveProject[API Development](/categories/api)

rockielin/yii2-basic-restful-api-template
=========================================

Simple web api with Yii2 basic template

071PHP

Since Jul 17Pushed 9y ago1 watchersCompare

[ Source](https://github.com/RockieLin/yii2-basic-restful-api-template)[ Packagist](https://packagist.org/packages/rockielin/yii2-basic-restful-api-template)[ RSS](/packages/rockielin-yii2-basic-restful-api-template/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependenciesVersions (1)Used By (0)

Yii2-basic-RESTful-API-template
===============================

[](#yii2-basic-restful-api-template)

Simple web api

Basic web api using POST or GET method with json response

[![Latest Stable Version](https://camo.githubusercontent.com/419ae1011efa8f0e9aca9e5d3e5225f49bdeff6b1d6da8042b0d2c702b17867d/68747470733a2f2f706f7365722e707567782e6f72672f726f636b69656c696e2f796969322d62617369632d7265737466756c2d6170692d74656d706c6174652f762f737461626c652e706e67)](https://packagist.org/packages/rockielin/yii2-basic-restful-api-template)[![Total Downloads](https://camo.githubusercontent.com/f06a3a25c77556a489bb80ce7f5ea502e933825a37e7bdd1b2e92034a964b3f8/68747470733a2f2f706f7365722e707567782e6f72672f726f636b69656c696e2f796969322d62617369632d7265737466756c2d6170692d74656d706c6174652f646f776e6c6f6164732e706e67)](https://packagist.org/packages/rockielin/yii2-basic-restful-api-template)

INSTALLATION
------------

[](#installation)

You can choose to install the application using one of the following methods.

### Install via Composer

[](#install-via-composer)

If you do not have [Composer](http://getcomposer.org/), you may install it by following the instructions at [getcomposer.org](http://getcomposer.org/doc/00-intro.md#installation-nix).

You can then install the application using the following command:

```
php composer.phar global require "fxp/composer-asset-plugin:~1.1"
php composer.phar create-project --prefer-dist --stability=dev rockielin/yii2-basic-restful-api-template project-name

```

Enable debug:
-------------

[](#enable-debug)

create file "develop.me" in /config/

Request:
--------

[](#request)

all request using POST or GET method.

POST parameter validate using in controller:

```
$this->checkParms(["parm1",
  "parm2",.....]);
```

Response:
---------

[](#response)

success reqponse format:

```
{"data":json object,"status":200}
```

error reqponse format:

```
{"data":"message","status":status code}
```

example of error output:

```
throw new \yii\web\HttpException(401, "authentication failed!");
```

###  Health Score

21

—

LowBetter than 18% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/9526336?v=4)[Rockie Lin](/maintainers/RockieLin)[@RockieLin](https://github.com/RockieLin)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/rockielin-yii2-basic-restful-api-template/health.svg)

```
[![Health](https://phpackages.com/badges/rockielin-yii2-basic-restful-api-template/health.svg)](https://phpackages.com/packages/rockielin-yii2-basic-restful-api-template)
```

###  Alternatives

[exsyst/swagger

A php library to manipulate Swagger specifications

35816.3M7](/packages/exsyst-swagger)[hubspot/api-client

Hubspot API client

24015.5M18](/packages/hubspot-api-client)[pocketmine/bedrock-protocol

An implementation of the Minecraft: Bedrock Edition protocol in PHP

172437.8k11](/packages/pocketmine-bedrock-protocol)[botman/driver-telegram

Telegram driver for BotMan

94452.6k6](/packages/botman-driver-telegram)

PHPackages © 2026

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