question

MatthijsvdVeer avatar image
1 Vote"
MatthijsvdVeer asked MatthijsvdVeer commented

None of the models in this request could be created due to a problem with one or more models

I'm working with the RealEstateCore models, and I'm trying to upload them in the least number of API calls. I keep track of what dependencies are needed and only upload models that depend on nothing that hasn't been uploaded yet. At some point, I try to upload a batch of 79 models, and I'm confronted with the following error:

 None of the models in this request could be created due to a problem with one or more models: DtmiResolver failed to resolve requisite references to element(s): dtmi:digitaltwins:rec_3_3:device:AccelerationSensor;1 dtmi:digitaltwins:rec_3_3:device:AirQualitySensor;1 dtmi:digitaltwins:rec_3_3:device:CurrentSensor;1 dtmi:digitaltwins:rec_3_3:device:DistanceSensor;1 dtmi:digitaltwins:rec_3_3:device:EnergySensor;1 dtmi:digitaltwins:rec_3_3:device:EnthalpySensor;1 
 <REDACTED 23 OTHER MODELS>
 See model documentation(http://aka.ms/ADTv2Models) for supported format.
 Status: 400 (Bad Request)
 ErrorCode: DTDLParserError

I assume, from the description, that it's missing some dependencies. But when I use the API to check on the list of models, they all exist. Does this error mean something else instead?

More information:

  • The 79 models are good for a body size of 30745 bytes, which should fit within the limit of 32KB as per the service limits. I'm a bit confused because the service limits also mention the maximum size of a JSON body for a single model is 1MB.

  • I'm staying well within the limit of 100 requests per second, as this is the 10th call I make.

  • Uploading fewer models in 1 call works when I set the maximum body size to 25000 bytes.








azure-digital-twins
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

SatishBoddu-MSFT avatar image
0 Votes"
SatishBoddu-MSFT answered MatthijsvdVeer commented

Hello @MatthijsvdVeer Have you given a try for uploading the models with :Tools for Open Digital Twins Definition Language (DTDL) based Ontologies ?


· 4
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

YHi @SatishBoddu-MSFT , I have. That project inspired me to write one that uploads the models in batches instead. The ModelUploader in your link uploads 747 models by doing 1105 API calls. My issue isn't exactly mission-critical as there are alternatives, but I have trouble debugging the error that the API returns.

0 Votes 0 ·

I've also noticed that when all the models are already present (uploaded them 1 by 1) and I then try to upload the same 79 models in a batch again, I get the same error. I would expect a 409 error (models exist), but getting 400 instead.

1 Vote 1 ·

Got it, let me check with the team.

0 Votes 0 ·
Show more comments