PHPackages                             openi-ict/api-builder - 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. openi-ict/api-builder

ActiveProject[API Development](/categories/api)

openi-ict/api-builder
=====================

Implementation of the API Builder for OPENI

v1.2.0(11y ago)202GPL-2.0CSSPHP &gt;=5.4.0

Since Dec 9Pushed 10y ago12 watchersCompare

[ Source](https://github.com/OPENi-ict/api-builder)[ Packagist](https://packagist.org/packages/openi-ict/api-builder)[ Docs](http://www.openi-ict.eu)[ RSS](/packages/openi-ict-api-builder/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (20)Versions (9)Used By (0)

OPENi API Builder
=================

[](#openi-api-builder)

OPENi API Builder is a web project that allows developers to add Objects and combine methods for use with the official [OPENi API Framework](https://github.com/OPENi-ict/api-framework).

[![Latest Stable Version](https://camo.githubusercontent.com/eb40a0f7077bba99eb773bb6fa3681bcd6a04d291939370626e00cc182a9f08e/68747470733a2f2f706f7365722e707567782e6f72672f6f70656e692d6963742f6170692d6275696c6465722f762f737461626c652e706e67)](https://packagist.org/packages/openi-ict/api-builder)[![Build Status](https://camo.githubusercontent.com/b47bc63aae94ec14424557e29ea569ddfd029c5afeaf92f50ee0377cc8256e64/68747470733a2f2f7472617669732d63692e6f72672f4f50454e692d6963742f6170692d6275696c6465722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/OPENi-ict/api-builder)

DIRECTORY STRUCTURE
-------------------

[](#directory-structure)

```
  .docs/              contains Documents for building the API Builder (mockups etc.)
  assets/             contains assets definition
  commands/           contains console commands (controllers)
  config/             contains application configurations
  controllers/        contains Web controller classes
  mail/               contains view files for e-mails
  migrations/         contains migrations for the database to be configured automatically
  models/             contains model classes
  runtime/            contains files generated during runtime
  tests/              contains various tests for the basic application (not yet fully charged)
  vendor/             contains dependent 3rd-party packages
  views/              contains view files for the Web application
  web/                contains the entry script and Web resources
  widgets/            contains additional widgets used in this app

```

REQUIREMENTS
------------

[](#requirements)

The minimum requirement by this application template that your Web server supports PHP 5.4.0. Additional packages required are marked in the composer.json file.

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

[](#installation)

Download the latest [release](https://github.com/OPENi-ict/api-builder/releases/) or the zipped master source code from [api-builder](https://github.com/OPENi-ict/api-builder/archive/master.zip)into a directory named `api-builder` that is directly under the Web root.

Run a command prompt in that directory and type:

```
composer global require "fxp/composer-asset-plugin:1.0.0"
composer install

```

**NOTE:** 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).

This will fetch all the required packages and save them in your vendor folder.

You can then access the application through the following URL:

```
http://localhost/api-builder/web/

```

**NOTE:** For having recommendation features in the API views, [Elasticsearch](https://www.elastic.co/products/elasticsearch) should be installed from [here](https://www.elastic.co/products/elasticsearch).

CONFIGURATION
-------------

[](#configuration)

### Database

[](#database)

Create a file `config/db.php` with real data, for example:

```
return [
    'class' => 'yii\db\Connection',
    'dsn' => 'mysql:host=localhost;dbname=apiBuilder',
    'username' => 'root',
    'password' => '1234',
    'charset' => 'utf8',
];
```

Or rename the dbSample.php with your actual data.

Then, open a terminal and run

```
yii migrate

```

to make all the tables in the database.

Also check and edit the other files in the `config/` directory to customize your application. If your website is different than  , you need to update the url property of the js file in /web/js/swagger/site.js .

At last, you need to rename the /web/indexSample.php to /web/index.php for the application to work and comment out the environment lines if you are in production environment.

### Elasticsearch

[](#elasticsearch)

This request should be made to create the 'api-builder' index:

```
curl -XPUT http://127.0.0.1:9200/api-builder
curl -XPOST http://127.0.0.1:9200/api-builder/_close

```

Recommended setting setup:

```
curl -XPUT 'http://127.0.0.1:9200/api-builder/_settings' -d
'{
     "settings": {
         "index": {
             "analysis": {
                 "filter": {
                     "stem_filter": {
                         "type": "stemmer",
                         "name": "english"
                     },
                     "low_filter": {
                         "type": "lowercase"
                     },
                     "synonym_filter": {
                         "type": "synonym",
                         "synonyms_path": "analysis/synonyms.txt"
                     },
                     "stop_filter": {
                         "type": "stop",
                         "stopwords_path": "analysis/stopwords.txt"
                     }
                 },
                 "analyzer": {
                     "analyzer": {
                         "type": "custom",
                         "tokenizer": "standard",
                         "filter": [
                             "low_filter",
                             "synonym_filter",
                             "stop_filter",
                             "stem_filter"
                         ],
                         "char_filter": [
                             "html_strip"
                         ]
                     }
                 }
             }
         }
     }
 }'

```

**NOTE:** This of course implies that you have a synonyms and stopwords texts in your elasticsearch/config/analysis/ folder. Samples can be found at the root folder of the project.

```
curl -XPUT 'http://127.0.0.1:9200/api-builder/api/_mapping' -d
'{
     "api": {
         "properties": {
             "objects": {
                 "type": "nested",
                 "properties": {
                     "name": {
                         "type": "string",
                         "index": "analyzed",
                         "analyzer": "analyzer"
                     },
                     "description": {
                         "type": "string",
                         "index": "analyzed",
                         "analyzer": "analyzer"
                     },
                     "properties": {
                         "type": "nested",
                         "properties": {
                             "name": {
                                 "type": "string",
                                 "index": "analyzed",
                         "analyzer": "analyzer"
                             },
                             "type": {
                                 "type": "string",
                                 "index": "not_analyzed"
                             }
                         }
                     }
                 }
             }
         }
     }
 }'

```

```
curl -XPOST http://127.0.0.1:9200/api-builder/_open

```

TECH STACK USED FOR DEVELOPMENT - MANY THANKS!
----------------------------------------------

[](#tech-stack-used-for-development---many-thanks)

[yii 2](http://www.yiiframework.com)

[composer](https://getcomposer.org/)

[bootstrap](http://getbootstrap.com/)

[bootstrap-material-design](https://github.com/FezVrasta/bootstrap-material-design/)

[Krajee Yii Extensions](http://demos.krajee.com/)

[Elasticsearch](https://www.elastic.co/products/elasticsearch)

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 99.7% 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 ~64 days

Total

3

Last Release

4050d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/0bba2708516cebc0c91c591ca190813d6b9585d79150d0629ea269a5021beb33?d=identicon)[romdim](/maintainers/romdim)

---

Top Contributors

[![romdim](https://avatars.githubusercontent.com/u/2739250?v=4)](https://github.com/romdim "romdim (344 commits)")[![evmorfia-b](https://avatars.githubusercontent.com/u/5096180?v=4)](https://github.com/evmorfia-b "evmorfia-b (1 commits)")

---

Tags

phpapibuilderyii2OPENi

### Embed Badge

![Health badge](/badges/openi-ict-api-builder/health.svg)

```
[![Health](https://phpackages.com/badges/openi-ict-api-builder/health.svg)](https://phpackages.com/packages/openi-ict-api-builder)
```

###  Alternatives

[ignatenkovnikita/yii2-swagger

Swagger UI v3 intergation with yii2

128.0k](/packages/ignatenkovnikita-yii2-swagger)

PHPackages © 2026

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