PHPackages                             arfaram/ezrestdemobundle - 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. arfaram/ezrestdemobundle

ActiveApplication[API Development](/categories/api)

arfaram/ezrestdemobundle
========================

Extending the eZPlatform API Demo

v1.1.2(8y ago)1322MITPHP

Since Dec 9Pushed 7y ago2 watchersCompare

[ Source](https://github.com/arfaram/ezrestdemobundle)[ Packagist](https://packagist.org/packages/arfaram/ezrestdemobundle)[ Docs](https://github.com/arfaram/ezrestdemobundle)[ RSS](/packages/arfaram-ezrestdemobundle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (5)Used By (0)

EzRestBundle
============

[](#ezrestbundle)

Extending the Ez Rest API - demo

Requirement
-----------

[](#requirement)

eZPlatform 1.7 + , symfony 2.8 +

Use Case -Demo
--------------

[](#use-case--demo)

See presentation to understand better how to extend the ezplatform REST API:[https://arfaram.github.io/slides/ezsysztems\_meetup\_20171130](https://arfaram.github.io/slides/ezsysztems_meetup_20171130)

- Export all content using specific contentType ID from specific path. content fieldTypes should be specified.
- How to use GET or POST verbs using `ValueObjectVisitor` and `InputParser`

See List of required and optional parameters and examples below

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

[](#installation)

```
composer require arfaram/ezrestdemobundle:^1.0

```

- Activate the Bundle in AppKernel.php

```
    public function registerBundles()
    {
        $bundles = array(
            //...
            new Ez\RestDemoBundle\EzRestDemoBundle(),

```

- Add the bundle routing in routing.yml

```
ez_rest:
    resource: "@EzRestDemoBundle/Resources/config/routing.yml"
    prefix:   /

```

- Clear the cache

```
php app/console cache:clear

```

Request Parameters
------------------

[](#request-parameters)

### Mandatory

[](#mandatory)

- `subtree`: Specify the location from where content will be fetched.(default:2)
- `fields`: Only **ezstring, ezrichtext and ezimage** fields are supported in this demo.

### Optional

[](#optional)

- `limit`: Number of content items to return
- `sort`: ContentName sorting. Possible values: `ASC` or `DESC`. (default:*ASC*)
- `lang`: Content Language (e.g. `ger-DE`)
- `hidden`: `true` or `false` fetch visible or hidden content. (default:*false* )
- `image_variation`: (default:*original*)

GET Example
-----------

[](#get-example)

```
Method: GET
Host:http://wwww.domain.com/api/ezp/v2/ez_rest/contentTypeContent/GET/48?&limit=2&subtree=99&fields=title,summary,description,main_image&sort=DESC&lang=ger-DE&image_variation=small&hidden=false

Accept:application/xml

```

-&gt; Returns content with contenttype id:48 and parent locationId:99.

See XML and JSON examples below

POST Example
------------

[](#post-example)

```
Method: POST
Host:http://wwww.domain.com/api/ezp/v2/ez_rest/contentTypeContent/POST

X-CSRF-Token:xxxxxxxxxxxxxxxxxxxxxxxxxx
Content-Type:application/vnd.custom.ContentTypeContentList
Accept:application/xml

```

XML payload

```

    50
    2
    109
    DESC
    false
    ger-DE
    small

    		title

    		summary

    		description

    		main_image

```

#### XML output example

[](#xml-output-example)

```

        101
        48
        blog_post
        ger-DE
        2017-07-09T22:15:13+02:00
        /Trips/Article
        /1/2/94/95/99/101/

        Article
        &lt;![CDATA[&lt;section xmlns=&quot;http://ez.no/namespaces/ezpublish5/xhtml5&quot;&gt;&lt;p&gt;THE SUMMARY.&lt;/p&gt;&lt;/section&gt;
]]&gt;
        &lt;![CDATA[&lt;section xmlns=&quot;http://ez.no/namespaces/ezpublish5/xhtml5&quot;&gt;&lt;p&gt;THE DESCRIPTION&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;/section&gt;
]]&gt;
        http://www.domain.com/var/site/storage/images/_aliases/small/7/7/4/0/477-1-ger-DE/article.jpg

```

#### Json output example

[](#json-output-example)

```
Accept:application/json

```

```
{
    "contentList": {
        "_media-type": "application/vnd.ez.api.contentList+json",
        "content": [
            {
                "_media-type": "application/vnd.ez.api.content+json",
                "contentId": 101,
                "contentTypeId": 48,
                "identifier": "blog_post",
                "language": "ger-DE",
                "publishedDate": "2017-07-09T22:15:13+02:00",
                "uri": "/Trips/Article",
                "categoryPath": "/1/2/94/95/99/101/",
                "mainLocation": {
                    "_media-type": "application/vnd.ez.api.mainLocation+json",
                    "_href": "/api/ezp/v2/content/locations/1/2/94/95/99/101/"
                },
                "locations": {
                    "_media-type": "application/vnd.ez.api.locations+json",
                    "_href": "/api/ezp/v2/content/objects/101/locations"
                },
                "title": "Article",
                "summary": "THE SUMMARY.\n]]>",
                "description": "THE DESCRIPTION\n]]>",
                "main_image": "http://www.domain.com/var/site/storage/images/_aliases/small/7/7/4/0/477-1-ger-DE/article.jpg"
            }
        ]
    }
}

```

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 90% 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 ~4 days

Total

3

Last Release

3064d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/f444701f5c4c36a0bce616a679bf2e638d06a01f639acebed6d128dd9fca3182?d=identicon)[arfaram](/maintainers/arfaram)

---

Top Contributors

[![arfaram](https://avatars.githubusercontent.com/u/793247?v=4)](https://github.com/arfaram "arfaram (18 commits)")[![reithor](https://avatars.githubusercontent.com/u/34274688?v=4)](https://github.com/reithor "reithor (2 commits)")

---

Tags

ezplatform

### Embed Badge

![Health badge](/badges/arfaram-ezrestdemobundle/health.svg)

```
[![Health](https://phpackages.com/badges/arfaram-ezrestdemobundle/health.svg)](https://phpackages.com/packages/arfaram-ezrestdemobundle)
```

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M475](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M270](/packages/twilio-sdk)[knplabs/github-api

GitHub API v3 client

2.2k15.8M186](/packages/knplabs-github-api)[facebook/php-business-sdk

PHP SDK for Facebook Business

90121.9M33](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

73813.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

263103.1M452](/packages/google-gax)

PHPackages © 2026

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