Strapi CMS Basics Quiz: API-First Content Management Essentials Quiz

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.

  1. Identifying Content Types

    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?

    1. A static page containing predefined text only
    2. A style sheet controlling website appearance
    3. A database user with content editing permissions
    4. A set of data fields defining the structure of similar items

    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.

  2. Understanding API Endpoints

    When an API-first CMS generates RESTful endpoints for entries of a content type, what operation does an HTTP POST request typically perform?

    1. Retrieves a list of all existing entries
    2. Creates a new entry in the specified content type
    3. Deletes an entry permanently
    4. Updates an existing entry by ID

    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.

  3. Role-Based Permission Control

    How does an API-first CMS typically manage which users can access or modify certain content or endpoints?

    1. By using only numeric user IDs
    2. By encrypting all API responses automatically
    3. By embedding script tags in each request
    4. By assigning permissions to user roles for specific actions

    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.

  4. Authentication for API Usage

    In an API-first CMS, what is the main function of JWT (JSON Web Token) authentication when accessing protected endpoints?

    1. It automatically updates server software
    2. It adds custom styles to the frontend views
    3. It verifies the identity of the client and authorizes access
    4. It stores media files for the application

    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.

  5. Distinguishing Single Types and Collection Types

    If you want to create a settings page with only one record in an API-first CMS, which content type configuration should you choose?

    1. Repeated Field
    2. Data Table
    3. Collection Type
    4. Single Type

    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.