I need to keep the collection’s API fully functional (for operations like find
, create
, delete
, etc.) while hiding it from the Strapi admin panel. What is the best way to achieve this?
I have a test-collection in the root project:
api/test-collection/...
content-types
controllers
services
After setting content-manager: false
for this collection, I can no longer use its content-manager API.
This means that calls to /content-manager/collection-types/api::test-collection.test-collection
will result in a 403 error.
{
"kind": "collectionType",
"collectionName": "test-collection",
"info": {
"singularName": "test-collection",
"pluralName": "test-collections",
"displayName": "test collection",
"description": ""
},
"options": {
"draftAndPublish": true
},
"pluginOptions": {
"content-manager": {
"visible": false
},
"content-type-builder": {
"visible": false
}
}
}
Is there a way to hide the collection while keeping its API accessible?
From what I have found so far, we can only achieve this by defining our own custom endpoints that implement the necessary logic of basic ( filtering, sorting, plagination, totals etc ) and using axios to call it. But is there a simpler way to do this?