Why is url missing from field of type single_asset in api repsonse

I’m using the ruby gem to access the API. I’ve defined a model with a field of type Single asset and have uploaded an image. But when I get the response the URL to the the asset isn’t included. It looks like this:

{"alt"=>nil, "title"=>nil, "custom_data"=>{"cool"=>"true"}, "focal_point"=>nil, "upload_id"=>"26697975"}

Is there a way to include the url in the response or do I have to make another request to get the media resource? Seems a bit backwards to me.

Hello @gabriel yes, you need to make another call to get the asset details.

If you are reading only from the API you should consider using the GraphQL API where you can get information in a much simpler and faster way.

Have a look here: Content Delivery API - Overview - DatoCMS Docs for more info.

Ok, thanks!