Jamie's Blog

  • Home
  • About me
  • Blogs

api

Strapi

After upgrading Strapi from v3 to v4, the default response does not return relational data

After upgrading Strapi from v3 to v4, the API default response does not return realational data. So we need to add the pouplate parameter when sending requests. GET /api/articles?populate=* GET /api/books?populate=author.name,author.address GET /api/articles?populate[0]=seoData&populate[1]=seoData.sharedImage&populate[2]=seoData.sharedImage.media Official Doc

By jamie, 2 years13 March 2023 ago
Categories
  • AWS (2)
  • Backend Development (36)
  • Bootstrap (1)
  • Computer Science (3)
  • Crawler (1)
  • CSS (3)
  • Database (11)
  • Design Model (1)
  • Docker (12)
  • Elasticsearch (2)
  • eslint (1)
  • Frontend Development (25)
  • git (1)
  • Gradle (1)
  • Gson (1)
  • hibernate (1)
  • HTML (1)
  • Jackson (2)
  • Java (13)
  • javascript (3)
  • json (2)
  • junit (4)
  • Linux (7)
  • Mybatis (4)
  • MySQL (7)
  • Networks (3)
  • Nginx (1)
  • prettier (1)
  • Pyppeteer (1)
  • React (16)
  • Spring (2)
  • Springboot (2)
  • Strapi (2)
  • version control (1)
  • wordpress (2)
  • About me
  • Blogs
  • Front Page
Hestia | Developed by ThemeIsle