You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docusaurus/docs/dev-docs/backend-customization/routes.md
+7-7
Original file line number
Diff line number
Diff line change
@@ -15,7 +15,7 @@ Requests sent to Strapi on any URL are handled by routes. By default, Strapi gen
15
15
- with [policies](#policies), which are a way to block access to a route,
16
16
- and with [middlewares](#middlewares), which are a way to control and change the request flow and the request itself.
17
17
18
-
Once a route exists, reaching it executes some code handled by a controller (see [controllers documentation](/dev-docs/backend-customization/controllers)).
18
+
Once a route exists, reaching it executes some code handled by a controller (see [controllers documentation](/dev-docs/backend-customization/controllers)). To view all existing routes and their hierarchal order, you can run `yarn strapi routes:list` (see [CLI reference](/dev-docs/cli)).
19
19
20
20
<figurestyle={imgStyle}>
21
21
<imgsrc="/img/assets/backend-customization/diagram-routes.png"alt="Simplified Strapi backend diagram with routes highlighted" />
@@ -319,7 +319,7 @@ module.exports = {
319
319
{
320
320
method:'GET',
321
321
path:'/articles/customRoute',
322
-
handler:'controllerName.actionName',
322
+
handler:'api::api-name.controllerName.functionName', // or 'plugin::plugin-name.controllerName.functionName' for a plugin-specific controller
323
323
config: {
324
324
policies: [
325
325
// point to a registered policy
@@ -350,7 +350,7 @@ export default {
350
350
{
351
351
method:'GET',
352
352
path:'/articles/customRoute',
353
-
handler:'controllerName.actionName',
353
+
handler:'api::api-name.controllerName.functionName', // or 'plugin::plugin-name.controllerName.functionName' for a plugin-specific controller
354
354
config: {
355
355
policies: [
356
356
// point to a registered policy
@@ -462,7 +462,7 @@ module.exports = {
462
462
{
463
463
method:'GET',
464
464
path:'/articles/customRoute',
465
-
handler:'controllerName.actionName',
465
+
handler:'api::api-name.controllerName.functionName', // or 'plugin::plugin-name.controllerName.functionName' for a plugin-specific controller
466
466
config: {
467
467
middlewares: [
468
468
// point to a registered middleware
@@ -493,7 +493,7 @@ export default {
493
493
{
494
494
method:'GET',
495
495
path:'/articles/customRoute',
496
-
handler:'controllerName.actionName',
496
+
handler:'api::api-name.controllerName.functionName', // or 'plugin::plugin-name.controllerName.functionName' for a plugin-specific controller
497
497
config: {
498
498
middlewares: [
499
499
// point to a registered middleware
@@ -582,7 +582,7 @@ module.exports = {
582
582
{
583
583
method:'GET',
584
584
path:'/articles/customRoute',
585
-
handler:'controllerName.actionName',
585
+
handler:'api::api-name.controllerName.functionName', // or 'plugin::plugin-name.controllerName.functionName' for a plugin-specific controller
586
586
config: {
587
587
auth:false,
588
588
},
@@ -602,7 +602,7 @@ export default {
602
602
{
603
603
method:'GET',
604
604
path:'/articles/customRoute',
605
-
handler:'controllerName.actionName',
605
+
handler:'api::api-name.controllerName.functionName', // or 'plugin::plugin-name.controllerName.functionName' for a plugin-specific controller
0 commit comments