diff --git a/CHANGES.md b/CHANGES.md
index 53738d3172..bba07924fa 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -4,6 +4,12 @@
### :boom: Breaking changes & Deprecations
+- The backend RPC API URLS are changed from `/api/rpc/command/`
+ to `/api/main/methods/` (the previou PATH is preserved for
+ backward compatibility; however, if you are a user of this API, it
+ is strongly recommended that you adapt your code to use the new
+ PATH.
+
### :rocket: Epics and highlights
### :heart: Community contributions (Thank you!)
diff --git a/backend/dev/user.clj b/backend/dev/user.clj
index 93197eb059..716a0f3c5a 100644
--- a/backend/dev/user.clj
+++ b/backend/dev/user.clj
@@ -27,6 +27,7 @@
[app.common.transit :as t]
[app.common.types.file :as ctf]
[app.common.uuid :as uuid]
+ [app.common.uri :as u]
[app.config :as cf]
[app.db :as db]
[app.main :as main]
diff --git a/backend/resources/app/templates/api-doc.tmpl b/backend/resources/app/templates/api-doc.tmpl
index 8c67fdeeeb..cf848034a6 100644
--- a/backend/resources/app/templates/api-doc.tmpl
+++ b/backend/resources/app/templates/api-doc.tmpl
@@ -4,7 +4,7 @@
- Builtin API Documentation - Penpot
+ {{label|upper}} API Documentation
@@ -19,7 +19,7 @@
-
Penpot API Documentation (v{{version}})
+
{{label|upper}}: API Documentation (v{{version}})
[
INTRODUCTION
-
This documentation is intended to be a general overview of the penpot RPC API.
- If you prefer, you can use OpenAPI
- and/or SwaggerUI as alternative.
+
This documentation is intended to be a general overview of
+ the {{label}} API. If you prefer, you can
+ use Swagger/OpenAPI as
+ alternative.
GENERAL NOTES
@@ -43,7 +44,7 @@
that starts with get- in the name, can use GET HTTP
method which in many cases benefits from the HTTP cache.
-
+ {% block auth-section %}
Authentication
The penpot backend right now offers two way for authenticate the request:
cookies (the same mechanism that we use ourselves on accessing the API from the
@@ -56,9 +57,10 @@
The access token can be obtained on the appropriate section on profile settings
and it should be provided using `Authorization` header with `Token
<token-string>` value.
+ {% endblock %}
Content Negotiation
-
The penpot API by default operates indistinctly with: `application/json`
+
This API operates indistinctly with: `application/json`
and `application/transit+json` content types. You should specify the
desired content-type on the `Accept` header, the transit encoding is used
by default.
@@ -75,13 +77,16 @@
standard Fetch
API
+ {% block limits-section %}
Limits
The rate limit work per user basis (this means that different api keys share
the same rate limit). For now the limits are not documented because we are
studying and analyzing the data. As a general rule, it should not be abused, if an
abusive use is detected, we will proceed to block the user's access to the
API.
+ {% endblock %}
+ {% block webhooks-section %}
Webhooks
All methods that emit webhook events are marked with flag WEBHOOK, the
data structure defined on each method represents the payload of the
@@ -97,9 +102,11 @@
"profileId": "db601c95-045f-808b-8002-361312e63531"
}
+ {% endblock %}
+
-