mirror of
https://github.com/strapi/strapi.git
synced 2026-01-06 12:13:52 +00:00
107 lines
2.2 KiB
JSON
107 lines
2.2 KiB
JSON
{
|
|
"routes": [
|
|
{
|
|
"method": "POST",
|
|
"path": "/",
|
|
"handler": "Upload.upload",
|
|
"config": {
|
|
"policies": [],
|
|
"description": "Upload a file",
|
|
"tag": {
|
|
"plugin": "upload",
|
|
"name": "File"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"method": "GET",
|
|
"path": "/environments",
|
|
"handler": "Upload.getEnvironments",
|
|
"config": {
|
|
"policies": []
|
|
}
|
|
},
|
|
{
|
|
"method": "GET",
|
|
"path": "/settings/:environment",
|
|
"handler": "Upload.getSettings",
|
|
"config": {
|
|
"policies": []
|
|
}
|
|
},
|
|
{
|
|
"method": "PUT",
|
|
"path": "/settings/:environment",
|
|
"handler": "Upload.updateSettings",
|
|
"config": {
|
|
"policies": []
|
|
}
|
|
},
|
|
{
|
|
"method": "GET",
|
|
"path": "/files/count",
|
|
"handler": "Upload.count",
|
|
"config": {
|
|
"policies": [],
|
|
"description": "Retrieve the total number of uploaded files",
|
|
"tag": {
|
|
"plugin": "upload",
|
|
"name": "File"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"method": "GET",
|
|
"path": "/files",
|
|
"handler": "Upload.find",
|
|
"config": {
|
|
"policies": [],
|
|
"description": "Retrieve all file documents",
|
|
"tag": {
|
|
"plugin": "upload",
|
|
"name": "File"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"method": "GET",
|
|
"path": "/files/:_id",
|
|
"handler": "Upload.findOne",
|
|
"config": {
|
|
"policies": [],
|
|
"description": "Retrieve a single file depending on its id",
|
|
"tag": {
|
|
"plugin": "upload",
|
|
"name": "File"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"method": "GET",
|
|
"path": "/search/:id",
|
|
"handler": "Upload.search",
|
|
"config": {
|
|
"policies": [],
|
|
"description": "Search for an uploaded file",
|
|
"tag": {
|
|
"plugin": "upload",
|
|
"name": "File"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"method": "DELETE",
|
|
"path": "/files/:_id",
|
|
"handler": "Upload.destroy",
|
|
"config": {
|
|
"policies": [],
|
|
"description": "Delete an uploaded file",
|
|
"tag": {
|
|
"plugin": "upload",
|
|
"name": "File"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|