Anonymous user can view unpublished content Is there any way anonymous users can access unpublished pages using view?

I have a REST api for a custom content type that has setting of unpublished content and I want anonymous users can access it.
Yes, You can enable module Workflows which is currently packed in core since 8.3 and check for permission for anonymous user


  View any unpublished content


in /admin/people/permissions

Note: Not to confuse about the permission when enable only Workflows. You need to enable module Content Moderation(Core module) to make Workflows work. Once go to /admin/config/workflow/workflows you will see the the default workflow. Here is the permission after enable Content Moderation.