More API documentation
This commit is contained in:
@@ -7,7 +7,7 @@ This API call creates a new permission. This is only allowed by the superuser.
|
||||
```
|
||||
|
||||
#### Permissions required
|
||||
being `superuser`.
|
||||
Being `superuser`.
|
||||
|
||||
#### Body parameters
|
||||
| Parameter | Type | Required | Description |
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
# POST Configure Inserve
|
||||
This API call updates the Inserve configuration.
|
||||
More information about the Inserve source can be found [here](Portal%20Management/Settings/Sources/Inserve.md).
|
||||
|
||||
#### Location
|
||||
```
|
||||
/api/v1/portal-management/sources/inserve/
|
||||
```
|
||||
|
||||
#### Permissions required
|
||||
`admin-sources` RW
|
||||
|
||||
#### Body parameters
|
||||
| Parameter | Type | Required | Description |
|
||||
| ------------------ | ------ | -------- | -------------------------------------------------------------------------------------------------------------- |
|
||||
| source_url | string | yes | The url of the inserve instance. |
|
||||
| source_auth_token | string | yes | The API token from inserve |
|
||||
| source_custom_data | json | yes | The custom JSON source data. See the [Inserve](Portal%20Management/Settings/Sources/Inserve.md) documentation. |
|
||||
|
||||
### Example Body (json)
|
||||
```json
|
||||
{
|
||||
"source_url": "https://company.inserve.nl",
|
||||
"source_auth_token": "8TtCFdogSJmDhJC0Ii4ZVKkHplMQikNqVnY7uRuBi84IRYONfuYv7UKOxDV0PYXV",
|
||||
"source_custom_data": "[]"
|
||||
}
|
||||
```
|
||||
|
||||
### Example Request
|
||||
```php
|
||||
$curl = curl_init();
|
||||
|
||||
curl_setopt_array($curl, [
|
||||
CURLOPT_URL => $baseUrl . '/api/v1/portal-management/sources/inserve/',
|
||||
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
|
||||
"Information modified"
|
||||
```
|
||||
|
||||
#### 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/user-groups/Delete user group.md
Normal file
57
API/v1/portal-management/user-groups/Delete user group.md
Normal file
@@ -0,0 +1,57 @@
|
||||
# DELETE user group
|
||||
This API call deletes a user-group.
|
||||
|
||||
#### Location
|
||||
```
|
||||
/api/v1/portal-management/user-groups/
|
||||
```
|
||||
|
||||
#### Permissions required
|
||||
`admin-access-control-user-groups` RW.
|
||||
|
||||
#### Body parameters
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------------- | ---- | -------- | ---------------------------- |
|
||||
| user_group_uuid | uuid | yes | Unique id of the user-group. |
|
||||
|
||||
### Example Body (json)
|
||||
```json
|
||||
{
|
||||
"user_group_uuid": "d4cbf41b-6445-11f1-a54b-bc2411125ba4"
|
||||
}
|
||||
```
|
||||
|
||||
### Example Request
|
||||
```php
|
||||
$curl = curl_init();
|
||||
|
||||
curl_setopt_array($curl, [
|
||||
CURLOPT_URL => $baseUrl . '/api/v1/portal-management/user-groups/',
|
||||
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.
|
||||
65
API/v1/portal-management/user-groups/POST user group.md
Normal file
65
API/v1/portal-management/user-groups/POST user group.md
Normal file
@@ -0,0 +1,65 @@
|
||||
# POST user group
|
||||
This API call creates a user group.
|
||||
|
||||
#### Location
|
||||
```
|
||||
/api/v1/portal-management/user-groups/
|
||||
```
|
||||
|
||||
#### Permissions required
|
||||
`admin-access-control-user-groups` RW.
|
||||
|
||||
#### Body parameters
|
||||
| Parameter | Type | Required | Description |
|
||||
| ------------------ | ------- | -------- | --------------------------------------------- |
|
||||
| user_group_name | string | yes | the name of the group being created. |
|
||||
| user_group_slugify | slugify | yes | The slugify version of the name of the group. |
|
||||
| user_group_weight | integer | yes | The group weight of the group being created. |
|
||||
| user_group_type | enum | yes | Either `admin` or `user`. |
|
||||
>[!INFO]
|
||||
>The `user_group_name` cannot be `superuser` since this name is reserved.
|
||||
|
||||
### Example Body (json)
|
||||
```json
|
||||
{
|
||||
"user_group_name": "test group",
|
||||
"user_group_slugify": "test-group",
|
||||
"user_group_weight": 51,
|
||||
"user_group_type": "admin"
|
||||
}
|
||||
```
|
||||
|
||||
### Example Request
|
||||
```php
|
||||
$curl = curl_init();
|
||||
|
||||
curl_setopt_array($curl, [
|
||||
CURLOPT_URL => $baseUrl . '/api/v1/portal-management/user-groups/',
|
||||
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
|
||||
"User group created 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.
|
||||
63
API/v1/portal-management/user-groups/PUT user group.md
Normal file
63
API/v1/portal-management/user-groups/PUT user group.md
Normal file
@@ -0,0 +1,63 @@
|
||||
# PUT user group
|
||||
This PUT request updates user group data.
|
||||
|
||||
#### Location
|
||||
```
|
||||
/api/v1/portal-management/user-groups/
|
||||
```
|
||||
|
||||
#### Permissions required
|
||||
`admin-access-control-user-groups` RW.
|
||||
|
||||
#### Body parameters
|
||||
| Parameter | Type | Required | Description |
|
||||
| ----------------- | ------- | -------- | ------------------------------ |
|
||||
| user_group_uuid | uuid | yes | Unique id of the user-group |
|
||||
| user_group_name | string | yes | The name of the user-group. |
|
||||
| user_group_weight | integer | yes | The group weight of the group. |
|
||||
|
||||
### Example Body (json)
|
||||
```json
|
||||
{
|
||||
"user_group_uuid": "d4cbf41b-6445-11f1-a54b-bc2411125ba4",
|
||||
"user_group_name": "test group",
|
||||
"user_group_weight": 52
|
||||
}
|
||||
```
|
||||
|
||||
### Example Request
|
||||
```php
|
||||
$curl = curl_init();
|
||||
|
||||
curl_setopt_array($curl, [
|
||||
CURLOPT_URL => $baseUrl . '/api/v1/portal-management/user-groups/',
|
||||
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
|
||||
"User group created updated"
|
||||
```
|
||||
|
||||
#### 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/users/DELETE User.md
Normal file
57
API/v1/portal-management/users/DELETE User.md
Normal file
@@ -0,0 +1,57 @@
|
||||
# DELETE User
|
||||
This API call deletes a user.
|
||||
|
||||
#### Location
|
||||
```
|
||||
/api/v1/portal-management/users/
|
||||
```
|
||||
|
||||
#### Permissions required
|
||||
`admin-access-admins` RW.
|
||||
|
||||
#### Body parameters
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ---------------------- |
|
||||
| user_uuid | uuid | yes | Unique id of the user. |
|
||||
|
||||
### Example Body (json)
|
||||
```json
|
||||
{
|
||||
"user_uuid": "3b58843c-644b-11f1-a54b-bc2411125ba4"
|
||||
}
|
||||
```
|
||||
|
||||
### Example Request
|
||||
```php
|
||||
$curl = curl_init();
|
||||
|
||||
curl_setopt_array($curl, [
|
||||
CURLOPT_URL => $baseUrl . '/api/v1/portal-management/users/',
|
||||
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
|
||||
"User successfully deleted"
|
||||
```
|
||||
|
||||
#### 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.
|
||||
69
API/v1/portal-management/users/POST User.md
Normal file
69
API/v1/portal-management/users/POST User.md
Normal file
@@ -0,0 +1,69 @@
|
||||
# POST user group
|
||||
This API call creates a user.
|
||||
|
||||
#### Location
|
||||
```
|
||||
/api/v1/portal-management/users/
|
||||
```
|
||||
|
||||
#### Permissions required
|
||||
`admin-access-admins` RW.
|
||||
|
||||
#### Body parameters
|
||||
| Parameter | Type | Required | Description |
|
||||
| ------------------ | ------ | -------- | ---------------------------------------------------------------------- |
|
||||
| user_group_uuid | uuid | yes | The user-group uuid for the user. |
|
||||
| user_email | email | yes | The email address of the user. |
|
||||
| user_first_name | string | yes | The first name of the user. |
|
||||
| user_last_name | string | yes | The last name of the user. |
|
||||
| user_phone_number | string | yes | The phone number of the user. |
|
||||
| user_status | enum | yes | The user status of the user. Either `inactive`, `banned` or `pending` |
|
||||
| user_pref_language | enum | yes | Either `en` or `nl` |
|
||||
|
||||
### Example Body (json)
|
||||
```json
|
||||
{
|
||||
"user_group_uuid": "d4cbf41b-6445-11f1-a54b-bc2411125ba4",
|
||||
"user_email": "test@domain.name",
|
||||
"user_first_name": "Pietje",
|
||||
"user_last_name": "Bel",
|
||||
"user_phone_number": "",
|
||||
"user_status": "pending",
|
||||
"user_pref_language": "en"
|
||||
}
|
||||
```
|
||||
|
||||
### Example Request
|
||||
```php
|
||||
$curl = curl_init();
|
||||
|
||||
curl_setopt_array($curl, [
|
||||
CURLOPT_URL => $baseUrl . '/api/v1/portal-management/users/',
|
||||
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
|
||||
"User created successfully. mail has been sent"
|
||||
```
|
||||
|
||||
#### 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.
|
||||
75
API/v1/portal-management/users/PUT User.md
Normal file
75
API/v1/portal-management/users/PUT User.md
Normal file
@@ -0,0 +1,75 @@
|
||||
# PUT User
|
||||
This PUT request updates a user.
|
||||
|
||||
#### Location
|
||||
```
|
||||
/api/v1/portal-management/users/
|
||||
```
|
||||
|
||||
#### Permissions required
|
||||
`admin-access-admins` RW.
|
||||
|
||||
#### Body parameters
|
||||
| Parameter | Type | Required | Description |
|
||||
| ------------------ | ------- | -------- | ------------------------------------------------------------------------------------------------------------------------ |
|
||||
| user_uuid | uuid | yes | The users unique id. |
|
||||
| user_group_uuid | uuid | yes | The user-group unique id for the user. |
|
||||
| user_email | email | yes | The email address of the user. |
|
||||
| user_first_name | string | yes | The first name of the user. |
|
||||
| user_last_name | string | yes | The last name of the user. |
|
||||
| user_phone_number | string | yes | The phone number of the user. |
|
||||
| user_status | enum | yes | The user status of the user. Either `inactive`, `banned` or `pending` |
|
||||
| user_pref_language | enum | yes | Either `en` or `nl` |
|
||||
| user_stompable | boolean | yes | Makes the user stompable, related to the [stompjes](API/v1/office/stompjes/POST%20Stomp%20user.md) in the office module. |
|
||||
|
||||
### Example Body (json)
|
||||
```json
|
||||
{
|
||||
"user_uuid": "3b58843c-644b-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_phone_number": "",
|
||||
"user_status": "pending",
|
||||
"user_pref_language": "en",
|
||||
"user_stompable": true
|
||||
}
|
||||
```
|
||||
|
||||
### Example Request
|
||||
```php
|
||||
$curl = curl_init();
|
||||
|
||||
curl_setopt_array($curl, [
|
||||
CURLOPT_URL => $baseUrl . '/api/v1/portal-management/user-groups/',
|
||||
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
|
||||
"User successfully updated."
|
||||
```
|
||||
|
||||
#### 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