Search code examples
autodesk-forgeautodeskautodesk-model-derivative

forge retrieve (translation/publish) item date


i am wondering if there is an API that retrieves the (translation/publish) date:

enter image description here


Solution

  • Get the last version of that item by calling GET Folder Contents, GET items/:itemId, or GET item/:itemId/versions, and find attributes.lastModifiedTime, then convert it from UTC time to your localtime. Here is an example for you:

    "included": [
        {
          "type": "versions",
          "id": "urn:adsk.wipprod:fs.file:vf.hC6k4hndRWaeIVhIjvHu8w?version=2",
          "attributes": {
            "name": "my_model.rvt",
            "displayName": "my_model",
            "createTime": "2018-01-17T11:52:34.0000000Z",
            "createUserId": "BW9RM76WZBGL",
            "createUserName": "John Doe",
            "lastModifiedTime": "2018-01-17T11:53:20.0000000Z", //!<<< Here
            "lastModifiedUserId": "BW9RM76WZBGL",
            "lastModifiedUserName": "John Doe",
            "versionNumber": 2,
            "mimeType": "application/vnd.autodesk.r360",
            "fileType": "rvt",
            "extension": {
              "type": "versions:autodesk.bim360:C4RModel",
              "version": "1.0.0",
              "schema": {
                "href": "https://developer.api.autodesk.com/schema/v1/versions/versions:autodesk.bim360:C4RModel-1.0.0"
              },
    
              //...
        },
    
        //...
    
    ],