Get the latest version of your project

23. Februar 2023TYPO3TYPO3 11

We have released an extension to retrieve the current TYPO3 release of a remote project with a simple link like example.com/api/v1/version.

The extension implements a simple REST API using the slim microframework. Thanks to B13 and the b13/slimphp-bridge extension.

1. Get the extension 

https://packagist.org/packages/code711/code711-api

2. Add config

In sites/[site]/config.yaml add: 

 

imports:
  - resource: EXT:code711_api/Configuration/Routes/Api.yaml

 

3. Add credentials

We use basic authentication to prevent open access to the current release for security reasons. The credentials could be stored in an .env file in the project root.

 

REST_API_USER=XXX
REST_API_PW=XXX

 

4. Flush cache

5. Test

To test the REST API, you can use the Postman REST client:
https://www.postman.com/product/rest-client/