Autodesk Platform Services Webhooks API - Get user who initiates model.sync from Revit

65 Views Asked by At

I am working on a tool for my company that tracks when users sync revit cloudshared models on ACC.

Everything is working as expected, I am getting the right webhook events as expected. The problem is that the callback payload doesn't actually tell me which user sync'd the revit file. It tells me who created the webhook, and it tells me which file was updated. I thought I would be able to just query the API to tell me who edited the file last, but that only tells me who published that model most recently, not who sync'd it.

It also returns a mysterious "episodeGuid" of which I am not able to find any information on the docs about.

Is there something I am missing or is "who initiated the sync in revit" a question that cannot be answered through the API.

{
  "version": "1.0",
  "resourceUrn": "urn:adsk.wipprod:dm.lineage:4qsCZu1nRNWvGThBdoHlvw",
  "hook": {
    "system": "adsk.c4r",
    "event": "model.sync",
    "hookId": "ce4cc990-31c4-11e8-94f2-73ce66fa9735",
    "tenant": "urn:adsk.wipprod:fs.folder:co.s424tpjyS_yYBs5ozch94g",
    "callbackUrl": "http://bf067e05.ngrok.io/callback",
    "createdBy": "************",
    "createdDate": "2017-09-22T02:38:32.341+0000",
    "creatorType": "Application",
    "hookAttribute": {
      "myfoo": 34,
      "projectId": "someURN",
      "myobject": {
        "nested": true
      }
    },
    "scope": {
      "folder": "urn:adsk.wipprod:fs.folder:co.s424tpjyS_yYBs5ozch94g"
    },
    "urn": "urn:adsk.webhooks:events.hook:1fcd3e30-9f3f-11e7-951f-0fd5337ed5ce",
    "status": "active",
    "__self__": "/systems/adsk.c4r/events/model.sync/hooks/ce4cc990-31c4-11e8-94f2-73ce66fa9735"
  },
  "payload": {
    "state" : "SYNC_COMPLETE",
    "projectId" : "b.65ddd035-a4a1-4e15-9db8-1b2b4a410bcf",
    "parentFolder" : "urn:adsk.wipprod:fs.folder:co.s424tpjyS_yYBs5ozch94g",
    "modelGuid" : "0f29fb84-ea94-46a9-9488-ca9f88d58461",
    "projectGuid" : "9a1ea050-ab00-440a-9b64-520b38eb1dd2",
    "modelVersion" : 15,
    "episodeGuid" : "617e8d76-1dbc-40be-86c7-c1b8643495af"
  }
}

I appreciate your help

1

There are 1 best solutions below

2
On

Unfortunately, I don't think the information of user who initiated the sync is exposed in the webhook payload, and this information could not be retrieved from the Revit cloud model version details by Data Management APIe either(check the response body of version info). But I agree that it would be great if this user information could be included in the payload of webhook event, can you provide me your user case? So I can check back with engineering team for an improvement if this is confirmed.

Btw, about "episodeGuid", this is the id of the internal worksharing model version, currently this should not be used by external developers with APS API.

       {
            "type": "versions",
            "id": "urn:adsk.wipprod:fs.file:vf._vs-4xxxxzll5lXNsA?version=3",
            "attributes": {
                "name": "SharedParameteSample.rvt",
                "displayName": "SharedParameteSample.rvt",
                "createTime": "2023-12-01T15:10:18.0000000Z",
                "createUserId": "XXXXX",
                "createUserName": "Zhong Wu",
                "lastModifiedTime": "2023-12-01T15:13:28.0000000Z",
                "lastModifiedUserId": "XXXXX",
                "lastModifiedUserName": "Zhong Wu",
                "versionNumber": 3,
                "mimeType": "application/vnd.autodesk.r360",
                "storageSize": 38391808,
                "fileType": "rvt",
                "extension": {
                    "type": "versions:autodesk.bim360:C4RModel",
                    "version": "1.3.1",
                    "schema": {
                        "href": "https://developer.api.autodesk.com/schema/v1/versions/versions:autodesk.bim360:C4RModel-1.3.1"
                    },
                    "data": {
                        "modelVersion": 6,
                        "isCompositeDesign": false,
                        "mimeType": "application/vnd.autodesk.r360",
                        "revitProjectVersion": 2024,
                        "projectGuid": "XXXX-d235-47ff-a70c-1aa25e5b8432",
                        "publishType": "WithLinks",
                        "originalItemUrn": "urn:adsk.wipprod:dm.lineage:_vs-4xxxxG-kzll5lXNsA",
                        "modelType": "multiuser",
                        "latestEpisodeGuid": "248fb7a4-35eb-4c45-a37f-1d5d782f5cb9",
                        "modelGuid": "xxxx-6879-4fa9-a1e3-ca8359533600",
                        "processState": "PROCESSING_COMPLETE",
                        "extractionState": "SUCCESS",
                        "splittingState": "NOT_SPLIT",
                        "reviewState": "NOT_IN_REVIEW",
                        "revisionDisplayLabel": "3",
                        "sourceFileName": "SharedParameteSample.rvt",
                        "conformingStatus": "NONE"
                    }
                }
            },