Create a new resource.

Param1 * $resource_type The ID of the resource type for the new resource (e.g. 1=Photo).
Param2 $archive The archival state of the new resource (0=live).
Param3 $url Optional; v8.1 and above
The URL of a file to upload. ResourceSpace will copy the file to the local system then import it to the specified resource.
Param4 $no_exif Optional; v8.1 and above
Do not process embedded metadata. Leave blank for the default (to process data).
Param5 $revert Not currently used, leave blank.
Param6 $autorotate Optional; v8.1 and above
Automatically rotate (correct) images if the rotation flag is set on the image.
Param7 $metadata Optional; v8.1 and above
The metadata to add. A JSON encoded array of field ID to value string pairs. See the example in api/example.php.

Return values

The ID of the newly created resource.