diff --git a/flexiapi/app/Http/Controllers/Account/ProvisioningController.php b/flexiapi/app/Http/Controllers/Account/ProvisioningController.php index 7a8e3c8..a637892 100644 --- a/flexiapi/app/Http/Controllers/Account/ProvisioningController.php +++ b/flexiapi/app/Http/Controllers/Account/ProvisioningController.php @@ -32,6 +32,13 @@ use Endroid\QrCode\Writer\PngWriter; class ProvisioningController extends Controller { + public function documentation(Request $request) + { + return view('provisioning.documentation', [ + 'documentation' => markdownDocumentationView('provisioning.documentation_markdown') + ]); + } + public function qrcode(Request $request, string $provisioningToken) { $account = Account::withoutGlobalScopes() diff --git a/flexiapi/app/Http/Controllers/Api/StatisticsCallController.php b/flexiapi/app/Http/Controllers/Api/StatisticsCallController.php index 2161c8a..c38b316 100644 --- a/flexiapi/app/Http/Controllers/Api/StatisticsCallController.php +++ b/flexiapi/app/Http/Controllers/Api/StatisticsCallController.php @@ -34,7 +34,7 @@ class StatisticsCallController extends Controller 'from' => 'required|string|max:256', 'to' => 'required|string|max:256', 'initiated_at' => 'required|iso_date', - 'ended_at' => 'iso_date', + 'ended_at' => 'iso_date|nullable', 'conference_id' => 'string|nullable', ]); diff --git a/flexiapi/resources/views/about.blade.php b/flexiapi/resources/views/about.blade.php index 03c94eb..12031cc 100644 --- a/flexiapi/resources/views/about.blade.php +++ b/flexiapi/resources/views/about.blade.php @@ -11,7 +11,7 @@
Terms and Conditions and Privacy policy
-API Documentation and General Documentation
+API Documentation, Provisioning Documentation and General Documentation
GNU General Public Licence v3.0 (Licence)
diff --git a/flexiapi/resources/views/api/documentation_markdown.blade.php b/flexiapi/resources/views/api/documentation_markdown.blade.php index 7557852..19f9aa0 100644 --- a/flexiapi/resources/views/api/documentation_markdown.blade.php +++ b/flexiapi/resources/views/api/documentation_markdown.blade.php @@ -714,45 +714,6 @@ JSON parameters: The following URLs are **not API endpoints** they are not returning `JSON` content and they are not located under `/api` but directly under the root path. -## Provisioning - -When an account is having an available `provisioning_token` it can be provisioned using the two following URL. - -### `GET /provisioning` - -Public - -Return the provisioning information available in the liblinphone configuration file (if correctly configured). - -### `GET /provisioning/{provisioning_token}?reset_password` - -Public - -Return the provisioning information available in the liblinphone configuration file. -If the `provisioning_token` is valid the related account information are added to the returned XML. The account is then considered as "provisioned" and those account related information will be removed in the upcoming requests (the content will be the same as the previous url). - -If the account is not activated and the `provisioning_token` is valid. The account will be activated. - -URL parameters: - -* `reset_password` optional, reset the password while doing the provisioning - -### `GET /provisioning/qrcode/{provisioning_token}?reset_password` - -Public - -Return a QRCode that points to the provisioning URL. - -URL parameters: - -* `reset_password` optional, reset the password while doing the provisioning - -### `GET /provisioning/me` - -User - -Return the same base content as the previous URL and the account related information, similar to the `provisioning_token` endpoint. However this endpoint will always return those information. - ## Contacts list ### `GET /contacts/vcard` diff --git a/flexiapi/resources/views/provisioning/documentation.blade.php b/flexiapi/resources/views/provisioning/documentation.blade.php new file mode 100644 index 0000000..bc4af9d --- /dev/null +++ b/flexiapi/resources/views/provisioning/documentation.blade.php @@ -0,0 +1,8 @@ +@extends('layouts.main', ['welcome' => true]) + +@section('content') +