Compare commits

...

2 Commits

Author SHA1 Message Date
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
9 changed files with 368 additions and 23 deletions

View File

@@ -23,7 +23,7 @@ None.
$curl = curl_init();
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_HTTPHEADER => [
'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

@@ -10,7 +10,10 @@ This call gets all the Sentri modules information.
`admin-modules` RO
#### Body parameters
None.
| Parameter | Type | Required | Description |
| -------------------- | ------ | -------- | ----------- |
| builder[0][where][0] | string | no | |
| builder[0][where][1] | string | no | |
### Example Body (json)
None.
@@ -20,7 +23,7 @@ None.
$curl = curl_init();
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_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
@@ -46,15 +49,6 @@ echo $response;
"module_description":null,
"module_create_timestamp":1762695975,
"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.
#### Body parameters
None.
| Parameter | Type | Required | Description |
| -------------------- | ------ | -------- | ----------- |
| builder[0][where][0] | string | no | |
| builder[0][where][1] | string | no | |
### Example Body (json)
None.
@@ -20,7 +23,7 @@ None.
$curl = curl_init();
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_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
@@ -37,7 +40,17 @@ echo $response;
### Example Response
```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.

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,14 @@
# Release notes
## v.1.2.3
`to be announced`
`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.
- [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
- [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.
@@ -15,6 +20,11 @@
- [98d5d1cb18](https://gitea.mooij.me/meteo/Sentri/commit/98d5d1cb18d043a735fefb66de053e399c27ef0b) GET stomp API call added.
- [a7e3c54a89](https://gitea.mooij.me/meteo/Sentri/commit/a7e3c54a89672b96391c3c5894a84f4b5de6b7d0) Fixed the `ofice` typo in the permission names to `office`
### 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.
- Some data like `'` in wont be encoded to JSON. For example in the permission descriptions.
## v.1.2.2
`29-05-2026`
### Changes
@@ -38,11 +48,6 @@
- Issue with the companies not showing in the server overview.
- Issue with new server licenses having "0" as name.
- 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
`17-05-2026`
### Features