cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Your Friends List is a way to easily have access to the community members that you interact with the most! X

Creating Things in bulk

chmaloof
12-Amethyst

Creating Things in bulk

Is there any support or recommendation for instantiating Things in bulk / in batches?  We'd like to be able to create many instances of a ThingTemplate, each representing a separate real-world asset, without having to do it manually through Composer.


In the past we've created scripts to generate importable XML files, but this feels like a clunky custom approach to what I thought would be a common operation.  Are there any alternatives?

ACCEPTED SOLUTION

Accepted Solutions

Hi Chris,

You can easily implement something with Resources["EntityServices"].CreateThing(). I already did it through a csv (exported from Excel ) file with configuration parameters for each new thing.

Carles.

View solution in original post

3 REPLIES 3

Hi Chris,

You can easily implement something with Resources["EntityServices"].CreateThing(). I already did it through a csv (exported from Excel ) file with configuration parameters for each new thing.

Carles.

Carles is right - Creating a Service, either through a Java Extension or as JavaScript, that gets called for each new Thing is the recommended way to achieve this.  This is a common use case for when Things need to get created 'on the fly'. 

However, doing a bulk import from something like a csv file (like Carles mentioned) is the correct approach if you want to add large numbers at one time.

Thanks - this approach is working very well.

Announcements


Top Tags