Different GET API calls documented

This commit is contained in:
2026-06-14 23:37:33 +02:00
parent 4a1c6bde48
commit 8746058c79
8 changed files with 357 additions and 17 deletions

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
This call gets all the Sentri modules information.
This call gets all the Sentri modules information.
#### Location
```
@@ -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 => [
@@ -31,13 +34,23 @@ curl_setopt_array($curl, array(
$response = curl_exec($curl);
curl_close($curl);
curl_close($curl);
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.