#Model status after model PUT reupload

7 messages · Page 1 of 1 (latest)

mild hull
#

When uploading a new model with the POST method it's possible to then poll the model GET endpoint to find out it's processing status.

When upload a new version of a model with the PUT method the same behaviour doesn't seem to exist. Does any one know if there is a way to see the status of the versions of a model as I'm guessing this is where I would find it?

I'm sure I saw something in the Swagger Docs a few days ago but after 20 minutes of seraching today I can't find anything related to this.

Any help would be great. Thanks

mild hull
#

Looking in chrome dev tools it looks like there is an api endoint that the website uses at /i/models/{{model_id}}/management that returns a josn object with a property called hasProcessingVersion - but looking in th swagger docs I can't find an end point that returns it

frank stag
#

After PUTting a new version of a model, what does a GET return? There should be a status object in the response. But if it doesn't contain the information, I wouldn't know where to look elsewhere.

mild hull
#

Hi, so after the initial post the status object is:

{ warning: {}, processing: 'PROCESSING' }

Once the model processes it goes to:

status: {
   code: 0,
   warning: {},
   error: { generic: [ 'localStorage is not defined' ] },
   monitors: [ 'geometry.deprecated_binding' ],
   processing: 'SUCCEEDED'
}
updatedAt: '2024-04-25T13:58:22.372655',

Then after the PUT but while its clearly processing the new model it's

status: {
    code: 0,
    warning: {},
    error: { generic: [Array] },
    monitors: [ 'geometry.deprecated_binding' ],
    processing: 'SUCCEEDED'
  },
  updatedAt: '2024-04-25T14:00:52.703441',

so it knows a new version is up becuase of the updatedAt

#

Interestingly if I go to the Edit Properties page on the model I can see a polling call to https://sketchfab.com/i/models/{{model_id}}/versions that responds with

"results": [
        {
            "uid": "9c405491772741cd9604134643a3e84b",
            "status": {
                "warning": {},
                "processing": "PROCESSING"
            },
            "isCurrentVersion": false,
            "isCandidateVersion": false,
            "createdAt": "2024-04-25T14:00:52.366636",
            "processedAt": null,
            "reason": "reupload"
        },
        {
            "uid": "c1bfda85719642d687c86913671fd49f",
            "status": {
                "code": 0,
                "warning": {},
                "error": {
                    "generic": [
                        "localStorage is not defined"
                    ]
                },
                "monitors": [
                    "geometry.deprecated_binding"
                ],
                "processing": "SUCCEEDED"
            },
            "isCurrentVersion": true,
            "isCandidateVersion": false,
            "createdAt": "2024-04-25T13:58:00.100529",
            "processedAt": "2024-04-25T13:58:21.661491",
            "reason": "upload"
        }

So I'm wondering if this is just missing functionality from the dev API?

frank stag
#

That's great research! There are definitely API functions that are not made available to the public for whatever reasons. I recommend reaching out to support about this: https://help.sketchfab.com

mild hull
#

Thanks, I've sent them a message, will update if they come back with anything, hopefully there's a way