# 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.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.wirebootstrap.com/wirebootstrap/connecting-to-data/discovery.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
