iDigi HttpWebRequest string

Hi,
I currently use the following string to access demo data using the HttpWebRequest :

Dim targetURI As New Uri(“http://sd1-na.idigi.com/ws/data/~/00000000-00000000-00409DFF-FF3C1E07/green_demo/” & xmlfilename)

As real devices are added to the iDigi how do I find out
what this string consists of apart from the device ID?
Will it just be device ID and file name?

Thanks,
Mark

Yes, for the green demo the only thing that will vary in the URL will be the device ID and the filename.

/~ - starts you at the home collection for your user

/00000000-00000000-00409DFF-FF3C1E07 - device ID

/green_demo - this is determined in the yml file…it is the collection setting specified under the cwm_exist presentation

/filename - specified with the filename setting under cwm_exist…with a number appended to differentiate subsequent samples

Chris

Thanks for the info Chris,
One other question ; Is there a suggested use for the collection name? Can we use as many collection names as we want? We foresee having many devices at many locations and we may want to use the collections to organize the files by location.

Thanks,
Mark

http://sd1-na.idigi.com/ws/data/~/
Will show you a list of your devices.

Hello,

The use of the collection names is up to you.

They may not fit the use case you mentioned though. The device collections (~/{device_id}) are at the root level of your home collection, and any collections specified in the Dia will be children of those.

So if you used the collection names to organize by locations, you’d end up with something like:

/~/{device_id}/midwest
/~/{device_id}/midwest
/~/{device_id}/east

which may or may not help based on how you’re trying to keep them organized.

The option to specify a collection is useful if you might have a device performing multiple operations, and then you’d be able to keep track of what is pushed up in its own location.

Chris

So are the collections optional?
Is there a limit to the number that can be used?

Thanks,
Mark

I believe if you remove the collection setting from the cwm_exist presentation, or set it to an empty string, your data will instead be uploaded directly to the device collection, and no subcollection will be used. At a minimum though, your data will be pushed up to the collection representing the device.

There is currently not a specific limit for the number of collections. I would be interested to hear if you have plans to use a large number, or were just more curious if there was a limit defined.

Thanks,
Chris

Hi Chris,
I was just curious at this point.

Mark