mirror of
https://github.com/nextcloud/documentation.git
synced 2026-01-02 17:59:36 +07:00
fix(ExApp): remove deprecated AppAPI features
Signed-off-by: Edward Ly <contact@edward.ly>
This commit is contained in:
@@ -300,7 +300,7 @@ where:
|
||||
|
||||
.. note::
|
||||
|
||||
Starting with AppAPI version ``2.5.0``, the optional additional parameter *OVERRIDE_APP_HOST* can be used to
|
||||
The optional additional parameter *OVERRIDE_APP_HOST* can be used to
|
||||
override the host that will be used for ExApp binding.
|
||||
|
||||
It can be ``0.0.0.0`` in some specific configurations, when VPN is used
|
||||
|
||||
@@ -40,20 +40,12 @@ It should contain the following fields:
|
||||
<image>nextcloud/skeleton</image>
|
||||
<image-tag>latest</image-tag>
|
||||
</docker-install>
|
||||
<scopes> // deprecated and removed since AppAPI 3.2.0
|
||||
<value>FILES</value>
|
||||
<value>AI_PROVIDERS</value>
|
||||
...
|
||||
</scopes>
|
||||
<system>false</system> // deprecated since AppAPI 3.0.0
|
||||
</external-app>
|
||||
|
||||
- **docker-install**: contains the Docker image information for the ExApp.
|
||||
- **registry**: the Docker registry where the image is stored.
|
||||
- **image**: the Docker image name.
|
||||
- **image-tag**: the Docker image tag (version tag).
|
||||
- **scopes**: the list of the Nextcloud scopes that the ExApp requires (see :ref:`list of scopes <api_scopes>`).
|
||||
- **system**: (deprecated since AppAPI 3.0.0) a boolean value that indicates whether the ExApp is a system app or not.
|
||||
|
||||
|
||||
Backend
|
||||
|
||||
@@ -1,50 +0,0 @@
|
||||
.. _api_scopes:
|
||||
|
||||
Api Scopes
|
||||
==========
|
||||
|
||||
.. warning::
|
||||
|
||||
ApiScopes are deprecated and removed since AppAPI 3.2.0.
|
||||
|
||||
AppAPI design's focus on simplicity and necessity highlights the benefits of defining API scopes.
|
||||
which simplify the development and integration of applications into the Nextcloud ecosystem.
|
||||
|
||||
With the elimination of optional API scopes, the configuration process during installation becomes more streamlined.
|
||||
Now, the Nextcloud administrator only needs to focus on the essential API groups,
|
||||
making the application's setup and permissions handling more efficient and less prone to errors.
|
||||
|
||||
The **info.xml** file continues to play a crucial role, listing all the `required` API groups an
|
||||
application needs to function correctly.
|
||||
This not only simplifies version updates, allowing for the seamless introduction of
|
||||
new API groups or the discontinuation of obsolete ones, but also enhances the overall security and reliability
|
||||
of the application by ensuring it only has access to necessary functionalities.
|
||||
|
||||
Supported API Groups include:
|
||||
|
||||
* ``2`` SYSTEM
|
||||
* ``10`` FILES
|
||||
* ``11`` FILES_SHARING
|
||||
* ``30`` USER_INFO
|
||||
* ``31`` USER_STATUS
|
||||
* ``32`` NOTIFICATIONS
|
||||
* ``33`` WEATHER_STATUS
|
||||
* ``50`` TALK
|
||||
* ``60`` TALK_BOT
|
||||
* ``61`` AI_PROVIDERS
|
||||
* ``62`` EVENTS_LISTENER
|
||||
* ``63`` OCC_COMMAND
|
||||
* ``110`` ACTIVITIES
|
||||
* ``120`` NOTES
|
||||
* ``200`` TEXT_PROCESSING
|
||||
* ``210`` MACHINE_TRANSLATION
|
||||
* ``9999`` ALL
|
||||
|
||||
These groups, represented by intuitive names, ensure that applications have
|
||||
tailored access to the functionalities they need, enhancing performance and user experience.
|
||||
As Nextcloud evolves, this list of API groups will continue to grow, offering developers a wide array of tools
|
||||
to create innovative and efficient applications.
|
||||
|
||||
The streamlined approach to API scopes not only simplifies the application development process
|
||||
but also aligns with best practices in software design, emphasizing clarity, security, and efficiency.
|
||||
This refinement in the handling of API scopes reflects Nextcloud's commitment to providing a robust and developer-friendly platform.
|
||||
@@ -78,12 +78,11 @@ In your API controllers, you can use it as a PHP attribute.
|
||||
AppAPI session keys
|
||||
^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
After successful authentication AppAPI sets `app_api` session key to ``true``.
|
||||
After successful authentication, AppAPI sets `app_api` session key to ``true``.
|
||||
|
||||
.. code-block:: php
|
||||
|
||||
$this->session->set('app_api', true);
|
||||
$this->session->set('app_api_system', true); // deprecated since AppAPI 3.0.0
|
||||
|
||||
.. note::
|
||||
|
||||
|
||||
@@ -147,10 +147,5 @@ It has the same structure as other Nextcloud appinfo/info.xml files, but with so
|
||||
<image>nextcloud/talk_bot</image>
|
||||
<image-tag>latest</image-tag>
|
||||
</docker-install>
|
||||
<scopes> // deprecated since AppAPI 3.2.0
|
||||
<value>TALK</value>
|
||||
<value>TALK_BOT</value>
|
||||
</scopes>
|
||||
<system>0</system> // deprecated since AppAPI 3.0.0
|
||||
</external-app>
|
||||
...
|
||||
|
||||
@@ -6,7 +6,7 @@ App Installation Flow
|
||||
Image Pulling (Docker)
|
||||
----------------------
|
||||
|
||||
AppAPI **2.5.0+** will always first try to pull a docker image with a ``suffix`` equal to value of *computeDevice*.
|
||||
AppAPI will first try to pull the Docker image whose ``suffix`` is equal to the value of *computeDevice*.
|
||||
|
||||
The following values are available for ``computeDevice``: ``cpu``, ``cuda``, or ``rocm``.
|
||||
|
||||
|
||||
@@ -14,14 +14,7 @@ AppAPI takes responsibility to register FileActionsMenu, ExApps needs only to re
|
||||
Register
|
||||
^^^^^^^^
|
||||
|
||||
.. note::
|
||||
|
||||
With AppAPI 2.6.0 there is a new v2 OCS endpoint with redirect to ExApp UI support:
|
||||
OCS endpoint: ``POST /apps/app_api/api/v2/ui/files-actions-menu``.
|
||||
Old v1 is marked as deprecated.
|
||||
|
||||
OCS endpoint: ``POST /apps/app_api/api/v1/ui/files-actions-menu``
|
||||
|
||||
OCS endpoint: ``POST /apps/app_api/api/v2/ui/files-actions-menu``
|
||||
|
||||
Params
|
||||
******
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
Other OCS APIs
|
||||
==============
|
||||
|
||||
With AppAPI authentication it is possible for ExApps to use any other OCS APIs, that doesn't require OCP implementation:
|
||||
With AppAPI authentication, it is possible for ExApps to use any other OCS APIs that don't require OCP implementation:
|
||||
|
||||
.. note::
|
||||
|
||||
To access these APIs they have to be supported by AppAPI (see :ref:`api_scopes`),
|
||||
and ExApp have to require granted access (in ``info.xml``) to them accordingly.
|
||||
To access these APIs, they have to be supported by AppAPI,
|
||||
and the ExApp must grant access to them (in ``info.xml``) accordingly.
|
||||
|
||||
1. Calendar
|
||||
2. Contacts
|
||||
|
||||
@@ -4,11 +4,7 @@
|
||||
Routes
|
||||
======
|
||||
|
||||
Since AppAPI 3.0.0 ExApps have to declare their routes allowed to be accessed via the AppAPI ExApp proxy.
|
||||
|
||||
.. note::
|
||||
|
||||
This routes check applied only for ExApp proxy (``/apps/app_api/proxy/*``).
|
||||
All ExApps must declare the routes that are allowed to be accessed via the AppAPI ExApp proxy (``/apps/app_api/proxy/*``).
|
||||
|
||||
|
||||
Register
|
||||
@@ -22,15 +18,19 @@ Example
|
||||
|
||||
.. code-block::
|
||||
|
||||
<routes>
|
||||
<route>
|
||||
<url>.*</url>
|
||||
<verb>GET,POST,PUT,DELETE</verb>
|
||||
<access_level>USER</access_level>
|
||||
<headers_to_exclude>[]</headers_to_exclude>
|
||||
<bruteforce_protection>[401, 500]</bruteforce_protection>
|
||||
</route>
|
||||
</routes>
|
||||
...
|
||||
<external-app>
|
||||
<routes>
|
||||
<route>
|
||||
<url>.*</url>
|
||||
<verb>GET,POST,PUT,DELETE</verb>
|
||||
<access_level>USER</access_level>
|
||||
<headers_to_exclude>[]</headers_to_exclude>
|
||||
<bruteforce_protection>[401, 500]</bruteforce_protection>
|
||||
</route>
|
||||
</routes>
|
||||
</external-app>
|
||||
...
|
||||
|
||||
where the fields are:
|
||||
|
||||
@@ -44,4 +44,5 @@ where the fields are:
|
||||
Unregister
|
||||
^^^^^^^^^^
|
||||
|
||||
ExApp routes are unregistered automatically when the ExApp is uninstalling, or during the ExApp update before registering the new routes.
|
||||
ExApp routes are unregistered automatically when the ExApp is uninstalled,
|
||||
and new routes are re-registered when the ExApp is updated.
|
||||
|
||||
@@ -5,7 +5,6 @@ Technical details
|
||||
:maxdepth: 2
|
||||
|
||||
InstallationFlow
|
||||
ApiScopes
|
||||
Deployment
|
||||
Authentication
|
||||
Translations
|
||||
|
||||
Reference in New Issue
Block a user