More API call documentation
This commit is contained in:
@@ -16,6 +16,7 @@ This API call activates a company by changing its status from inactive to active
|
||||
| ------------- | ------ | -------- | ---------------------------------------------- |
|
||||
| company_uuid | string | yes | Unique id of the company |
|
||||
| company_state | enum | yes | The state of the company (active or imported). |
|
||||
|
||||
**imported** is the state of the company when its imported from the source.
|
||||
|
||||
### Example Body (json)
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
# DELETE Stomp
|
||||
This API call deletes a stomp from a user.
|
||||
|
||||
#### Location
|
||||
```
|
||||
/api/v1/office/stompjes/
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
# POST Stomp user
|
||||
This API call adds a stomp to a user.
|
||||
|
||||
#### Location
|
||||
```
|
||||
/api/v1/office/stompjes/
|
||||
```
|
||||
|
||||
#### Permissions required
|
||||
`ofice-stompjes-canstomp` RW
|
||||
|
||||
|
||||
63
API/v1/portal-management/configure/PUT Portal settings.md
Normal file
63
API/v1/portal-management/configure/PUT Portal settings.md
Normal file
@@ -0,0 +1,63 @@
|
||||
# PUT Portal settings
|
||||
This PUT call configures the global Sentri settings.
|
||||
|
||||
#### Location
|
||||
```
|
||||
/api/v1/portal-management/configure/
|
||||
```
|
||||
|
||||
#### Permissions required
|
||||
`admin-portalsettings` RW
|
||||
|
||||
#### Body parameters
|
||||
| Parameter | Type | Required | Description |
|
||||
| -------------------- | ------ | -------- | ------------------------------------------------------------------ |
|
||||
| portal_uuid | uuid | yes | Unique id of Sentri instance. |
|
||||
| portal_name | string | yes | The name of the portal. |
|
||||
| portal_provider_name | string | yes | The name of the Sentri provider |
|
||||
| admin_auth_methods | string | yes | The authentication method. Currently supports only `database_auth` |
|
||||
|
||||
### Example Body (json)
|
||||
```json
|
||||
{
|
||||
"portal_uuid": "5219edbb-512d-11f1-8bac-bc2411125ba4",
|
||||
"portal_name": "Sentri",
|
||||
"portal_provider_name": "Your company name",
|
||||
"admin_auth_methods": "database_auth"
|
||||
}
|
||||
```
|
||||
|
||||
### Example Request
|
||||
```php
|
||||
$curl = curl_init();
|
||||
|
||||
curl_setopt_array($curl, [
|
||||
CURLOPT_URL => $baseUrl . '/api/v1/portal-management/configure/',
|
||||
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
|
||||
"portal settings 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.
|
||||
@@ -0,0 +1,63 @@
|
||||
# PUT Group permissions
|
||||
This PUT request updates the permissions of a user group.
|
||||
|
||||
You can only modify a group's permissions if your group's weight is equal to or higher than the weight of the group being modified.
|
||||
|
||||
#### Location
|
||||
```
|
||||
/api/v1/portal-management/group-permissions/
|
||||
```
|
||||
|
||||
#### Permissions required
|
||||
`admin-access-control-permissions` RW
|
||||
|
||||
#### Body parameters
|
||||
| Parameter | Type | Required | Description |
|
||||
| ---------------- | ---- | -------- | ----------------------------------------- |
|
||||
| permission_uuid | uuid | yes | Unique id of the permission. |
|
||||
| user_group_uuid | uuid | yes | Unique id of the user group. |
|
||||
| permission_value | enum | yes | The permission value (`NA`, `RO` or `RW`) |
|
||||
|
||||
### Example Body (json)
|
||||
```json
|
||||
{
|
||||
"permission_uuid": "11abc93d-c265-11f0-95da-7e99ed98b725",
|
||||
"user_group_uuid": "5c1f0102-51ea-11f1-8bac-bc2411125ba4",
|
||||
"permission_value": "RO"
|
||||
}
|
||||
```
|
||||
|
||||
### Example Request
|
||||
```php
|
||||
$curl = curl_init();
|
||||
|
||||
curl_setopt_array($curl, [
|
||||
CURLOPT_URL => $baseUrl . '/api/v1/portal-management/group-permissions/',
|
||||
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
|
||||
"Access rights changed 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.
|
||||
73
API/v1/portal-management/mail/configure/PUT Mail settings.md
Normal file
73
API/v1/portal-management/mail/configure/PUT Mail settings.md
Normal file
@@ -0,0 +1,73 @@
|
||||
# PUT Mail settings
|
||||
This PUT request updates the mail settings.
|
||||
|
||||
#### Location
|
||||
```
|
||||
/api/v1/portal-management/mail/configure/
|
||||
```
|
||||
|
||||
#### Permissions required
|
||||
`admin-mailsettings` RW
|
||||
|
||||
#### Body parameters
|
||||
| Parameter | Type | Required | Description |
|
||||
| ----------------- | ------- | -------- | ---------------------------------------------------- |
|
||||
| portal_uuid | uuid | yes | Unique id of the portal. |
|
||||
| mail_from_name | string | yes | Mail from name. |
|
||||
| mail_from_address | email | yes | Mail from address. |
|
||||
| mail_smtp_host | string | yes | SMTP FQDN hostname. |
|
||||
| mail_smtp_secure | enum | yes | Secure connection type. Either `tls`, `ssl` or `no`. |
|
||||
| mail_smtp_port | integer | yes | Mail server port number. Default `587` or `25`. |
|
||||
| mail_smtp_auth | boolean | yes | Use SMTP authentication. |
|
||||
| mail_smtp_user | string | yes | SMTP authentication user. |
|
||||
| mail_smtp_pass | string | yes | SMTP authentication password. |
|
||||
|
||||
### Example Body (json)
|
||||
```json
|
||||
{
|
||||
"portal_uuid": "11abc93d-c265-11f0-95da-7e99ed98b725",
|
||||
"mail_from_name": "Sentri Company",
|
||||
"mail_from_address": "sentri@company.com",
|
||||
"mail_smtp_host": "smtp.company.com",
|
||||
"mail_smtp_secure": "tls",
|
||||
"mail_smtp_port": 587,
|
||||
"mail_smtp_auth": true,
|
||||
"mail_smtp_user": "smtpuser",
|
||||
"mail_smtp_pass": "securepassword"
|
||||
}
|
||||
```
|
||||
|
||||
### Example Request
|
||||
```php
|
||||
$curl = curl_init();
|
||||
|
||||
curl_setopt_array($curl, [
|
||||
CURLOPT_URL => $baseUrl . '/api/v1/portal-management/mail/configure/',
|
||||
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
|
||||
"mail settings 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.
|
||||
56
API/v1/portal-management/mail/test/POST Send test mail.md
Normal file
56
API/v1/portal-management/mail/test/POST Send test mail.md
Normal file
@@ -0,0 +1,56 @@
|
||||
# POST Send test mail
|
||||
This API call will send an test email to the given mail address.
|
||||
|
||||
#### Location
|
||||
```
|
||||
/api/v1/portal-management/mail/test/
|
||||
```
|
||||
|
||||
#### Permissions required
|
||||
`ofice-stompjes-canstomp` RW
|
||||
|
||||
#### Body parameters
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ----- | -------- | -------------------------------------------- |
|
||||
| mailt_to | email | yes | The mail address to send the test email to. |
|
||||
|
||||
### Example Body (json)
|
||||
```json
|
||||
{
|
||||
"mail_to": "test@company.com",
|
||||
}
|
||||
```
|
||||
|
||||
### Example Request
|
||||
```php
|
||||
$curl = curl_init();
|
||||
|
||||
curl_setopt_array($curl, [
|
||||
CURLOPT_URL => $baseUrl . '/api/v1/portal-management/mail/test/',
|
||||
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
|
||||
"The test email was 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.
|
||||
Reference in New Issue
Block a user