Open sebjf opened 6 months ago
For future reference, APIs that the viewer currently uses and potential V5 equivalents.
Purpose |
Format |
File |
Line |
Version |
Notes |
V5 Equivalent |
V5 Notes |
---|---|---|---|---|---|---|---|
Get model properties |
/<teamspace>/<modelID>/revision/<revision>/modelProperties.json |
BundleLoader |
498 |
V4 |
|
Maybe |
No direct equivalent for model properties, but there is one for model settings that can be used for either individual containers and federations. Will need to investigate closer what information is actually used by the viewer and what is contained in the v5 APIs |
Get repo assets |
/<teamspace>/<modelID>/revision/<revision>/repoAssets.json |
BundleLoader |
582 |
V4? |
Found only API for a unityAssets.json. Likely the correct one just for models with repobundles |
No |
Not apparent to me what could serve as an V5 equivalent |
Get metadata |
/<teamspace>/<modelID>/revision/<revision>/assetsMeta |
BundleLoader |
697 |
V4? |
Cannot find direct equivalent in documentation that would take assetsMeta, though there is a meta/all.json that looks similar. |
No |
No GET access for metadata |
Get group objects |
/<teamspace>/<containerID>/groups/<groupID> |
ModelController |
1587 |
V4? |
Cannot find an exact match. There is a version that could fit, but it has an additional sections for the revision in it which is lacking in the viewer version |
No |
No GET access for groups. Only a POST that appears as if it returns a list of group information after provided with IDs to lookup. |
Loading model settings |
/<teamspace>/<modelID>.json |
ModelController |
3337 |
V4 |
|
Yes |
Access for model settings for containers, federations, and drawings exists |
Fetching group (for the views) |
/<teamspace>/<modelID>/revision/<revision>/groups/<groupID> |
ViewsManager |
226 |
V4 |
|
No |
No GET access for groups. Only a POST that appears as if it returns a list of group information after provided with IDs to lookup. |
Get view info |
/<teamspace>/<modelID>/viewpoints/<viewID> |
ViewsManager |
232 |
V4 |
|
Partially |
There is an API to get a list of views but apparently none to get the info of a particular view |
Get map texture |
/<teamspace>/<modelID>/maps/here/<currentZoomLevel>/<nx>/<ny>.png |
HereMapCreator |
86 |
V4 |
|
No |
|
Get map texture |
/<teamspace>/<modelID>/maps/hereaerial/<currentZoomLevel>/<nx>/<ny>.png |
HereAerialMapCreator |
41 |
V4 |
|
No |
|
Get map texture |
/<teamspace>/<modelID>/maps/herehybrid/<currentZoomLevel>/<nx>/<ny>.png |
HereHybridMapCreator |
41 |
V4 |
|
No |
|
Get map texture |
/<teamspace>/<modelID>/maps/herepoi/<currentZoomLevel>/<nx>/<ny>.png |
HerePOIMapCreator |
41 |
V4 |
|
No |
|
Get map texture |
/<teamspace>/<modelID>/maps/heregrey/<currentZoomLevel>/<nx>/<ny>.png |
HereStreetMapCreator |
41 |
V4 |
|
No |
|
Get map texture |
/<teamspace>/<modelID>/maps/hereterrain/<currentZoomLevel>/<nx>/<ny>.png |
HereTerrainMapCreator |
41 |
V4 |
|
No |
|
Get map texture |
/<teamspace>/<modelID>/maps/heretollzone/<currentZoomLevel>/<nx>/<ny>.png |
HereTollZoneMapCreator |
41 |
V4 |
|
No |
|
Get map texture |
/<teamspace>/<modelID>/maps/heretrafficflow/<currentZoomLevel>/<nx>/<ny>.png |
HereTrafficFlowMapCreator |
43 |
V4 |
|
No |
|
Get map texture |
/<teamspace>/<modelID>/maps/heretraffic/<currentZoomLevel>/<nx>/<ny>.png |
HereTrafficMapCreator |
41 |
V4 |
|
No |
|
Get map texture |
/<teamspace>/<modelID>/maps/heregreytransit/<currentZoomLevel>/<nx>/<ny>.png |
HereTransitMapCreator |
41 |
V4 |
|
No |
|
Get map texture |
/<teamspace>/<modelID>/maps/heretruckoverlay/<currentZoomLevel>/<nx>/<ny>.png |
HereTruckOverlayMapCreator |
43 |
V4 |
|
No |
|
Get map texture |
/<teamspace>/<modelID>/maps/osm/<currentZoomLevel>/<nx>/<ny>.png |
OSMMapCreator |
86 |
V4 |
|
No |
|
Get subobject |
/<teamspace>/<modelID>/meshes/<meshID> |
PhysicsService |
181 |
V4? |
No equivalent found in the docs |
No |
|
Get Unity Asset Bundle |
/<teamspace>/<modelID>/<bundleID>.unity3d |
BundleLoader |
205 |
V4 |
The actual URL appears not to be assembled in the viewer but instead has come from the asset list retrieved earlier |
No |
|
Get Repo Asset Bundle |
/<teamspace>/<modelID>/<bundleID>.repobundle |
BundleLoader |
209 |
V4 |
The actual URL appears not to be assembled in the viewer but instead has come from the asset list retrieved earlier. Not listed in docs |
No |
|
Load Asset Maps for Container |
/<teamspace>/<containerID>/revision/<revisionID>/supermeshes.json.mpc |
BundleLoader |
386 |
V4? |
No mention in docs. |
No |
|
Load Asset Maps for Federation |
/<teamspace>/<modelID>/revision/master/head/supermeshes.json.mpc |
BundleLoader |
432 |
V4? |
Pretty much the same call as the one directly above, but with fixed revision, since Federations are not allowed to have revisions. No mention in docs. |
No |
|
Get texture |
/<teamspace>/<containerID>/<textureID>.texture |
TextureManager |
143 |
V4? |
URL is actually assembled in the textureHelper class. Not mentioned in the docs |
No |
|
Description
Once the viewer is V5 ready, we should move over some of the APIs that it solely uses to V5 style. These include at least some model and textures calls.
Goals
Tasks
Related Resources
Unity Issue: https://github.com/3drepo/3drepounity/pull/522