From 8746058c799ce9f4367abf16e31b06490ef94225 Mon Sep 17 00:00:00 2001 From: Meteo Date: Sun, 14 Jun 2026 23:37:33 +0200 Subject: [PATCH] Different GET API calls documented --- API/v1/office/stompjes/GET Stomp.md | 2 +- .../configure/GET Portal settings.md | 68 +++++++++++++++++ .../GET Group permissions.md | 64 ++++++++++++++++ .../portal-management/modules/GET Modules.md | 18 ++--- .../permissions/GET Permissions.md | 21 +++++- .../user-groups/GET user group.md | 58 +++++++++++++++ API/v1/portal-management/users/GET User.md | 70 ++++++++++++++++++ API/v1/servers/GET Servers.md | 73 +++++++++++++++++++ 8 files changed, 357 insertions(+), 17 deletions(-) create mode 100644 API/v1/portal-management/configure/GET Portal settings.md create mode 100644 API/v1/portal-management/group-permissions/GET Group permissions.md create mode 100644 API/v1/portal-management/user-groups/GET user group.md create mode 100644 API/v1/portal-management/users/GET User.md create mode 100644 API/v1/servers/GET Servers.md diff --git a/API/v1/office/stompjes/GET Stomp.md b/API/v1/office/stompjes/GET Stomp.md index 2814254..70aacae 100644 --- a/API/v1/office/stompjes/GET Stomp.md +++ b/API/v1/office/stompjes/GET Stomp.md @@ -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, diff --git a/API/v1/portal-management/configure/GET Portal settings.md b/API/v1/portal-management/configure/GET Portal settings.md new file mode 100644 index 0000000..3a16148 --- /dev/null +++ b/API/v1/portal-management/configure/GET Portal settings.md @@ -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. \ No newline at end of file diff --git a/API/v1/portal-management/group-permissions/GET Group permissions.md b/API/v1/portal-management/group-permissions/GET Group permissions.md new file mode 100644 index 0000000..95f35fd --- /dev/null +++ b/API/v1/portal-management/group-permissions/GET Group permissions.md @@ -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. \ No newline at end of file diff --git a/API/v1/portal-management/modules/GET Modules.md b/API/v1/portal-management/modules/GET Modules.md index 26845e4..3fb1130 100644 --- a/API/v1/portal-management/modules/GET Modules.md +++ b/API/v1/portal-management/modules/GET Modules.md @@ -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 } ] ``` diff --git a/API/v1/portal-management/permissions/GET Permissions.md b/API/v1/portal-management/permissions/GET Permissions.md index 8a095c2..ad65f34 100644 --- a/API/v1/portal-management/permissions/GET Permissions.md +++ b/API/v1/portal-management/permissions/GET Permissions.md @@ -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. diff --git a/API/v1/portal-management/user-groups/GET user group.md b/API/v1/portal-management/user-groups/GET user group.md new file mode 100644 index 0000000..092fd6b --- /dev/null +++ b/API/v1/portal-management/user-groups/GET user group.md @@ -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. \ No newline at end of file diff --git a/API/v1/portal-management/users/GET User.md b/API/v1/portal-management/users/GET User.md new file mode 100644 index 0000000..18f967a --- /dev/null +++ b/API/v1/portal-management/users/GET User.md @@ -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. \ No newline at end of file diff --git a/API/v1/servers/GET Servers.md b/API/v1/servers/GET Servers.md new file mode 100644 index 0000000..ae65b7f --- /dev/null +++ b/API/v1/servers/GET Servers.md @@ -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. \ No newline at end of file