> For the complete documentation index, see [llms.txt](https://docs.wirebootstrap.com/wirebootstrap/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.wirebootstrap.com/wirebootstrap/connecting-to-data/discovery.md).

# Discovery

Service providers can tell consumers what type of functionality they can support through the `allow` method on a data source.

The `allow().discover` property lets consumers know that the service provider will allow meta data to be retrieved from the data service. &#x20;

In the example below, an application checks whether the service provider will allow discovery and then asks the data service for a list of fields on the `sales` table.

```javascript
const accountService = new wire.data.DataSource("table", {
    Provider: {
        Server: "query-server"
    }
});

if(accountService.allow().discover) {
    const options = { table: "sales" };
    const entities = await accountService.discoverFieldsAsync(options);
 }


```

For a full list of discovery methods, visit the [wire.data.DataSource](/wirebootstrap/reference/wire.data/wire.data.datasource.md) reference .  For a full list of `allow` attributes supported by a service provider, visit the service provider documentation.
