shlink/module/Rest/config/routes.config.php

58 lines
1.8 KiB
PHP
Raw Normal View History

2016-07-19 18:07:59 +03:00
<?php
use Shlinkio\Shlink\Rest\Action;
return [
'routes' => [
[
2017-07-07 14:12:45 +03:00
'name' => Action\AuthenticateAction::class,
'path' => '/rest/v{version:1}/authenticate',
'middleware' => Action\AuthenticateAction::class,
'allowed_methods' => ['POST'],
2016-07-19 18:07:59 +03:00
],
2017-07-07 14:12:45 +03:00
// Short codes
2016-07-19 18:07:59 +03:00
[
2017-07-07 14:12:45 +03:00
'name' => Action\CreateShortcodeAction::class,
'path' => '/rest/v{version:1}/short-codes',
'middleware' => Action\CreateShortcodeAction::class,
'allowed_methods' => ['POST'],
2016-07-19 18:07:59 +03:00
],
[
2017-07-07 14:12:45 +03:00
'name' => Action\ResolveUrlAction::class,
'path' => '/rest/v{version:1}/short-codes/{shortCode}',
'middleware' => Action\ResolveUrlAction::class,
'allowed_methods' => ['GET'],
2016-07-19 18:07:59 +03:00
],
[
2017-07-07 14:12:45 +03:00
'name' => Action\ListShortcodesAction::class,
'path' => '/rest/v{version:1}/short-codes',
'middleware' => Action\ListShortcodesAction::class,
2016-07-19 18:07:59 +03:00
'allowed_methods' => ['GET'],
],
[
2017-07-07 14:12:45 +03:00
'name' => Action\EditShortcodeTagsAction::class,
'path' => '/rest/v{version:1}/short-codes/{shortCode}/tags',
'middleware' => Action\EditShortcodeTagsAction::class,
'allowed_methods' => ['PUT'],
],
// Visits
[
'name' => Action\GetVisitsAction::class,
'path' => '/rest/v{version:1}/short-codes/{shortCode}/visits',
'middleware' => Action\GetVisitsAction::class,
'allowed_methods' => ['GET'],
2016-07-19 18:07:59 +03:00
],
2017-07-07 14:12:45 +03:00
// Tags
[
2017-07-07 14:12:45 +03:00
'name' => Action\ListTagsAction::class,
'path' => '/rest/v{version:1}/tags',
'middleware' => Action\ListTagsAction::class,
'allowed_methods' => ['GET'],
],
2016-07-19 18:07:59 +03:00
],
];