added more API documentation
This commit is contained in:
@@ -10,9 +10,9 @@ This API call deletes a stomp from a user.
|
|||||||
`office-stompjes` RW
|
`office-stompjes` RW
|
||||||
|
|
||||||
#### Body parameters
|
#### Body parameters
|
||||||
| Parameter | Type | Required | Description |
|
| Parameter | Type | Required | Description |
|
||||||
| ---------- | ------ | -------- | ---------------------- |
|
| ---------- | ---- | -------- | ---------------------- |
|
||||||
| stomp_uuid | string | yes | Unique id of the stomp |
|
| stomp_uuid | uuid | yes | Unique id of the stomp |
|
||||||
|
|
||||||
### Example Body (json)
|
### Example Body (json)
|
||||||
```json
|
```json
|
||||||
|
|||||||
@@ -10,9 +10,9 @@ This API call adds a stomp to a user.
|
|||||||
`ofice-stompjes-canstomp` RW
|
`ofice-stompjes-canstomp` RW
|
||||||
|
|
||||||
#### Body parameters
|
#### Body parameters
|
||||||
| Parameter | Type | Required | Description |
|
| Parameter | Type | Required | Description |
|
||||||
| --------- | ------ | -------- | ----------------------------------- |
|
| --------- | ---- | -------- | ----------------------------------- |
|
||||||
| user_uuid | string | yes | Unique id of the user to be stomped |
|
| user_uuid | uuid | yes | Unique id of the user to be stomped |
|
||||||
|
|
||||||
### Example Body (json)
|
### Example Body (json)
|
||||||
```json
|
```json
|
||||||
|
|||||||
64
API/v1/portal-management/modules/GET Modules.md
Normal file
64
API/v1/portal-management/modules/GET Modules.md
Normal file
@@ -0,0 +1,64 @@
|
|||||||
|
# GET Modules
|
||||||
|
This call gets all the Sentri modules information.
|
||||||
|
|
||||||
|
#### Location
|
||||||
|
```
|
||||||
|
/api/v1/portal-management/modules/
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Permissions required
|
||||||
|
`admin-modules` RO
|
||||||
|
|
||||||
|
#### Body parameters
|
||||||
|
None.
|
||||||
|
|
||||||
|
### Example Body (json)
|
||||||
|
None.
|
||||||
|
|
||||||
|
### Example Request
|
||||||
|
```php
|
||||||
|
|
||||||
|
$curl = curl_init();
|
||||||
|
curl_setopt_array($curl, array(
|
||||||
|
CURLOPT_URL => $baseUrl . '/api/v1/portal-management/modules/',
|
||||||
|
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
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"module_uuid":"0f044275-1744-444c-9627-736310d7997e",
|
||||||
|
"module_name":"Portal Management",
|
||||||
|
"module_slugify":"portal-management",
|
||||||
|
"module_enabled":1,
|
||||||
|
"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
|
||||||
|
}
|
||||||
|
]
|
||||||
|
```
|
||||||
|
|
||||||
|
#### 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.
|
||||||
61
API/v1/portal-management/modules/PUT Toggle module.md
Normal file
61
API/v1/portal-management/modules/PUT Toggle module.md
Normal file
@@ -0,0 +1,61 @@
|
|||||||
|
# PUT Toggle module
|
||||||
|
This PUT request enables or disables an module.
|
||||||
|
|
||||||
|
#### Location
|
||||||
|
```
|
||||||
|
/api/v1/portal-management/modules/
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Permissions required
|
||||||
|
`admin-modules` RW
|
||||||
|
|
||||||
|
#### Body parameters
|
||||||
|
| Parameter | Type | Required | Description |
|
||||||
|
| -------------- | ------- | -------- | ----------------------------- |
|
||||||
|
| module_uuid | uuid | yes | Unique id of the module. |
|
||||||
|
| module_enabled | boolean | yes | Enable or disable the module. |
|
||||||
|
|
||||||
|
### Example Body (json)
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"module_uuid": "247aa89e-2ffa-4cba-8672-3fef451255b7",
|
||||||
|
"module_enabled": true
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Example Request
|
||||||
|
```php
|
||||||
|
$curl = curl_init();
|
||||||
|
|
||||||
|
curl_setopt_array($curl, [
|
||||||
|
CURLOPT_URL => $baseUrl . '/api/v1/portal-management/modules/',
|
||||||
|
CURLOPT_RETURNTRANSFER => true,
|
||||||
|
CURLOPT_POST => true,
|
||||||
|
CURLOPT_POSTFIELDS => $json_payload,
|
||||||
|
CURLOPT_HTTPHEADER => [
|
||||||
|
'Authorization: Bearer ' . $token,
|
||||||
|
'Content-Type: application/json',
|
||||||
|
'X-HTTP-Method-Override: PUT'
|
||||||
|
],
|
||||||
|
]);
|
||||||
|
|
||||||
|
$response = curl_exec($curl);
|
||||||
|
$httpCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);
|
||||||
|
|
||||||
|
if ($response === false) {
|
||||||
|
echo curl_error($curl);
|
||||||
|
}
|
||||||
|
|
||||||
|
curl_close($curl);
|
||||||
|
```
|
||||||
|
|
||||||
|
### Example Response
|
||||||
|
```json
|
||||||
|
"Module enabled successfully."
|
||||||
|
```
|
||||||
|
|
||||||
|
#### 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.
|
||||||
|
|
||||||
|
|
||||||
57
API/v1/portal-management/permissions/DELETE Permission.md
Normal file
57
API/v1/portal-management/permissions/DELETE Permission.md
Normal file
@@ -0,0 +1,57 @@
|
|||||||
|
# DELETE Permission
|
||||||
|
This API call deletes a permission. This is only allowed by the superuser.
|
||||||
|
|
||||||
|
#### Location
|
||||||
|
```
|
||||||
|
/api/v1/portal-management/permissions/
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Permissions required
|
||||||
|
being `superuser`.
|
||||||
|
|
||||||
|
#### Body parameters
|
||||||
|
| Parameter | Type | Required | Description |
|
||||||
|
| --------------- | ---- | -------- | ---------------------------- |
|
||||||
|
| permission_uuid | uuid | yes | Unique id of the permission, |
|
||||||
|
|
||||||
|
### Example Body (json)
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"permission_uuid": "e0a60eba-52f6-11f1-8bcc-bc2411125ba4",
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Example Request
|
||||||
|
```php
|
||||||
|
$curl = curl_init();
|
||||||
|
|
||||||
|
curl_setopt_array($curl, [
|
||||||
|
CURLOPT_URL => $baseUrl . '/api/v1/portal-management/permissions/',
|
||||||
|
CURLOPT_RETURNTRANSFER => true,
|
||||||
|
CURLOPT_POST => true,
|
||||||
|
CURLOPT_POSTFIELDS => $json_payload,
|
||||||
|
CURLOPT_HTTPHEADER => [
|
||||||
|
'Authorization: Bearer ' . $token,
|
||||||
|
'Content-Type: application/json',
|
||||||
|
'X-HTTP-Method-Override: DELETE'
|
||||||
|
],
|
||||||
|
]);
|
||||||
|
|
||||||
|
$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 deleted successfully."
|
||||||
|
```
|
||||||
|
|
||||||
|
#### 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.
|
||||||
45
API/v1/portal-management/permissions/GET Permissions.md
Normal file
45
API/v1/portal-management/permissions/GET Permissions.md
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
# GET Permissions
|
||||||
|
This call gets all the permissions data.
|
||||||
|
|
||||||
|
#### Location
|
||||||
|
```
|
||||||
|
/api/v1/portal-management/permissions/
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Permissions required
|
||||||
|
`admin-access-control-permissions` RO.
|
||||||
|
|
||||||
|
#### Body parameters
|
||||||
|
None.
|
||||||
|
|
||||||
|
### Example Body (json)
|
||||||
|
None.
|
||||||
|
|
||||||
|
### Example Request
|
||||||
|
```php
|
||||||
|
|
||||||
|
$curl = curl_init();
|
||||||
|
curl_setopt_array($curl, array(
|
||||||
|
CURLOPT_URL => $baseUrl . '/api/v1/portal-management/permissions/',
|
||||||
|
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
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
#### 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.
|
||||||
62
API/v1/portal-management/permissions/POST Permission.md
Normal file
62
API/v1/portal-management/permissions/POST Permission.md
Normal file
@@ -0,0 +1,62 @@
|
|||||||
|
# POST Permission
|
||||||
|
This API call creates a new permission. This is only allowed by the superuser.
|
||||||
|
|
||||||
|
#### Location
|
||||||
|
```
|
||||||
|
/api/v1/portal-management/permissions/
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Permissions required
|
||||||
|
being `superuser`.
|
||||||
|
|
||||||
|
#### Body parameters
|
||||||
|
| Parameter | Type | Required | Description |
|
||||||
|
| ---------------------- | ------ | -------- | ------------------------------------------- |
|
||||||
|
| permission_name | string | yes | The name of the permission. |
|
||||||
|
| permission_slugify | string | yes | The slugify version of the permission name. |
|
||||||
|
| permission_description | string | yes | The description of the permission. |
|
||||||
|
| module_uuid | uuid | yes | The `module_uuid` linked to the permission. |
|
||||||
|
|
||||||
|
### Example Body (json)
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"permission_name": "admin-test",
|
||||||
|
"permission_slugify": "admin-test",
|
||||||
|
"permission_description": "test permission.",
|
||||||
|
"module_uuid": "0f044275-1744-444c-9627-736310d7997e"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Example Request
|
||||||
|
```php
|
||||||
|
$curl = curl_init();
|
||||||
|
|
||||||
|
curl_setopt_array($curl, [
|
||||||
|
CURLOPT_URL => $baseUrl . '/api/v1/portal-management/permissions/',
|
||||||
|
CURLOPT_RETURNTRANSFER => true,
|
||||||
|
CURLOPT_POST => true,
|
||||||
|
CURLOPT_POSTFIELDS => $json_payload,
|
||||||
|
CURLOPT_HTTPHEADER => [
|
||||||
|
'Authorization: Bearer ' . $token,
|
||||||
|
'Content-Type: application/json',
|
||||||
|
],
|
||||||
|
]);
|
||||||
|
|
||||||
|
$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 data>"
|
||||||
|
```
|
||||||
|
|
||||||
|
#### 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.
|
||||||
65
API/v1/portal-management/permissions/PUT Permission.md
Normal file
65
API/v1/portal-management/permissions/PUT Permission.md
Normal file
@@ -0,0 +1,65 @@
|
|||||||
|
# PUT Permission
|
||||||
|
This PUT request updates permission data. This can only be done by the superuser
|
||||||
|
|
||||||
|
#### Location
|
||||||
|
```
|
||||||
|
/api/v1/portal-management/permissions/
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Permissions required
|
||||||
|
Being `superuser`.
|
||||||
|
|
||||||
|
#### Body parameters
|
||||||
|
| Parameter | Type | Required | Description |
|
||||||
|
| ---------------------- | ------ | -------- | ------------------------------------------- |
|
||||||
|
| permission_name | string | yes | The name of the permission. |
|
||||||
|
| permission_slugify | string | yes | The slugify version of the permission name. |
|
||||||
|
| permission_description | string | yes | The description of the permission. |
|
||||||
|
| module_uuid | uuid | yes | The `module_uuid` linked to the permission. |
|
||||||
|
|
||||||
|
### Example Body (json)
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"permission_name": "admin-test",
|
||||||
|
"permission_slugify": "admin-test",
|
||||||
|
"permission_description": "test permission.",
|
||||||
|
"module_uuid": "0f044275-1744-444c-9627-736310d7997e"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Example Request
|
||||||
|
```php
|
||||||
|
$curl = curl_init();
|
||||||
|
|
||||||
|
curl_setopt_array($curl, [
|
||||||
|
CURLOPT_URL => $baseUrl . '/api/v1/portal-management/modules/',
|
||||||
|
CURLOPT_RETURNTRANSFER => true,
|
||||||
|
CURLOPT_POST => true,
|
||||||
|
CURLOPT_POSTFIELDS => $json_payload,
|
||||||
|
CURLOPT_HTTPHEADER => [
|
||||||
|
'Authorization: Bearer ' . $token,
|
||||||
|
'Content-Type: application/json',
|
||||||
|
'X-HTTP-Method-Override: PUT'
|
||||||
|
],
|
||||||
|
]);
|
||||||
|
|
||||||
|
$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 updated successfully."
|
||||||
|
```
|
||||||
|
|
||||||
|
#### 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.
|
||||||
|
|
||||||
|
|
||||||
Reference in New Issue
Block a user