Projects

Authentication
The API key should be sent as a Bearer token in the Authorization header of the request. Get your API key.
List

API endpoint

GET
https://phplens.lunatio.com/api/v1/projects

Request example

curl --location --request GET 'https://phplens.lunatio.com/api/v1/projects' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {api_key}'

Parameters

Name
Type
Description
search
optional string
Search query.
search_by
optional string
Search by. Possible values are: name for Name. Defaults to: name.
favorite
optional boolean
Filter by favorite.
sort_by
optional string
Sort by. Possible values are: id for Date created, name for Name. Defaults to: id.
sort
optional string
Sort. Possible values are: desc for Descending, asc for Ascending. Defaults to: desc.
per_page
optional integer
Results per page. Possible values are: 10, 25, 50, 100. Defaults to: 10.
Show

API endpoint

GET
https://phplens.lunatio.com/api/v1/projects/{id}

Request example

curl --location --request GET 'https://phplens.lunatio.com/api/v1/projects/{id}' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {api_key}'
Store

API endpoint

POST
https://phplens.lunatio.com/api/v1/projects

Request example

curl --location --request POST 'https://phplens.lunatio.com/api/v1/projects' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Authorization: Bearer {api_key}' \
--data-urlencode 'name={name}' \
--data-urlencode 'domain={domain}' \
--data-urlencode 'description={description}'

Parameters

Name
Type
Description
name
required string
Name.
domain
required string
Domain.
description
required string
Description.
country
optional string
Country. The value must be in ISO 3166-1 alpha-2 format.
language
optional string
Language. The value must be in ISO 639-1 alpha-2 format.
privacy
optional integer
Privacy. Possible values are: 0 for Public, 1 for Private, 2 for Password.
password
optional string
Password. Only works with privacy field set to 2.
email_reports
optional integer
Periodic email reports. Possible values are: 0 for Disabled, 1 for Enabled. Defaults to: 0.
Update

API endpoint

PUT PATCH
https://phplens.lunatio.com/api/v1/projects/{id}

Request example

curl --location --request PUT 'https://phplens.lunatio.com/api/v1/projects/{id}' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Authorization: Bearer {api_key}'

Parameters

Name
Type
Description
name
optional string
Name.
description
optional string
Description.
country
optional string
Country. The value must be in ISO 3166-1 alpha-2 format.
language
optional string
Language. The value must be in ISO 639-1 alpha-2 format.
privacy
optional integer
Privacy. Possible values are: 0 for Public, 1 for Private, 2 for Password.
password
optional string
Password. Only works with privacy field set to 2.
email_reports
optional integer
Periodic email reports. Possible values are: 0 for Disabled, 1 for Enabled. Defaults to: 0.
Delete

API endpoint

DELETE
https://phplens.lunatio.com/api/v1/projects/{id}

Request example

curl --location --request DELETE 'https://phplens.lunatio.com/api/v1/projects/{id}' \
--header 'Authorization: Bearer {api_key}'