Help with import CSV, resource types

Does someone know the resource type to set the Parents while importing new assets?

The resource type in JSON:API is generally [entity_type]--[bundle]… so for the asset parent reference field the [entity_type] is always asset, and [bundle] would be the type of asset. So if you are working with Animal assets, for example, the resource type would be asset--animal.

Pro tip: if you are ever uncertain what something needs to look like in the API, try creating it through the UI first and then look at the API endpoint for that record to see what it looks like.

2 Likes

It’s nicely formatted if you browse to the Endpoint with Firefox not so much with other browsers without a plugin. I use this one with Chrome GitHub - nicole-ashley/json-formatter: Makes JSON/JSONP easy to read.

1 Like

Thank you this will help alot.