Download the PHP package heimrichhannot/contao-api-bundle without Composer

On this page you can find all versions of the php package heimrichhannot/contao-api-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package contao-api-bundle

Contao api bundle

A generic API with restricted access to provide access to 3rd party applications.

Login /api/login/member or api/login/user

Login is done via symfony guard authenticator in combination with contao members tl_member or users tl_user. After successful login a volatile token (default: 24 hours) will be returned that is used for any api and must be provided within request headers Authorization: Bearer {{token}};

Create an app with an custom api key

Visit your contao backend at http://domain.tld/contao?do=api_apps and create your first app. Access can be restricted for member or user groups. Admin users tl_user will have access to every api by default. For each request beside the login routes you must provide the generated API key as GET Parameter.

Resource /api/resource/{resource_alias}

To add your custom resource, simply add an service within your bundles or app services.yml:

And register your resource configuration within your bundles or app config.yml:

To get your config.yml loaded properly, your Plugin class must implement the interface Contao\ManagerPlugin\Config\ExtensionPluginInterface:

Do not forget to clear the symfony cache afterwards!

Now you are able to access your resource through /api/resource/my_resource.

Now you are able to access crud functionality by using the related HTTP method:

Path HTTP-Method Resource-Method (Mapping)
/api/resource/my_resource POST create() new resource
/api/resource/my_resource/23 PUT update() existing resource with id 23
/api/resource/my_resource GET list() all resources
/api/resource/my_resource/23 GET show() existing resource with id 23
/api/resource/my_resource/23 DELETE delete() existing resource with id 23

Available Resources

Service: huh.api.resource.member

Skeleton resource that provides simple crud functionality with contao member (tl_member) entity

Path HTTP-Method Resource-Method (Mapping) Additional GET Parameters
/api/resource/member POST create() new member -
/api/resource/member/23 PUT update() existing member with id 23 -
/api/resource/member GET list() all member limit, offset
/api/resource/member/23 GET show() existing member with id 23 -
/api/resource/member/23 DELETE delete() existing member with id 23 -

All versions of contao-api-bundle with dependencies

PHP Build Version
Package Version
Requires php Version ^7.4 || ^8.0
contao/core-bundle Version ^4.9
heimrichhannot/contao-utils-bundle Version ^2.214
firebase/php-jwt Version ^4.0 || ^5.0
symfony/config Version ^4.4 || ^5.0
symfony/translation-contracts Version ^1.0 || ^2.0 || ^3.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package heimrichhannot/contao-api-bundle contains the following files

Loading the files please wait ....