GET :urn/metadata returns an empty list - autodesk-forge

I tried the method in the object with this RVT urn: dXJuOmFkc2sud2lwcHJvZDpmcy5maWxlOnZmLk1HQm5UX2MtVFhteHRzZzJZY2NXR3c_dmVyc2lvbj0x
I get this response with status code 200 {"data":{"type":"metadata","metadata":[]}}
I cannot extract properties using the model derivative API.

Hi we had a similar error where meta was empty.
This was because the upload had succeeded (we got a urn) but the translation had failed and getting the meta information on failed translation just returned an empty meta repsonse. This was specifically with revit files.
If you check the manifest endpoint with that urn do you see and revit file translation error?

Related

Loading a BIM360 model from a deployed site returns 9: BAD_DATA_NO_VIEWABLE_CONTENT

I have some JavaScript that calls the function Autodesk.Viewing.Document.load(...). When I run this locally, I am able to successfully load a model, but when the code is deployed the exact same model returns the error
9: BAD_DATA_NO_VIEWABLE_CONTENT
Any ideas what the issue would be?
There are various reasons why loading a model from Forge could return the error code 9, for example:
you are loading a model that has not been processed using the POST job endpoint yet
the model has already been processed but the translation failed for some reason (use the GET :urn/manifest endpoint to check if you see "status": "success")
the model was translated successfully but there is no actual viewable content in it (e.g. a Revit model with no 2D sheets and no 3D views specified)
the model was translated successfully, but the output derivatives have been removed, either manually (using the DELETE :urn/manifest endpoint) or perhaps automatically after the original file was removed from a Forge OSS bucket

Error in uploading JSON to IBM Watson Discovery

Whenever I am trying to Upload A JSON to IBM Discovery as it shows an error.
The error message:
400 - Top-level array JSON documents are not supported
Is there a specific format my JSON needs to be in before uploading. I basically want to upload a table with columns and rows to Discovery! I have also attached a samle JSON file which I want to upload. enter image description here
any help is much appreciated
enter image description here
As per the error message, it is not expecting the top level element to be an array. Can you put the array as key value and then try? so instead of [{"your_key":"your_value.....}] it will then be {"values": [{"your_key":"your_value.....}] }

Forge Viewer fails to dispaly PDF's

I am using the sample C# SDK for using the Forge Derivative service and viewer. I've been successful with using any document but not with PDF. All the PDF's I've tried, translated successfully but it gives the following error when attempting to view.
Failed to load resource: the server responded with a status of 404 (Not Found) three.min.css
Uncaught TypeError: Cannot read property 'paperUnits' of undefined
I just bumped into this myself. Please try with ViewingApplication object for initialization instead of basic viewer. The way shown in Basic Viewer requires additional configuration values from the manifest.
https://developer.autodesk.com/en/docs/viewer/v2/tutorials/basic-application/

GeoServer not returning correct JSON for WFS using OpenLayers.Protocol.Script

I am trying to get json features from GeoServer 2.3.0. I have duplicated the code from an example and it works as expected. However, when I set the url to my GeoServer and desired layer, the returned format isn't the same and results in this error: "Uncaught SyntaxError: Unexpected token : "
The example server returns the json features in this format:
OpenLayers.Protocol.Script.registry.c1({"type":"FeatureCollection","features":[{"type":"Feature","id":"cities.2","geometry": ...
My GeoServer returns the json features in this format:
{"type":"FeatureCollection","features":[{"type":"Feature","id":"poi.1","geometry": ...
The error is caused by my GeoServer not returning the json wrapped in the callback function. This seems to be a server config issue but as a GeoServer noob, I have been unable to find the correct settings to tweak.
Discovered the solution. The server has JSONP disabled by default. Setting the environment variable ENABLE_JSONP=true and requesting the format "text/javascript" yields the expected results. Still not sure why the example server returns the correct jsonp with the requested format of "json".

API 2.0 how to upload file with POSTMAN?

I'm reading API 2.0 documentation and try using POSTMAN (recommended in the documentation).
In "Upload a file" section, I got "404 not found" error.
for example:
{"type":"error","status":404,"code":"not_found","help_url":"","message":"Unknown Error","request_id":"11139828924fa91c0d283d2"}
POSTMAN window image is here.
Base URL is tring "upload.box.com/api/2.0" (temporary, according to the document).
What's wrong?
One more point, your POSTMAN request misses to indicate folder_id in its form data . You need that "folder_id" value for the request to work .
The domain specific Upload issues have all been resolved. You can now direct all API requests, including uploads, to https://api.box.com/2.0