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

How do I get a list of repositories

SOLVED
Guest

How do I get a list of repositories

Hello,

Is there a way to get a list of file repositories? I need to make a front end browser for browsing through different repositories.

Thanks.

1 ACCEPTED SOLUTION

Accepted Solutions

Re: How do I get a list of repositories

Adam,

A follow up question, I'm using the GetFileListing to get a listing of all files in a particular repo. I put this on a grid to view it. This works fine if I hard code (or add) the repo in the data section of the mashup.

However, I need the repository to be selected. I use the entity picker for this, but how do I get access to the GetFileListing  service. The FileRepository thing template does not have the GetFileListing  service listed.

4 REPLIES 4
Highlighted

Re: How do I get a list of repositories

Hi Gerard,

First part of question:

You can get list of File Repositories thanks to the ootb services:

var result = ThingTemplates["FileRepository"].GetImplementingThingsWithData();

or

var result = ThingTemplates["FileRepository"].GetImplementingThings();

It will give an InfoTable with a list of Things, which are implementing this ThingTemplate.

Second part of question:
I assume that you want to pick specific repository and get some data from it?

If you are working with mashups you can use EntityPicker widget with define ThingTemplate property. Than you can add your own business logic to get data from it and present it somehow.

Regards,

Adam

Re: How do I get a list of repositories

Adam,

A follow up question, I'm using the GetFileListing to get a listing of all files in a particular repo. I put this on a grid to view it. This works fine if I hard code (or add) the repo in the data section of the mashup.

However, I need the repository to be selected. I use the entity picker for this, but how do I get access to the GetFileListing  service. The FileRepository thing template does not have the GetFileListing  service listed.

Re: How do I get a list of repositories

Hi Gerard,

Your thinking is correct. All you need to know is that you can use dynamic source of your service.

All you need to do is check dynamic checkbox there:

1.PNG

Then you will be able to define on which specific Thing this service should be invoked:

2.PNG

I am sure that this is exactly what you were looking for.

Regards,

Adam

Re: How do I get a list of repositories

Exactly what I needed. Thank you!