Compare commits

...

3 Commits

Author SHA1 Message Date
e3dfc3431d v.1.2.4 release 2026-06-21 13:29:42 +02:00
ae1f3cca1b v.1.2.3 released 2026-06-14 23:37:44 +02:00
8746058c79 Different GET API calls documented 2026-06-14 23:37:33 +02:00
10 changed files with 395 additions and 31 deletions

View File

@@ -23,7 +23,7 @@ None.
$curl = curl_init(); $curl = curl_init();
curl_setopt_array($curl, [ curl_setopt_array($curl, [
CURLOPT_URL => $baseUrl . '/api/v1/office/stompjes/' . 'builder[0][where][0]=user_uuid&builder[0][where][1]=5219edbb-512d-11f1-8bac-bc2411125ba4', CURLOPT_URL => $baseUrl . '/api/v1/office/stompjes/' . '?builder[0][where][0]=user_uuid&builder[0][where][1]=5219edbb-512d-11f1-8bac-bc2411125ba4',
CURLOPT_RETURNTRANSFER => true, CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [ CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . $token, 'Authorization: Bearer ' . $token,

View File

@@ -0,0 +1,68 @@
# GET Portal settings
This will get all the portal settings from the database except the `mail_smtp_pass`.
#### Location
```
/api/v1/portal-management/configure/
```
#### Permissions required
`admin-portalsettings` RO.
#### Body parameters
| Parameter | Type | Required | Description |
| -------------------- | ------ | -------- | ----------- |
| builder[0][where][0] | string | no | |
| builder[0][where][1] | string | no | |
### Example Body (json)
None.
### Example Request
```php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => $baseUrl . '/api/v1/portal-management/configure/',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . $token,
],
]);
$response = curl_exec($curl);
$httpCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);
if ($response === false) {
echo curl_error($curl);
}
curl_close($curl);
```
### Example Response
```json
[
{
"portal_uuid":"effda0c0-0830-11f0-9300-7e99ed98b725",
"portal_name":"Sentri",
"portal_slugify":"sentri",
"portal_provider_name":"Mooij.me",
"portal_provider_slugify":"sentri",
"admin_auth_methods":"database_auth",
"cacert_url":"N\/A",
"autop_url":"N\/A",
"mail_from_name":"Sentri",
"mail_from_address":"sentri@mooij.me",
"mail_smtp_host":"smtp.mooij.me",
"mail_smtp_secure":"tls",
"mail_smtp_port":587,
"mail_smtp_auth":1,
"mail_smtp_user":"noreply"
}
]
```
#### Known errors or issues.
None are known at the time
If you do encounter issues and get an http code in return, check the response codes on this page.

View File

@@ -0,0 +1,64 @@
# GET Group permissions
This will get all the permissions assigned to user-groups.
#### Location
```
/api/v1/portal-management/group-permissions/
```
#### Permissions required
`admin-access-control-permissions` RO.
#### Body parameters
| Parameter | Type | Required | Description |
| -------------------- | ------ | -------- | ----------- |
| builder[0][where][0] | string | no | |
| builder[0][where][1] | string | no | |
### Example Body (json)
None.
### Example Request
```php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => $baseUrl . '/api/v1/portal-management/group-permissions/' . '?builder[0][where][0]=user_group_uuid&builder[0][where][1]=0e1c6269-0da5-11f0-9300-7e99ed98b725',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . $token,
],
]);
$response = curl_exec($curl);
$httpCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);
if ($response === false) {
echo curl_error($curl);
}
curl_close($curl);
```
### Example Response
```json
[
{
"permission_uuid":"11abc93d-c265-11f0-95da-7e99ed98b725",
"user_group_uuid":"0e1c6269-0da5-11f0-9300-7e99ed98b725",
"permission_value":"RW",
"permission_restrict_to_tenant":0
},
{
"permission_uuid":"1425fa24-2b6b-11f0-9300-7e99ed98b725",
"user_group_uuid":"0e1c6269-0da5-11f0-9300-7e99ed98b725",
"permission_value":"RW",
"permission_restrict_to_tenant":0
},
...
]
```
#### Known errors or issues.
None are known at the time
If you do encounter issues and get an http code in return, check the response codes on this page.

View File

@@ -1,5 +1,5 @@
# GET Modules # GET Modules
This call gets all the Sentri modules information. This call gets all the Sentri modules information.
#### Location #### Location
``` ```
@@ -10,7 +10,10 @@ This call gets all the Sentri modules information.
`admin-modules` RO `admin-modules` RO
#### Body parameters #### Body parameters
None. | Parameter | Type | Required | Description |
| -------------------- | ------ | -------- | ----------- |
| builder[0][where][0] | string | no | |
| builder[0][where][1] | string | no | |
### Example Body (json) ### Example Body (json)
None. None.
@@ -20,7 +23,7 @@ None.
$curl = curl_init(); $curl = curl_init();
curl_setopt_array($curl, array( curl_setopt_array($curl, array(
CURLOPT_URL => $baseUrl . '/api/v1/portal-management/modules/', CURLOPT_URL => $baseUrl . '/api/v1/portal-management/modules/' . '?builder[0][where][0]=module_uuid&builder[0][where][1]=0f044275-1744-444c-9627-736310d7997e',
CURLOPT_CUSTOMREQUEST => 'GET', CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_RETURNTRANSFER => true, CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [ CURLOPT_HTTPHEADER => [
@@ -46,15 +49,6 @@ echo $response;
"module_description":null, "module_description":null,
"module_create_timestamp":1762695975, "module_create_timestamp":1762695975,
"module_modified_timestamp":null "module_modified_timestamp":null
},
{
"module_uuid":"247aa89e-2ffa-4cba-8672-3fef451255b7",
"module_name":"Customers",
"module_slugify":"customers",
"module_enabled":1,
"module_description":null,
"module_create_timestamp":1762696058,
"module_modified_timestamp":null
} }
] ]
``` ```

View File

@@ -10,7 +10,10 @@ This call gets all the permissions data.
`admin-access-control-permissions` RO. `admin-access-control-permissions` RO.
#### Body parameters #### Body parameters
None. | Parameter | Type | Required | Description |
| -------------------- | ------ | -------- | ----------- |
| builder[0][where][0] | string | no | |
| builder[0][where][1] | string | no | |
### Example Body (json) ### Example Body (json)
None. None.
@@ -20,7 +23,7 @@ None.
$curl = curl_init(); $curl = curl_init();
curl_setopt_array($curl, array( curl_setopt_array($curl, array(
CURLOPT_URL => $baseUrl . '/api/v1/portal-management/permissions/', CURLOPT_URL => $baseUrl . '/api/v1/portal-management/permissions/' . '?builder[0][where][0]=permission_name&builder[0][where][1]=admin-portalsettings',
CURLOPT_CUSTOMREQUEST => 'GET', CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_RETURNTRANSFER => true, CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [ CURLOPT_HTTPHEADER => [
@@ -31,13 +34,23 @@ curl_setopt_array($curl, array(
$response = curl_exec($curl); $response = curl_exec($curl);
curl_close($curl); curl_close($curl);
echo $response; echo $response;
``` ```
### Example Response ### Example Response
```json ```json
[
{
"permission_uuid":"1d018159-3109-11f0-9300-7e99ed98b725",
"permission_name":"admin-portalsettings",
"permission_slugify":"admin-portalsettings",
"permission_description":"Grants access to modify the global settings. It is advisable to restrict this permission to only the highest-level administrators.",
"permission_create_timestamp":1749933229,
"permission_modified_timestamp":null,
"module_uuid":"0f044275-1744-444c-9627-736310d7997e"
}
]
``` ```
#### Known errors or issues. #### Known errors or issues.

View File

@@ -53,5 +53,9 @@ curl_close($curl);
``` ```
#### Known errors or issues. #### Known errors or issues.
None are known at the time ```json
If you do encounter issues and get an http code in return, check the response codes on this page. {
"error":"Cannot delete record: dependent data exists."
}
```
This means there is still a user linked to the user-group, first make there are no users linked to this group before deleting.

View File

@@ -0,0 +1,58 @@
# GET user group
This call gets all the user-groups data.
#### Location
```
/api/v1/portal-management/user-groups/
```
#### Permissions required
`admin-access-control-user-groups` RO.
#### Body parameters
| Parameter | Type | Required | Description |
| -------------------- | ------ | -------- | ----------- |
| builder[0][where][0] | string | no | |
| builder[0][where][1] | string | no | |
### Example Body (json)
None.
### Example Request
```php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => $baseUrl . '/api/v1/portal-management/user-groups/' . '?builder[0][where][0]=user_group_uuid&builder[0][where][1]=0e1c6269-0da5-11f0-9300-7e99ed98b725',
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . $token,
'Content-Type: application/json'
]
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
```
### Example Response
```json
[
{
"user_group_uuid":"0e1c6269-0da5-11f0-9300-7e99ed98b725",
"user_group_name":"superuser",
"user_group_slugify":"superuser",
"user_group_type":"admin",
"user_group_weight":1,
"user_group_create_timestamp":1742680669,
"user_group_modified_timestamp":1749939827
}
]
```
#### Known errors or issues.
None are known at the time
If you do encounter issues and get an http code in return, check the response codes on this page.

View File

@@ -0,0 +1,70 @@
# GET user
This call gets nearly all the users data.
It will not send back the hashed password, MFA secret and other sensitive data.
#### Location
```
/api/v1/portal-management/users/
```
#### Permissions required
`admin-access-admins` RO.
#### Body parameters
| Parameter | Type | Required | Description |
| -------------------- | ------ | -------- | ----------- |
| builder[0][where][0] | string | no | |
| builder[0][where][1] | string | no | |
### Example Body (json)
None.
### Example Request
```php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => $baseUrl . '/api/v1/portal-management/users/' . '?builder[0][where][0]=user_uuid&builder[0][where][1]=0eda6269-0da5-11f0-9300-7e99ed98b725',
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . $token,
'Content-Type: application/json'
]
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
```
### Example Response
```json
[
{
"user_uuid":"481fc5c9-6834-11f1-a54b-bc2411125ba4",
"user_group_uuid":"d4cbf41b-6445-11f1-a54b-bc2411125ba4",
"user_email":"test@domain.name",
"user_first_name":"Pietje",
"user_last_name":"Bel",
"user_full_name":"Pietje Bel",
"user_phone_number":"",
"user_password_reset_expires":1781557318,
"user_two_factor_enabled":0,
"user_status":"pending",
"user_verified_email":0,
"user_verified_phone":0,
"user_create_timestamp":1781470918,
"user_modified_timestamp":null,
"user_last_login_timestamp":null,
"user_login_attempts":0,
"user_pref_language":"en",
"user_stompable":0
}
]
```
#### Known errors or issues.
None are known at the time
If you do encounter issues and get an http code in return, check the response codes on this page.

View File

@@ -0,0 +1,73 @@
# GET Servers
This call gets all the servers data.
#### Location
```
/api/v1/servers/
```
#### Permissions required
`servers` RO.
#### Body parameters
| Parameter | Type | Required | Description |
| -------------------- | ------ | -------- | ----------- |
| builder[0][where][0] | string | no | |
| builder[0][where][1] | string | no | |
### Example Body (json)
None.
### Example Request
```php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => $baseUrl . '/api/v1/servers/' . '?builder[0][where][0]=server_uuid&builder[0][where][1]=17779d2d-5223-11f1-8bcc-bc2411125ba4',
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . $token,
'Content-Type: application/json'
]
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
```
### Example Response
```json
[
{
"server_uuid":"17779d2d-5223-11f1-8bcc-bc2411125ba4",
"company_uuid":null,
"server_vm_id":"bc2411845cd4",
"server_vm_host_id":null,
"server_vm_host_name":"man01",
"server_vm_snapshot":0,
"server_vm_generation":null,
"server_power_state":"Running",
"server_state":"new",
"server_hostname":"man01.meteo.local",
"server_os":"AlmaLinux 10.1",
"server_cpu":2,
"server_memory":2048,
"server_memory_demand":2048,
"server_disks":"[{\"disk_name\":\"scsi0\",\"disk_space\":\"15\",\"disk_used\":\"15\",\"disk_location\":\"local-lvm:vm-100-disk-0\"}]",
"server_ipv4":"[\"10.0.0.30\"]",
"server_ipv6":"[\"\"]",
"server_licenses":"[]",
"server_backup":"[{\"proxmox\":\"yes\"}]",
"server_description":"",
"server_create_timestamp":1779044609,
"server_modified_timestamp":1781467630
}
]
```
#### Known errors or issues.
None are known at the time
If you do encounter issues and get an http code in return, check the response codes on this page.

View File

@@ -1,9 +1,39 @@
# Release notes # Release notes
## v.1.2.3
## v.1.3
`to be announced` `to be announced`
### Changes ### Changes
- Rename the servers module to Inventory so it supports other things as well.
- Added CSP headers to PHP code
### Features
- Hypervisor overview.
- Network devices overview.
## v.1.2.4
`21-06-2026`
### Changes
- [e96d6b9a70](https://gitea.mooij.me/meteo/Sentri/commit/e96d6b9a70986688bfd6f71cc30fb145598eb0bf) **‼ BREAKING !!** Changed the config.php file, look at the config-sample.php to update.
- [d781078c0d](https://gitea.mooij.me/meteo/Sentri/commit/d781078c0d4d037307caaf83bb9f5409b050d70e) A lot of code cleanup and code sanitation done.
- [0b76255cfa](https://gitea.mooij.me/meteo/Sentri/commit/0b76255cfaac109e86c071dcbd98de065705c16f) security.txt added and + PGP key.
- [8b742d997c](https://gitea.mooij.me/meteo/Sentri/commit/8b742d997c14bdd136877e5645a379e22980bbcc) [229d2b4a15](https://gitea.mooij.me/meteo/Sentri/commit/229d2b4a15476d7be5e2010efc87ac22f4d39fc5) Content Security Policy (CSP) compatibility
- [6682b974a3](https://gitea.mooij.me/meteo/Sentri/commit/6682b974a33410c220c836cd0b5c3315fcbcc5f9) Server overview now shows last modified date.
### Fixes
- [be392b8149](https://gitea.mooij.me/meteo/Sentri/commit/be392b81499de7c9a1161fe31c981b6f4f63f763) Validation added of the `portal_uuid` when configuring mail settings and portal settings.
- [89ea170798](https://gitea.mooij.me/meteo/Sentri/commit/89ea1707988e2da3c6b1d3ade8a3d85239928104) Fixed an issue where existing subscriptions wont be updated with new licenses.
## v.1.2.3
`14-06-2026`
### Changes
- [a60ebadd60](https://gitea.mooij.me/meteo/Sentri/commit/a60ebadd601f92d062f21d39d4447ab54b7944df) Added support for the HTTP_X_HTTP_METHOD_OVERRIDE header in the API. - [a60ebadd60](https://gitea.mooij.me/meteo/Sentri/commit/a60ebadd601f92d062f21d39d4447ab54b7944df) Added support for the HTTP_X_HTTP_METHOD_OVERRIDE header in the API.
- [3b200d30cb](https://gitea.mooij.me/meteo/Sentri/commit/3b200d30cb3d6fb76e80e0911edd27f60db29bbf) Changed all the frontend calls from `_method` to `X-HTTP-Method-Override`. - [3b200d30cb](https://gitea.mooij.me/meteo/Sentri/commit/3b200d30cb3d6fb76e80e0911edd27f60db29bbf) Changed all the frontend calls from `_method` to `X-HTTP-Method-Override`.
- [b088314c38](https://gitea.mooij.me/meteo/Sentri/commit/b088314c38f8ab3c4664b1d0b0c24e598096036d) Added GET API call for group-permissions.
- [b93f4d2e9c](https://gitea.mooij.me/meteo/Sentri/commit/b93f4d2e9c68a5e0742daa509e4a89ed54fbd46d) Added GET API call for portal-settings.
- [b7dcbaf290](https://gitea.mooij.me/meteo/Sentri/commit/b7dcbaf2908b8fa4035543e72addb150bd86b049) Added GET API call for user-groups.
- [db377bcc08](https://gitea.mooij.me/meteo/Sentri/commit/db377bcc08e18dcb0f6606e9578e1198cc323e38) Added GET API call for users.
- [b227cfb2c5](https://gitea.mooij.me/meteo/Sentri/commit/b227cfb2c59c63e96dc26f3cb178b132c68f4961) Added GET API call for servers.
### Fixes ### Fixes
- [d6079878c4](https://gitea.mooij.me/meteo/Sentri/commit/d6079878c4015358426f9612e80a1e2c7a977eab) When creating an user the `user_pref_language` value is not an enum but any string. And the the user creation `user_phone_number` is now optional. - [d6079878c4](https://gitea.mooij.me/meteo/Sentri/commit/d6079878c4015358426f9612e80a1e2c7a977eab) When creating an user the `user_pref_language` value is not an enum but any string. And the the user creation `user_phone_number` is now optional.
@@ -38,11 +68,6 @@
- Issue with the companies not showing in the server overview. - Issue with the companies not showing in the server overview.
- Issue with new server licenses having "0" as name. - Issue with new server licenses having "0" as name.
- Fixed all the CSS errors. - Fixed all the CSS errors.
### Known issues
- No check on users being linked to a group before deleting it, returns 500 if so.
- There is no validation of the `portal_uuid` when configuring mail settings.
- A lot of GET API calls missing or not working correctly.
## v.1.2.1 ## v.1.2.1
`17-05-2026` `17-05-2026`
### Features ### Features
@@ -97,16 +122,11 @@
`21-12-2025` `21-12-2025`
Initial release. Initial release.
## Roadmap ## Roadmap
- Rename the servers module to Inventory so it supports other things as well.
- Docker container. - Docker container.
- Use of CDN's for CSS and other static content. - Use of CDN's for CSS and other static content.
- security.txt + PGP key
## Roadmap features ## Roadmap features
- Self-destructing message
- SSO/SAML/User provisioning. - SSO/SAML/User provisioning.
- Logging of actions to local storage or to things such as graylog. - Logging of actions with syslog.
- Hypervisor overview.
- Network devices overview
- Travel cost page. - Travel cost page.
## v0.1 ## v0.1
`23-12-2024` `23-12-2024`