CRUD operations with the Entity Service API
Caution
The Entity Service API is deprecated in Strapi v5. Please consider using the Document Service API instead.
The Entity Service API is built on top of the the Query Engine API and uses it to perform CRUD operations on entities.
The uid
parameter used in function calls for this API is a string
built with the following format: [category]::[content-type]
where category
is one of: admin
, plugin
or api
.
Examples:
- A correct
uid
to get users of the Strapi admin panel isadmin::user
. - A possible
uid
for the Upload plugin could beplugin::upload.file
. - As the
uid
s for user-defined custom content-types follow theapi::[content-type]
syntax, if a content-typearticle
exists, it is referenced byapi::article.article
.
Tip
Run the strapi content-types:list
command in a terminal to display all possible content-types' uid
s for a specific Strapi instance.
findOne()β
Finds the first entry matching the parameters.
Syntax: findOne(uid: string, id: ID, parameters: Params)
β Entry