Explore fundamental aspects of API-first content management with this quiz on Strapi CMS basics. Assess your understanding of content types, API endpoints, authentication, and core architecture principles relevant for modern headless CMS solutions.
Which of the following best describes a 'Content Type' in the context of an API-first CMS, such as when creating a Blog Post entity?
Explanation: A content type defines how data for similar items is structured, such as what fields a Blog Post should include. A static page contains fixed text but doesn't define structures for multiple items. A database user with editing permissions refers to user roles, not data structure. A style sheet manages appearance, not content data organization.
When an API-first CMS generates RESTful endpoints for entries of a content type, what operation does an HTTP POST request typically perform?
Explanation: A POST request is used to create new entries within an endpoint, such as adding a new Blog Post. Retrieving entries is done via GET, while updating uses PUT or PATCH, and deletion uses DELETE. Therefore, POST best matches the creation operation among the options.
How does an API-first CMS typically manage which users can access or modify certain content or endpoints?
Explanation: Most CMS platforms handle access control via role-based permissions, specifying what actions each user role can perform. Automatic encryption of responses is a security measure, not primarily for permissions. Numeric user IDs merely identify users and do not enforce permissions. Embedding scripts is unrelated to access control and poses security risks.
In an API-first CMS, what is the main function of JWT (JSON Web Token) authentication when accessing protected endpoints?
Explanation: JWT authentication validates the client's identity and authorizes access to restricted API routes. It is not responsible for managing media files or adding frontend styles; those are separate concerns. Updating server software is unrelated to authentication protocols.
If you want to create a settings page with only one record in an API-first CMS, which content type configuration should you choose?
Explanation: A 'Single Type' ensures only one instance exists, which is ideal for settings pages or similar unique data. 'Collection Type' allows multiple entries, suitable for items like articles. 'Data Table' and 'Repeated Field' are not standard content type configurations for this purpose; they either describe database structures or complex fields.