'Data Management Forge API BIM 360 Item Version Relationship Refs returning no data, for acquiring Links Information

projects/:project_id/versions/:version_id/relationships/refs

method for getting Relationships/refs https://developer.api.autodesk.com/data/v1/projects/:project_id/versions/:version_id/relationships/refs

Using project_id: b.c2b664d6-da49-4275-8380-3b452f567532

Using version_id: urn:adsk.wipprod:fs.file:vf.0a8nbuOXTz6vhQcCyz3amw%3fversion=1

returns the following response with no data

{
    "jsonapi": {
        "version": "1.0"
    },
    "links": {
        "self": {
            "href": "https://developer.api.autodesk.com/data/v1/projects/b.c2b664d6-da49-4275-8380-3b452f567532/versions/urn:adsk.wipprod:fs.file:vf.0a8nbuOXTz6vhQcCyz3amw%3Fversion=1/relationships/refs"
        },
        "related": {
            "href": "https://developer.api.autodesk.com/data/v1/projects/b.c2b664d6-da49-4275-8380-3b452f567532/versions/urn:adsk.wipprod:fs.file:vf.0a8nbuOXTz6vhQcCyz3amw%3Fversion=1/refs"
        }
    },
    "data": []
}

I am trying to get links in the BIM 360 Revit File.



Solution 1:[1]

There is a bug with composite linked model items;

I had a discussion with Liang, one of the Forge Advocates, I am able to get the values for non composite linked models.

Get Request for item data

https://developer.api.autodesk.com/data/v1/projects/:project_id/items/:item_id/versions

I need to make sure my item data is isCompositeDesign: false;

                    "data": {
                    "modelVersion": 135,
                    "projectGuid": "3706e5cb-730c-4569-90cf-f14cd26becc8",
                    "originalItemUrn": "urn:adsk.wipprod:dm.lineage:Ntiy9ppQQsGCGff3bGx__Q",
                    "isCompositeDesign": false,
                    "modelType": "multiuser",
                    "latestEpisodeGuid": "8511e3d3-a8b8-4ca1-b9b1-ef8993aed1e5",
                    "mimeType": "application/vnd.autodesk.r360",
                    "modelGuid": "e4739730-b661-48b2-a26b-724ee3b27ef9",
                    "processState": "PROCESSING_COMPLETE",
                    "extractionState": "SUCCESS",
                    "splittingState": "NOT_SPLIT",
                    "reviewState": "NOT_IN_REVIEW",
                    "revisionDisplayLabel": "6",
                    "sourceFileName": "Test_MasterFile.rvt",
                    "conformingStatus": "NONE"
                }

then I can get the correct response, where xrefs are my linked data:

https://developer.api.autodesk.com/data/v1/projects/:project_id/versions/:version_id/relationships/refs

    "data": [
    {
        "type": "versions",
        "id": "urn:adsk.wipprod:fs.file:vf.x8jKeZl9S2KkICKE-6avjA?version=5",
        "meta": {
            "refType": "xrefs",
            "fromId": "urn:adsk.wipprod:fs.file:vf.Ntiy9ppQQsGCGff3bGx__Q?version=6",
            "fromType": "versions",
            "toId": "urn:adsk.wipprod:fs.file:vf.x8jKeZl9S2KkICKE-6avjA?version=5",
            "toType": "versions",
            "direction": "from",
            "extension": {
                "type": "xrefs:autodesk.core:Xref",
                "version": "1.1",
                "schema": {
                    "href": "https://developer.api.autodesk.com/schema/v1/versions/xrefs:autodesk.core:Xref-1.1"
                },
                "data": {
                    "nestedType": "overlay"
                }
            }
        }
    },

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 John Kuldeep Roshan Kerketta