- Why relation not included in REST API responses?
- PostgreSQL connection error when declaring No for SSL
Why relation not included in REST API responses?
- Check the content type by using Content-Type Builder, make sure the the field with
Relation
type is corrected set. - If you are building the frontend part of your app, keep in mind that the users and permissions are not the same as the counterparts used by the Admin Panel. You can view all the users by visiting “Content Manager” -> “COLLECTION TYPES” -> “User”, the roles can be configurated via “Settings” -> “USERS & PERMISSIONS PLUGIN” -> “Roles”.
- Remember to assign corresponding permissions to specific roles, also set correct role for specific users.
- When fetching data from Strapi REST API, you will need to the
populate
parameter to populate specific relation fields, for exampleGET /api/articles?populate=*
. - Add the authorization header with your token in the HTTP HEADERS part:
1
2
3{
"Authorization" : "Bearer <TOKEN>"
}
PostgreSQL connection error when declaring No for SSL
- Make sure your PostgreSQL connection information is correct, especially SSLmode is not required by the database server.
- Edit
config.database.js
, replacessl: env.bool('DATABASE_SSL', false),
with the following content:
1 | ssl: { |