In the daily application of Anqi CMS,archiveFiltersThe interface is an important tool for dynamically displaying filtering conditions on the front-end page. It allows the website to generate various filtering options based on the field configuration of the article model, such as "CityThis is crucial for building a user-friendly content browsing experience, where users can quickly locate content of interest through these filtering conditions.However, many developers may have a question when integrating: Does this interface require user login authorization to access?
To answer this question, we need to carefully examinearchiveFiltersthe documentation details of the interface. From its definition, the calling method of the interface isGETand only one request parameter is neededmoduleIdUsed to specify the filtering condition for retrieving which document model. On the surface, there is no direct requirement for any user identity or authorization token parameters to be passed.
However, the part at the end of the document labeled "error codes" is what truly provides clues. There, we clearly see the following error codes:
0: OK (Success)-1: Error, the error reason is indicated in msg1001: Not logged in1002: Unauthorized
These special error codes——“Not logged in” and “Not authorized”, clearly tell us a key information: althougharchiveFiltersThe direct parameters of the interface do not contain authentication information, but the Anqi CMS platform is designed to support login and authorization verification.This means that this interface is not absolutely open, its access permissions are configurable.
A robust content management system must necessarily consider data security and access control.Even seemingly public filtering conditions may require access restrictions in certain specific business scenarios.For example, a corporate internal application may only open the filtering conditions to internal employees; or, the filtering options for exclusive content of senior members also require users to log in and have the corresponding permissions to see the complete list.The Anqi CMS provides flexible permission management capabilities by reserving these error codes at the interface level.
Therefore, when we callarchiveFiltersthe interface and encounter a return code of1001(Not logged in) or1002The situation of [unauthorized] means that the current security CMS system has restricted access to this interface.This usually requires the website administrator to make corresponding configuration adjustments in the background, such as setting the interface to public access, or ensuring that the request includes valid user login credentials (such as through Tokens and other methods).
In short,archiveFiltersThe interface does not need user login authorization by default to access.The access permission ultimately depends on the specific backend configuration of the security CMS instance you are using.The system default may allow public access, but it can also be configured to require login or specific authorization according to actual business needs.This design demonstrates the flexibility and scalability of Anqi CMS in terms of permission management.
Common Questions (FAQ)
1.archiveFiltersIs the API supposed to require login to access?No,archiveFiltersThe interface does not need to log in by default to access.Its access permissions are configurable.In many secure CMS deployments, for the convenience of displaying filtering features on the front-end page, this interface is usually configured as public access.1001or1002Error means that the current system has set access restrictions for it.
2. IfarchiveFiltersAPI returns1001(Not logged in) or1002Unauthorized error, what should I do?When encountering1001or1002When an error occurs, the first thing you need to check is your security CMS backend configuration.You can find options to control API access permissions in modules related to 'System Settings', 'API Management', or 'User Permissions'.archiveFiltersThe interface is set to public access, or ensure that your frontend request carries valid user login credentials (Token, etc.) when calling the interface, and that the user has access privileges.
3. BesidesarchiveFiltersWhat other similar interfaces may exist with configurable login authorization needs in AnQi CMS?From the documentation, manyarchive(Documentation) related read interfaces, such asarchiveDetail(Get document details),archiveList(Get document list),archivePrev(Get the previous document) andarchiveNext(Get the next document) etc., their error code part also contains1001(Not logged in) and1002