0

I was wondering if you can help me with a problem I have related to the forge php client found at: https://github.com/Autodesk-Forge/forge-php-client

I am trying to get manifest status after translation job is done using:

$derivatives_api = new Autodesk\Forge\Client\Api\DerivativesApi($auth);
$manifest_status = $derivatives_api->getManifest($urn, null)->getStatus();

$auth variable contains scope data read, data write etc. $urn should be correct, I checked it also

At first two attempts I got value "inprogress" but after that: Invalid value for 'role', must be one of '2d', '3d', 'graphics', 'manifest', 'thumbnail'

I then went to the ManifestChildren.php and printed $role in setRole function and got that role is none of the above ('2d', '3d', 'graphics', 'manifest', 'thumbnail') but it happens to be 'Autodesk.CloudPlatform.PropertyDatabase'

Is there anything I can to to get the proper status by using getManifest function?

I am trying to get metadata as well but first I wanna check the status using manifest...

Anandhu Nadesh
  • 672
  • 2
  • 11
  • 20
Nem Par
  • 21
  • 4

1 Answers1

0

Please check the question/answer at Issue with getManifest (forge-php-client), I believe it's the same issue, and copied the answer here:

The error seems to be a bug that occurs because new roles for ManifestChildren.role were defined without beeing declared within the model.

PROPERTYDB -> Autodesk.CloudPlatform.PropertyDatabase (e.g. this is one missing 'role')

As workaround (that worked for me) just set the parameter "accept_encoding" of getManifest() to 'gzip':

$result = $apiInstance->getManifest( $correctObject, 'gzip' ); Everything works fine now.

I will log this issue to PHP client.

Zhong Wu
  • 1,721
  • 1
  • 8
  • 9