Image Files Uploaded via REST got Temporary status - Cannot be refereced by Media Image Drupal 8.9.11
Image File Uploaded via REST gets &quot;status - Temporary&quot; while setting explicitly &quot;status&quot; case to True server error 403 (code in python)
   &quot;status&quot;: [
      {
        &quot;value&quot;: True
      }
   ],

The sever returns code 403, an exception:
Status: 403, Message: {&quot;message&quot;:&quot;Access denied on creating field \u0027status\u0027.&quot;}

The error on the server:
$ vendor/bin/drush watchdog-show
access denied Warning Path: /themag_dp8/entity/file?_format=hal_json.
   Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException: Access denied on creating
   field 'status'. in Drupal\rest\Plugin\rest\resou

If I'll not specify &quot;status = true&quot; The next REST call to Create Media fails to reference it due to its temporary status.
   payload = {
        &quot;name&quot;: {
            &quot;value&quot;: name
        },
        &quot;field_image&quot;: [
            {
                &quot;target_id&quot;: file_id
            }
        ],
        &quot;field_description&quot;: [
            {
                &quot;value&quot;: description
            },
        ],
        &quot;bundle&quot;: [
            {
                &quot;target_id&quot;: &quot;image&quot;
            }
        ],
        &quot;_links&quot;: {
            &quot;type&quot;: {
                &quot;href&quot;: oauth.base_url + REST_TYPE_MEDIA_IMAGE
            },
            oauth.base_url + &quot;/rest/relation/media/image/thumbnail&quot;: [
                {
                    &quot;href&quot;: oauth.base_url + &quot;/file/%d&quot; % file_id + FORMAT_HAL_JSON
                }
            ],
            oauth.base_url + &quot;/rest/relation/media/image/field_image&quot;: [
                {
                    &quot;href&quot;: oauth.base_url + &quot;/file/%d&quot; % file_id + FORMAT_HAL_JSON
                }
            ]
        }
    }

Status: 422, Message: {&quot;message&quot;:&quot;Unprocessable Entity: validation failed.\nfield_image.0.target_id:
This entity (file: 119) cannot be referenced.\n&quot;}

Server error:
$ vendor/bin/drush watchdog-show
access denied Warning 
    Path: /themag_dp8/entity/paragraph?_format=hal_json.
    Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException:  in
    Drupal\Core\Routing\AccessAwareRouter-&gt;checkAccess() (line 120 of
php           Error   
    Symfony\Component\HttpKernel\Exception\UnprocessableEntityHttpException: Unprocessable Entity:
    validation failed.
    field_image.0.target_id: This entity (file: 119) cannot be referenced.
    in

When I manually, via web site admin (https://drupal8.site/admin/content/files), change the file status to &quot;Permanent&quot;, this Create Media REST call succeeds to create a new media/image entity.
Seems the Rest user missing some security allowances, but which one?
Did anybody succeed to create a node consisting of the teaser image, paragraph video and so?
Sure I'm not the first who attack this issue, where the relevant documentation, working code examples?
The solution I found so far is to fix a Drupal module code:
modules\contrib\file_entity\src\Normalizer\FileEntityNormalizer.php
on line 48 add:
$entity-&gt;setPermanent();

See:

Which Drupal 8.1.x Rest API property in the JSON request controls
Drupal's File status (Temporary and Permanent) logic?

Files created with REST API are only temporary