Lamplight API php client
This project is maintained by mattparker
The base uri to use is https://lamplight.online/api. To this uri, you need to append two parameters, separated by a forward slash (/), which describe what kind of data you want, and the type of request: https://lamplight.online/api/what/howmany: for example https://lamplight.online/api/workarea/all
All requests need the API credentials you get from within Lamplight (admin > system admin > publishing settings). These should be added to every request. You also need to include a format=json key-pair. A full request would like something like this:
https://lamplight.online/api/workarea/all?format=json&lampid=123&project=4&key=<api_key>
Note that these parameters can be passed as query pairs or as part of the path if you prefer.
Data returned from GET requests will be a json structure like this:
{
"data": [
{"id":1, "title":"This is a test record"},
{"id":2, "title":"This is another"}
],"meta":{
"numRecords": 2,
"totalRecords": 20
}
}
Although the fields in the data array will vary depending on the data type.
The php client makes it easy to interact with the Lamplight API. This new version aims to be backwards compatible with the previous version as far as possible, but make use of modern php and standards (php 7.4+).
Introduction and authentication
Requesting and creating profiles