Autodesk-Forge / forge-api-dotnet-client

Forge .Net SDK: Provides .Net SDK to help you easily integrate Forge REST APIs into the application
https://www.nuget.org/packages/Autodesk.Forge/
Apache License 2.0
93 stars 70 forks source link

EMEA region is not taken into account while translating jobs #84

Open lyague opened 3 years ago

lyague commented 3 years ago

Hi, emea region boolean is not taken into account while translating jobs. In fact, translate method does always call Forge API using "/modelderivative/v2/designdata/job" even if RegionIsEMEA is set.

See DerivativesApi.cs:

        public /*Job*/dynamic Translate(JobPayload job, bool? xAdsForce = null)
        {
            ApiResponse</*Job*/dynamic> localVarResponse = TranslateWithHttpInfo(job, xAdsForce);
            return localVarResponse.Data;
        }

See https://forge.autodesk.com/en/docs/model-derivative/v2/reference/http/job-POST

Thx you.

cyrillef commented 3 years ago

Hi @lyague,

The EMEA proxy did not have a /job endpoint until recently. and for now it is consider a bad practice to use the EMEA /job endpoint because it would mean that only the EMEA proxy can access your derivatives, while when using the US /job endpoint, both EMEA and US proxy would work.

Since you should not call /job for SVF or SVF2 for any BIM360 file, we fetl it was better to enforce the US endpoint.

We will update the SDK accordingly soon

SteffenEseebase commented 1 year ago

Hi @cyrillef

Do you have any documentation for that "bad practice"? I believe the reason for uploading to EMEA is to hold the derivatives in EMEA. Also, from my testing, it isn't possible to retrieve the US derivatives using the EMEA proxy. I don't know anything about the BIM360 files, but I think that @lyague is right - if RegionIsEMEA is true, translate should use /modelderivative/v2/regions/eu/designdata/job.

Regards Steffen

cyrillef commented 1 year ago

@SteffenEseebase - maybe I should not have said bad practice, but instead said 'recommend way'. When using the US proxy, you can access both US and EMEA storage. When using the EMEA proxy, you can only access the EMEA storage. Using one or the other does not affect where files and derivatives are stored since you upload a file in a bucket that specifies the region. You can indicate the region for derivatives when you launch a translation job. This last comment is only true when using APS/OSS. When using BIM360/ACC/Autodesk Docs, you do not have control over the region since it is coming from your Hub (i.e., the region of your BIM360/ACC/Autodesk Docs subscription), and you should never ever start an SVF/SVF2 translation job in this environment.

cyrillef commented 1 year ago

Let me revisit the region comment from @lyague and run some tests.