跳到主要内容

31 篇文档带有标签「Rest API」

查看所有标签

API tokens

* Administrators can create, read, update, or delete API tokens only if proper permissions are granted (see Configuring administrator roles).

API tokens configuration

Using API tokens allows executing a request on Strapi's REST API endpoints as an authenticated user.

Back-end customization

All elements of Strapi's back end, like routes, policies, middlewares, controllers, services, models, requests, responses, and webhooks, can be customized.

Controllers

Controllers are JavaScript files that contain a set of methods, called actions, reached by the client according to the requested route. Whenever a client requests the route, the action performs the business logic code and sends back the response. Controllers represent the C in the model-view-controller (MVC) pattern.

Error handling

With Strapi's error handling feature it's easy to send and receive errors in your application.

How to populate creator fields

Learn how to populate creator fields such as createdBy and updatedBy by creating a custom controller that leverages the populate parameter.

Middlewares

The diagram represents a simplified version of how a request travels through the Strapi back end, with global middlewares highlighted. The backend customization introduction page includes a complete, interactive diagram.

Models

Strapi models (i.e. content-types, components, and dynamic zones) define a representation of the data structure.

Parameters

Use API parameters to refine your Strapi REST API queries.

Policies

Strapi policies are functions that execute specific logic on each request before it reaches the controller. Policies can be customized according to your needs.

Relations

Use the REST API to manage the order of relations

REST API Guides

Deep dive into some specific REST API topics using guides that extensively explain some use cases or give step-by-step instructions.

REST API reference

Interact with your Content-Types using the REST API endpoints Strapi generates for you.

Routes

Strapi routes handle requests to your content and are auto-generated for your content-types. Routes can be customized according to your needs.

Services

Strapi services are a set of reusable functions, useful to simplify controllers logic.

Understanding populate

Learn what populating means and how you can use the populate parameter in your REST API queries to add additional fields to your responses.

Upload plugin

Upload any kind of file on your server or external providers.

Webhooks

Strapi webhooks are user-defined HTTP callbacks used by an application to notify other applications that an event occurred.

What's new in Strapi 5 docs?

Strapi 5 brings many new features and improvements, and this page quickly highlights the most important documentation changes.