PHPackages                             leadingsystems/contao-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. leadingsystems/contao-api

ActiveContao-bundle[API Development](/categories/api)

leadingsystems/contao-api
=========================

Leading Systems API as a Contao bundle

2.1.2(1y ago)03.3k↓58.3%[1 issues](https://github.com/leadingsystems/contao-api/issues)1proprietaryPHPPHP ^7.4 || ^8.0

Since Mar 15Pushed 1y ago1 watchersCompare

[ Source](https://github.com/leadingsystems/contao-api)[ Packagist](https://packagist.org/packages/leadingsystems/contao-api)[ RSS](/packages/leadingsystems-contao-api/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (9)Dependencies (1)Versions (11)Used By (1)

Leading Systems API bundle for Contao 4
=======================================

[](#leading-systems-api-bundle-for-contao-4)

The API bundle adds the Leading Systems API functionality to Contao 4.

This extension is meant to assist other Leading Systems extensions such as the e-commerce extension Merconis. Technically, standalone usage is possible but we can't offer support for this extension unless it's combined with Merconis.

For more information visit the [Merconis website](https://merconis.com)

What is LS API and what is it good for?
---------------------------------------

[](#what-is-ls-api-and-what-is-it-good-for)

LS API adds REST-like API functionality to Contao and allows you to write your own API resources.

LS API can be used in the Contao frontend and backend and it comes with a basic authentication and authorization system.

Usage
-----

[](#usage)

### Getting started

[](#getting-started)

#### Backend usage

[](#backend-usage)

With this Contao extension installed the Contao backend navigation has a new navigation group "LS API". One of the navigation items is labeled "API receiver". A click on it opens the backend API endpoint in the browser window. Since no API resource has been specified, the API will present you a JSON response with information about all available resources.

The URL of the backend API endpoint will look like this:

`http://mydomain.com/contao?do=be_mod_ls_apiReceiver`

To call a specific API resource, the parameter "resource" needs to be added to the URL:

`http://mydomain.com/contao?do=be_mod_ls_apiReceiver&resource=getCurrentBackendUserName`

Calling this URL directly would result in an "access denied" response because we didn't specify an API key:

```
{
"status": "error",
"data": null,
"message": "Access denied",
"code": 0
}

```

In order to use our API credentials when accessing a resource, we need to make a POST request to the API url sending the following POST parameters:

```
ls_api_key:       SOME-KEY-SPECIFIED-IN-THE-CONTAO-BACKEND
ls_api_username:  username-of-an-api-user
ls_api_password:  password-of-an-api-user

```

The API can accept API users, frontend users or backend users, depending on the requested resource. If a resource accepts only API users (users explicitly defined as API users in the backend) the parameters `ls_api_username` and `ls_api_password` are mandatory.

If a resource accepts frontend or backend users the parameter `ls_api_key` still has to be provided but the user credentials for an API user can be omitted if there's a frontend or backend user logged in.

#### Frontend usage

[](#frontend-usage)

To create a frontend API endpoint you have to create a frontend module of the type `LS API RECEIVER` and place that frontend module on a frontend page (e.g. using a content element or placing it in the layout).

You can then call the API by simply calling this page:

`http://mydomain.com/api.html`

To call a specific API resource, the parameter "resource" needs to be added to the URL:

`http://mydomain.com/api/resource/getCurrentFrontendUserName.html`

Calling this URL directly would result in an "access denied" response because we didn't specify an API key. The frontend API endpoint behaves in exactly the same way as mentioned before with the backend API endpoint.

###  Health Score

40

—

FairBetter than 86% of packages

Maintenance39

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity74

Established project with proven stability

 Bus Factor1

Top contributor holds 61% 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 ~313 days

Recently: every ~258 days

Total

9

Last Release

525d ago

PHP version history (2 changes)v2.0.0PHP &gt;=7.0.0

2.1.0PHP ^7.4 || ^8.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/36990539?v=4)[leadingsystems](/maintainers/leadingsystems)[@leadingsystems](https://github.com/leadingsystems)

---

Top Contributors

[![chiron501](https://avatars.githubusercontent.com/u/11508225?v=4)](https://github.com/chiron501 "chiron501 (36 commits)")[![vstuber](https://avatars.githubusercontent.com/u/1235606?v=4)](https://github.com/vstuber "vstuber (16 commits)")[![superMi88](https://avatars.githubusercontent.com/u/57102323?v=4)](https://github.com/superMi88 "superMi88 (6 commits)")[![tbu123](https://avatars.githubusercontent.com/u/60428286?v=4)](https://github.com/tbu123 "tbu123 (1 commits)")

---

Tags

bundlecontaoleading systems

### Embed Badge

![Health badge](/badges/leadingsystems-contao-api/health.svg)

```
[![Health](https://phpackages.com/badges/leadingsystems-contao-api/health.svg)](https://phpackages.com/packages/leadingsystems-contao-api)
```

###  Alternatives

[dieschittigs/contao-content-api

Access Contao content via an easy to use JSON-API

412.4k1](/packages/dieschittigs-contao-content-api)[contao-community-alliance/dc-general

Universal data container for Contao

1680.8k90](/packages/contao-community-alliance-dc-general)[markocupic/calendar-event-booking-bundle

Contao Calendar Event Booking Bundle

135.2k1](/packages/markocupic-calendar-event-booking-bundle)

PHPackages © 2026

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