> Portal Navigation: > > - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version. > - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages). > - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`). > - Top-level index of all portals: https://dev.wix.com/docs/llms.txt > - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt # QueryFunctionSpiConfigurations # Package: functions # Namespace: FunctionSpiConfigurations # Method link: https://dev.wix.com/docs/api-reference/business-management/functions/function-spi-configurations/query-function-spi-configurations.md ## Permission Scopes: Manage Functions: SCOPE.DC-FUNCTIONS.MANAGE-FUNCTIONS ## Introduction Queries service plugin configurations with filtering and sorting support. Query Functions SPI Configurations runs with these defaults, which you can override: - `createdDate` is sorted in `DESC` order - `paging.limit` is `50` - `paging.offset` is `0` For field support for filters and sorting, see [Supported Filters and Sorting](https://dev.wix.com/docs/api-reference/business-management/functions/function-spi-configurations/supported-filters-and-sorting.md). To learn how to query service plugin configurations, see [API Query Language](https://dev.wix.com/docs/api-reference/articles/get-started/api-query-language.md). --- ## REST API ### Schema ``` Method: queryFunctionSpiConfigurations Description: Queries service plugin configurations with filtering and sorting support. Query Functions SPI Configurations runs with these defaults, which you can override: - `createdDate` is sorted in `DESC` order - `paging.limit` is `50` - `paging.offset` is `0` For field support for filters and sorting, see [Supported Filters and Sorting](https://dev.wix.com/docs/api-reference/business-management/functions/function-spi-configurations/supported-filters-and-sorting.md). To learn how to query service plugin configurations, see [API Query Language](https://dev.wix.com/docs/api-reference/articles/get-started/api-query-language.md). URL: https://www.wixapis.com/functions/v1/function-spi-configurations/query Method: POST Method parameters: param name: query | type: CursorQuery - name: cursorPaging | type: CursorPaging | description: Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. - name: limit | type: integer | description: Maximum number of items to return in the results. - name: cursor | type: string | description: Pointer to the next or previous page in the list of results. Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response. Not relevant for the first request. - name: filter | type: object | description: Filter object in the following format: `"filter" : { "fieldName1": "value1", "fieldName2":{"$operator":"value2"} }` Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains` - name: sort | type: array | description: Sort object in the following format: `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]` - name: fieldName | type: string | description: Name of the field to sort by. - name: order | type: SortOrder | description: Sort order. - enum: ASC, DESC Return type: QueryFunctionSpiConfigurationsResponse - name: functionSpiConfigurations | type: array | description: List of service plugin configurations matching the query. - name: id | type: string | description: Service plugin configuration GUID. - name: revision | type: string | description: Service plugin configuration revision. - name: createdDate | type: string | description: Date and time the service plugin configuration was created. - name: updatedDate | type: string | description: Date and time the service plugin configuration was last updated. - name: functionId | type: string | description: GUID of the function this service plugin configuration belongs to. - name: configuration | type: object | description: Service plugin configuration data. This must adhere to the schema defined by the function type that the function is based on. Learn more about [service plugins and Wix Functions](https://dev.wix.com/docs/api-reference/business-management/functions/about-service-plugins-and-wix-functions.md). - name: pagingMetadata | type: CursorPagingMetadata | description: Metadata for the paginated results. - name: count | type: integer | description: Number of items returned in the response. - name: cursors | type: Cursors | description: Cursor strings that point to the next page, previous page, or both. - name: next | type: string | description: Cursor string pointing to the next page in the list of results. - name: prev | type: string | description: Cursor pointing to the previous page in the list of results. - name: hasNext | type: boolean | description: Whether there are more pages to retrieve following the current page. + `true`: Another page of results can be retrieved. + `false`: This is the last page. ``` ### Examples ### Query Function Spi Configurations ```curl curl --request POST \ https://www.wixapis.com/functions/v1/spi-configurations/query \ --header "Authorization: " \ --header "Content-Type: application/json" \ --data '{ "query": { "sort": [], "filter": { "functionId": { "$in": [ "fb7d2934-4906-45b6-85cd-5d55d3cc9da0", "cf0dd172-ce83-4c55-bbd3-944922ac74ad" ] } } } }' ``` --- ## JavaScript SDK ### Schema ``` Method: wixClientAdmin.functions.FunctionSpiConfigurations.queryFunctionSpiConfigurations(query) Description: Queries service plugin configurations with filtering and sorting support. Query Functions SPI Configurations runs with these defaults, which you can override: - `createdDate` is sorted in `DESC` order - `paging.limit` is `50` - `paging.offset` is `0` For field support for filters and sorting, see [Supported Filters and Sorting](https://dev.wix.com/docs/api-reference/business-management/functions/function-spi-configurations/supported-filters-and-sorting.md). To learn how to query service plugin configurations, see [API Query Language](https://dev.wix.com/docs/api-reference/articles/get-started/api-query-language.md). # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present. Required parameters: query Method parameters: param name: query | type: SpiConfigurationQuery | required: true - name: cursorPaging | type: CursorPaging | description: Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. - name: limit | type: integer | description: Maximum number of items to return in the results. - name: cursor | type: string | description: Pointer to the next or previous page in the list of results. Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response. Not relevant for the first request. - name: filter | type: object | description: Filter object in the following format: `"filter" : { "fieldName1": "value1", "fieldName2":{"$operator":"value2"} }` Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains` - name: sort | type: array | description: Sort object in the following format: `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]` - name: fieldName | type: string | description: Name of the field to sort by. - name: order | type: SortOrder | description: Sort order. - enum: ASC, DESC Return type: PROMISE - name: functionSpiConfigurations | type: array | description: List of service plugin configurations matching the query. - name: _id | type: string | description: Service plugin configuration GUID. - name: revision | type: string | description: Service plugin configuration revision. - name: _createdDate | type: Date | description: Date and time the service plugin configuration was created. - name: _updatedDate | type: Date | description: Date and time the service plugin configuration was last updated. - name: functionId | type: string | description: GUID of the function this service plugin configuration belongs to. - name: configuration | type: object | description: Service plugin configuration data. This must adhere to the schema defined by the function type that the function is based on. Learn more about [service plugins and Wix Functions](https://dev.wix.com/docs/api-reference/business-management/functions/about-service-plugins-and-wix-functions.md). - name: pagingMetadata | type: CursorPagingMetadata | description: Metadata for the paginated results. - name: count | type: integer | description: Number of items returned in the response. - name: cursors | type: Cursors | description: Cursor strings that point to the next page, previous page, or both. - name: next | type: string | description: Cursor string pointing to the next page in the list of results. - name: prev | type: string | description: Cursor pointing to the previous page in the list of results. - name: hasNext | type: boolean | description: Whether there are more pages to retrieve following the current page. + `true`: Another page of results can be retrieved. + `false`: This is the last page. ``` ### Examples ### queryFunctionSpiConfigurations ```javascript import { functionSpiConfigurations } from '@wix/functions'; async function queryFunctionSpiConfigurations(query) { const response = await functionSpiConfigurations.queryFunctionSpiConfigurations(query); }; ``` ### queryFunctionSpiConfigurations (with elevated permissions) ```javascript import { functionSpiConfigurations } from '@wix/functions'; import { auth } from '@wix/essentials'; async function myQueryFunctionSpiConfigurationsMethod(query) { const elevatedQueryFunctionSpiConfigurations = auth.elevate(functionSpiConfigurations.queryFunctionSpiConfigurations); const response = await elevatedQueryFunctionSpiConfigurations(query); } ``` ### queryFunctionSpiConfigurations (self-hosted) Self-hosted SDK calls require you to [create a client](https://dev.wix.com/docs/sdk/articles/work-with-the-sdk/about-the-wix-client.md). ```javascript import { createClient } from '@wix/sdk'; import { functionSpiConfigurations } from '@wix/functions'; // Import the auth strategy for the relevant access type // Import the relevant host module if needed const myWixClient = createClient ({ modules: { functionSpiConfigurations }, // Include the auth strategy and host as relevant }); async function queryFunctionSpiConfigurations(query) { const response = await myWixClient.functionSpiConfigurations.queryFunctionSpiConfigurations(query); }; ``` ---