---
lang: en
title: 'API docs: repository-json-schema.getscopefilterjsonschemafor'
keywords: LoopBack 4.0, LoopBack 4, Node.js, TypeScript, OpenAPI
sidebar: lb4_sidebar
editurl: https://github.com/loopbackio/loopback-next/tree/master/packages/repository-json-schema
permalink: /doc/en/lb4/apidocs.repository-json-schema.getscopefilterjsonschemafor.html
---

<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@loopback/repository-json-schema](./repository-json-schema.md) &gt; [getScopeFilterJsonSchemaFor](./repository-json-schema.getscopefilterjsonschemafor.md)

## getScopeFilterJsonSchemaFor() function

Build a JSON schema describing the format of the "scope" object used to query model instances.

Note we don't take the model properties into account yet and return a generic json schema allowing any "where" condition.

**Signature:**

```typescript
export declare function getScopeFilterJsonSchemaFor(modelCtor: typeof Model, options?: FilterSchemaOptions): JsonSchema;
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  modelCtor | typeof [Model](./repository.model.md) | The model constructor to build the filter schema for. |
|  options | [FilterSchemaOptions](./repository-json-schema.filterschemaoptions.md) | _(Optional)_ |

**Returns:**

JsonSchema


