Skip to main content
1-Visitor
November 8, 2017
Solved

How do I get a list of repositories

  • November 8, 2017
  • 4 replies
  • 2778 views

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.

Best answer by gseq

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

15-Moonstone
November 9, 2017

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

gseq1-VisitorAuthorAnswer
1-Visitor
November 10, 2017

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.

15-Moonstone
November 11, 2017

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