> 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 # SearchAppInstallation # Package: appInstallations # Namespace: AppInstallations # Method link: https://dev.wix.com/docs/api-reference/app-management/app-installations/search-app-installation.md ## Permission Scopes: Read App Installations: SCOPE.APP_MARKET.READ_APP_INSTALLATIONS ## Introduction Retrieves a list of up to 100 app installations that match a free-text search expression. Search matches against the site URL, business name, business email, site owner email, instance ID, review title, and review description. Search App Installation runs with these defaults, which you can override: - `paging.limit` is `50` The results include installations across all the apps in your developer account. To search a single field only, use [Query App Installations](https://dev.wix.com/docs/api-reference/app-management/app-installations/query-app-installations.md) with the appropriate filter. --- ## REST API ### Schema ``` Method: searchAppInstallation Description: Retrieves a list of up to 100 app installations that match a free-text search expression. Search matches against the site URL, business name, business email, site owner email, instance GUID, review title, and review description. Search App Installation runs with these defaults, which you can override: - `paging.limit` is `50` The results include installations across all the apps in your developer account. To search a single field only, use [Query App Installations](https://dev.wix.com/docs/api-reference/app-management/app-installations/query-app-installations.md) with the appropriate filter. URL: https://www.wixapis.com/app/installations/v1/app-installation/search Method: POST Method parameters: param name: fields | type: array | description: Additional fields to include in the response. | validation: maxItems 1 - enum: - OWNER_EMAIL: Include `siteInfo.ownerEmail` in each returned app installation. Note: Only returns if your app has the **Get Site Owner** permission. param name: search | type: CursorSearch - name: cursorPaging | type: CursorPaging | description: Cursor pointing to page of results. When requesting 'cursor_paging.cursor', no `filter`, `sort` or `search` can be provided. - name: limit | type: integer | description: Maximum number of items to return in the results. | validation: minimum 0, maximum 100, format int32 - 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. | validation: maxLength 16000 - name: filter | type: object | description: A filter object. See documentation [here](https://bo.wix.com/wix-docs/rnd/platformization-guidelines/api-query-language#platformization-guidelines_api-query-language_defining-in-protobuf) - name: sort | type: array | description: Sort object in the form [{"fieldName":"sortField1"},{"fieldName":"sortField2","direction":"DESC"}] | validation: maxItems 10 - name: fieldName | type: string | description: Name of the field to sort by. | validation: maxLength 512 - name: order | type: SortOrder | description: Sort order. - enum: ASC, DESC - name: aggregations | type: array | description: Aggregations | Faceted search: refers to a way to explore large amounts of data by displaying summaries about various partitions of the data and later allowing to narrow the navigation to a specific partition. | validation: maxItems 10 - ONE-OF: - name: value | type: ValueAggregation | description: Value aggregation - ONE-OF: - name: includeOptions | type: IncludeMissingValuesOptions | description: Options for including missing values - name: addToBucket | type: string | description: Can specify custom bucket name. Defaults are [string -> "N/A"], [int -> "0"], [bool -> "false"] ... | validation: maxLength 20 - name: sortType | type: SortType | description: Should sort by number of matches or value of the field - enum: - COUNT: Should sort by number of matches - VALUE: Should sort by value of the field alphabetically - name: sortDirection | type: SortDirection | description: Should sort in ascending or descending order - enum: - DESC: Should sort in descending order - ASC: Should sort in ascending order - name: limit | type: integer | description: How many aggregations would you like to return? Can be between 1 and 250. 10 is the default. | validation: format int32 - name: missingValues | type: MissingValues | description: Should missing values be included or excluded from the aggregation results. Default is EXCLUDE - enum: - EXCLUDE: Should missing values be excluded from the aggregation results - INCLUDE: Should missing values be included in the aggregation results - name: range | type: RangeAggregation | description: Range aggregation - name: buckets | type: array | description: List of range buckets, where during aggregation each entity will be placed in the first bucket where its value falls into based on provided range bounds | validation: maxItems 50 - name: from | type: number | description: Inclusive lower bound of the range. Required if to is not given | validation: format double - name: to | type: number | description: Exclusive upper bound of the range. Required if from is not given | validation: format double - name: scalar | type: ScalarAggregation | description: Scalar aggregation - name: type | type: ScalarType | description: Define the operator for the scalar aggregation - enum: - COUNT_DISTINCT: Count of distinct values - MIN: Minimum value - MAX: Maximum value - name: dateHistogram | type: DateHistogramAggregation | description: Date histogram aggregation - name: interval | type: Interval | description: Interval for date histogram aggregation - enum: - YEAR: Yearly interval - MONTH: Monthly interval - WEEK: Weekly interval - DAY: Daily interval - HOUR: Hourly interval - MINUTE: Minute interval - SECOND: Second interval - name: nested | type: NestedAggregation | description: Nested aggregation - name: nestedAggregations | type: array | description: Flattened list of aggregations, where each next aggregation is nested within previous one | validation: minItems 2, maxItems 3 - ONE-OF: - name: value | type: ValueAggregation | description: Value aggregation - name: range | type: RangeAggregation | description: Range aggregation - name: scalar | type: ScalarAggregation | description: Scalar aggregation - name: dateHistogram | type: DateHistogramAggregation | description: Date histogram aggregation - name: name | type: string | description: User-defined name of aggregation, should be unique, will appear in aggregation results | validation: maxLength 100 - name: type | type: NestedAggregationType | description: Type of aggregation, client must provide matching aggregation field below - enum: - VALUE: An aggregation where result buckets are dynamically built - one per unique value - RANGE: An aggregation, where user can define set of ranges - each representing a bucket - SCALAR: A single-value metric aggregation - e.g. min, max, sum, avg - DATE_HISTOGRAM: An aggregation, where result buckets are dynamically built - one per time interval (hour, day, week, etc.) - name: fieldPath | type: string | description: Field to aggregate by, use dont notation to specify json path | validation: maxLength 200 - name: name | type: string | description: User-defined name of aggregation, should be unique, will appear in aggregation results | validation: maxLength 100 - name: type | type: AggregationType | description: Type of aggregation, client must provide matching aggregation field below - enum: - VALUE: An aggregation where result buckets are dynamically built - one per unique value - RANGE: An aggregation, where user can define set of ranges - each representing a bucket - SCALAR: A single-value metric aggregation - e.g. min, max, sum, avg - DATE_HISTOGRAM: An aggregation, where result buckets are dynamically built - one per time interval (hour, day, week, etc.) - NESTED: Multi-level aggregation, where each next aggregation is nested within previous one - name: fieldPath | type: string | description: Field to aggregate by, use dot notation to specify json path | validation: maxLength 200 - name: search | type: SearchDetails | description: Free text to match in searchable fields - name: mode | type: Mode | description: Defines how separate search terms in `expression` are combined - enum: - OR: Any of the search terms must be present - AND: All search terms must be present - name: expression | type: string | description: Search term or expression | validation: maxLength 100 - name: fields | type: array | description: Fields to search in. If empty - will search in all searchable fields. Use dot notation to specify json path | validation: maxItems 20, maxLength 200 - name: fuzzy | type: boolean | description: Flag if should use auto fuzzy search (allowing typos by a managed proximity algorithm) - name: timeZone | type: string | description: UTC offset or IANA time zone. Valid values are ISO 8601 UTC offsets, such as +02:00 or -06:00, and IANA time zone GUIDs, such as Europe/Rome Affects all filters and aggregations returned values. You may override this behavior in a specific filter by providing timestamps including time zone. e.g. `"2023-12-20T10:52:34.795Z"` | validation: maxLength 50 Searchable fields: - field: siteInfo.businessCategory.secondary | operators: $hasAll, $hasSome | sort: ASC, DESC | aggregatable: true | searchable: false - field: createdDate | operators: $eq, $ne, $exists, $in, $any, $lt, $lte, $gt, $gte | sort: ASC, DESC | aggregatable: true | searchable: false - field: id | operators: $eq, $ne, $exists, $in, $any, $begins, $gt, $lt, $lte, $gte | sort: ASC, DESC | aggregatable: true | searchable: false - field: updatedDate | operators: $eq, $ne, $exists, $in, $any, $lt, $lte, $gt, $gte | sort: ASC, DESC | aggregatable: true | searchable: false - field: appId | operators: $eq, $ne, $exists, $in, $any, $begins, $gt, $lt, $lte, $gte | sort: ASC, DESC | aggregatable: true | searchable: false - field: appVersion | operators: $eq, $ne, $exists, $in, $any, $begins, $gt, $lt, $lte, $gte | sort: ASC, DESC | aggregatable: true | searchable: false - field: firstInstallationDate | operators: $eq, $ne, $exists, $in, $any, $lt, $lte, $gt, $gte | sort: ASC, DESC | aggregatable: true | searchable: false - field: instanceId | operators: $eq, $ne, $exists, $in, $any, $begins, $gt, $lt, $lte, $gte | sort: ASC, DESC | aggregatable: true | searchable: true - field: planInfo.billingCycle.cycleDuration.count | operators: $eq, $ne, $exists, $in, $any, $lt, $lte, $gt, $gte | sort: ASC, DESC | aggregatable: true | searchable: false - field: planInfo.billingCycle.cycleDuration.unit | operators: $eq, $ne, $exists, $in, $any | sort: ASC, DESC | aggregatable: true | searchable: false - field: planInfo.billingCycle.cycleType | operators: $eq, $ne, $exists, $in, $any | sort: ASC, DESC | aggregatable: true | searchable: false - field: planInfo.endDate | operators: $eq, $ne, $exists, $in, $any, $lt, $lte, $gt, $gte | sort: ASC, DESC | aggregatable: true | searchable: false - field: planInfo.freeTrialInfo.endDate | operators: $eq, $ne, $exists, $in, $any, $lt, $lte, $gt, $gte | sort: ASC, DESC | aggregatable: true | searchable: false - field: planInfo.freeTrialInfo.status | operators: $eq, $ne, $exists, $in, $any | sort: ASC, DESC | aggregatable: true | searchable: false - field: planInfo.planName | operators: $eq, $ne, $exists, $in, $any, $begins, $gt, $lt, $lte, $gte | sort: ASC, DESC | aggregatable: true | searchable: false - field: planInfo.planStatus | operators: $eq, $ne, $exists, $in, $any | sort: ASC, DESC | aggregatable: true | searchable: false - field: review.id | operators: $eq, $ne, $exists, $in, $any, $begins, $gt, $lt, $lte, $gte | sort: ASC, DESC | aggregatable: true | searchable: false - field: review.date | operators: $eq, $ne, $exists, $in, $any, $lt, $lte, $gt, $gte | sort: ASC, DESC | aggregatable: true | searchable: false - field: review.rating | operators: $eq, $ne, $exists, $in, $any, $lt, $lte, $gt, $gte | sort: ASC, DESC | aggregatable: true | searchable: false - field: siteInfo.accountId | operators: $eq, $ne, $exists, $in, $any, $begins, $gt, $lt, $lte, $gte | sort: ASC, DESC | aggregatable: true | searchable: false - field: siteInfo.businessCategory.primary | operators: $eq, $ne, $exists, $in, $any, $begins, $gt, $lt, $lte, $gte | sort: ASC, DESC | aggregatable: true | searchable: false - field: siteInfo.businessEmail | operators: $eq, $ne, $exists, $in, $any, $begins, $gt, $lt, $lte, $gte | sort: ASC, DESC | aggregatable: false | searchable: true - field: siteInfo.businessName | operators: $eq, $ne, $exists, $in, $any, $begins, $gt, $lt, $lte, $gte | sort: ASC, DESC | aggregatable: true | searchable: true - field: siteInfo.countryCode | operators: $eq, $ne, $exists, $in, $any, $begins, $gt, $lt, $lte, $gte | sort: ASC, DESC | aggregatable: true | searchable: false - field: siteInfo.editorType | operators: $eq, $ne, $exists, $in, $any | sort: ASC, DESC | aggregatable: true | searchable: false - field: siteInfo.ownerEmail | operators: $eq, $ne, $exists, $in, $any, $begins, $gt, $lt, $lte, $gte | sort: ASC, DESC | aggregatable: false | searchable: true - field: siteInfo.premium | operators: $eq, $ne, $exists, $in, $any | sort: ASC, DESC | aggregatable: true | searchable: false - field: siteInfo.siteId | operators: $eq, $ne, $exists, $in, $any, $begins, $gt, $lt, $lte, $gte | sort: ASC, DESC | aggregatable: true | searchable: false - field: siteInfo.siteUrl | operators: $eq, $ne, $exists, $in, $any, $begins, $gt, $lt, $lte, $gte | sort: ASC, DESC | aggregatable: true | searchable: true - field: status | operators: $eq, $ne, $exists, $in, $any | sort: ASC, DESC | aggregatable: true | searchable: false Return type: SearchAppInstallationResponse - name: appInstallations | type: array | description: Retrieved app installations. - name: id | type: string | description: App installation GUID. | validation: format GUID - name: instanceId | type: string | description: Unique identifier of the app instance on the site. Stable across uninstalls and reinstalls of the same app on the same site. | validation: format GUID - name: createdDate | type: string | description: Date and time the app installation was created. | validation: format date-time - name: updatedDate | type: string | description: Date and time the app installation was last updated. | validation: format date-time - name: revision | type: string | description: Revision number, which increments by 1 each time the app installation is updated. | validation: format int64 - name: firstInstallationDate | type: string | description: Date and time the app was first installed on the site. Preserved across uninstalls and reinstalls. | validation: format date-time - name: siteInfo | type: SiteInfo | description: Information about the site the app is installed on. - name: siteId | type: string | description: Site GUID. | validation: format GUID - name: businessName | type: string | description: Business name displayed on the site. | validation: maxLength 100 - name: siteUrl | type: string | description: Public URL of the site. | validation: format WEB_URL - name: businessEmail | type: string | description: Business email address configured on the site. | validation: format EMAIL - name: countryCode | type: string | description: 2-letter country code in [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format. | validation: format COUNTRY - name: businessCategory | type: Categories | description: Business category the site belongs to. - name: primary | type: string | description: Primary site category. | validation: maxLength 100 - name: secondary | type: array | description: Secondary site category. | validation: maxItems 50, maxLength 100 - name: premium | type: boolean | description: Whether the site has an active Premium subscription. - name: editorType | type: EditorType | description: Editor the site was created with. - enum: - EDITOR: Wix Editor. - ADI: Wix ADI. - EDITORX: Editor X. - STUDIO: Wix Studio. - HARMONY: Wix Harmony. - VIBE: Wix Vibe. - WIXEL: Wixel. - name: ownerEmail | type: string | description: Email address of the site owner. Returned only when `OWNER_EMAIL` is requested in the `fields` parameter and the app has the **Get Site Owner** permission. | validation: format EMAIL - name: accountId | type: string | description: GUID of the site owner's account. | validation: format GUID - name: planInfo | type: PlanInfo | description: Information about the plan the site owner purchased for the app. - name: planName | type: string | description: Name of the plan the site owner purchased for the app. | validation: maxLength 100 - name: billingCycle | type: Cycle | description: Billing cycle of the purchased plan. - name: cycleType | type: CycleType | description: Type of the billing cycle. + `"UNKNOWN_UNIT"`: There is no information about the billing cycle. + `"ONE_TIME"`: The customer pays for unlimited usage of the app with a single payment. + `"RECURRING"`: The customer pays for a subscription to the app on a recurring schedule. - enum: ONE_TIME, RECURRING - name: cycleDuration | type: Duration | description: Duration of the billing cycle. Available only for `{"cycleType": "RECURRING"}`. - name: unit | type: DurationUnit | description: Unit of the billing cycle. - enum: - MONTH: Month. - YEAR: Year. - name: count | type: integer | description: Count of units that make up the billing cycle. | validation: minimum 0 - name: planStatus | type: PlanStatus | description: Current status of the purchased plan. - enum: - UPGRADED: The site owner upgraded the app to a paid plan. - CANCELED: The site owner upgraded the app to a paid plan and has since canceled it. - AUTO_RENEW_OFF: The plan is still active, but auto-renewal is turned off. - name: freeTrialInfo | type: FreeTrialInfo | description: Free trial details for the purchased plan, if a free trial is or was active. - name: status | type: FreeTrialStatus | description: Current free trial status. - enum: - IN_PROGRESS: The free trial is currently in progress. - ENDED: The free trial has ended. - name: endDate | type: string | description: Date and time the free trial ended. Returned only after the free trial has ended. | validation: format date-time - name: endDate | type: string | description: Date and time the plan expires. Returned only when auto-renewal is turned off. | validation: format date-time - name: appId | type: string | description: GUID of the installed app. | validation: format GUID - name: appVersion | type: string | description: Major version of the installed app. | validation: maxLength 6 - name: status | type: Status | description: Current installation status of the app on the site. - enum: - INSTALLED: The app is currently installed on the site. - UNINSTALLED: The app was installed on the site and has since been removed. - name: review | type: ReviewInfo | description: Information about the review the site owner left for the app, if any. - name: id | type: string | description: Review GUID. | validation: format GUID - name: date | type: string | description: Date and time the review was published. | validation: format date-time - name: rating | type: integer | description: Rating the site owner left for the app, from 1 to 5. | validation: format int32 - name: title | type: string | description: Review title. | validation: maxLength 100 - name: description | type: string | description: Review body text. | validation: maxLength 2500 - name: pagingMetadata | type: CursorPagingMetadata | description: Paging metadata, including the cursor used to retrieve the next page of results. - name: count | type: integer | description: Number of items returned in current page. | validation: format int32 - 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. | validation: maxLength 16000 - name: prev | type: string | description: Cursor pointing to the previous page in the list of results. | validation: maxLength 16000 - 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. - name: aggregationData | type: AggregationData | description: Aggregation data, returned when aggregations are requested. - name: results | type: array | description: key = aggregation name (as derived from search request) | validation: maxItems 10000 - ONE-OF: - name: values | type: ValueResults | description: Value aggregation results - name: results | type: array | description: List of value aggregations | validation: maxItems 250 - name: value | type: string | description: Value of the field | validation: maxLength 100 - name: count | type: integer | description: Count of entities with this value - name: ranges | type: RangeResults | description: Range aggregation results - name: results | type: array | description: List of ranges returned in same order as requested | validation: maxItems 50 - name: from | type: number | description: Inclusive lower bound of the range | validation: format double - name: to | type: number | description: Exclusive upper bound of the range | validation: format double - name: count | type: integer | description: Count of entities in this range - name: scalar | type: ScalarResult | description: Scalar aggregation results - name: type | type: ScalarType | description: Type of scalar aggregation - enum: - COUNT_DISTINCT: Count of distinct values - MIN: Minimum value - MAX: Maximum value - name: value | type: number | description: Value of the scalar aggregation - name: groupedByValue | type: GroupByValueResults | description: Group by value aggregation results - name: results | type: array | description: List of value aggregations | validation: maxItems 1000 - name: value | type: string | description: Value of the field | validation: maxLength 1000 - name: nestedResults | type: NestedAggregationResults | description: Nested aggregations - ONE-OF: - name: values | type: ValueResults | description: Value aggregation results - name: ranges | type: RangeResults | description: Range aggregation results - name: scalar | type: ScalarResult | description: Scalar aggregation results - name: name | type: string | description: User-defined name of aggregation, matches the one provided in request | validation: maxLength 100 - name: type | type: AggregationType | description: Type of aggregation that matches result - enum: - VALUE: An aggregation where result buckets are dynamically built - one per unique value - RANGE: An aggregation, where user can define set of ranges - each representing a bucket - SCALAR: A single-value metric aggregation - e.g. min, max, sum, avg - DATE_HISTOGRAM: An aggregation, where result buckets are dynamically built - one per time interval (hour, day, week, etc.) - NESTED: Multi-level aggregation, where each next aggregation is nested within previous one - name: fieldPath | type: string | description: Field to aggregate by, matches the one provided in request | validation: maxLength 200 - name: dateHistogram | type: DateHistogramResults | description: Date histogram aggregation results - name: results | type: array | description: List of date histogram aggregations | validation: maxItems 200 - name: value | type: string | description: Date in ISO 8601 format | validation: maxLength 100 - name: count | type: integer | description: Count of documents in the bucket - name: nested | type: NestedResults | description: Nested aggregation results - name: results | type: array | description: List of nested aggregations | validation: maxItems 1000 - name: results | type: Map | description: List of nested aggregations | validation: format map - ONE-OF: - name: value | type: ValueResult | description: Value aggregation result - name: value | type: string | description: Value of the field | validation: maxLength 1000 - name: count | type: integer | description: Count of entities with this value | validation: format int32 - name: range | type: RangeResult | description: Range aggregation result - name: from | type: number | description: Inclusive lower bound of the range | validation: format double - name: to | type: number | description: Exclusive upper bound of the range | validation: format double - name: count | type: integer | description: Count of entities in this range | validation: format int32 - name: scalar | type: ScalarResult | description: Scalar aggregation result - name: value | type: number | description: Value of the scalar aggregation - name: dateHistogram | type: ValueResult | description: Date histogram aggregation result - name: name | type: string | description: User-defined name of aggregation as derived from search request | validation: maxLength 100 - name: type | type: AggregationType | description: Type of aggregation that must match provided kind as derived from search request - name: fieldPath | type: string | description: Field to aggregate by as derived from search request | validation: maxLength 200 ``` ### Examples ### Search App Installation Searches app installations by free-text expression across site URL, business name, business email, site owner email, instance ID, and review title and description. ```curl curl -X POST \ 'https://www.wixapis.com/app-installations/v1/app-installation/search' \ -H 'Authorization: ' \ -H 'Content-Type: application/json' \ --data-binary '{ "search": { "search": { "expression": "example.wixsite.com" }, "cursorPaging": { "limit": 50 } } }' ``` --- ## JavaScript SDK ### Schema ``` Method: wixClientAdmin.appInstallations.AppInstallations.searchAppInstallation(search, options) Description: Retrieves a list of up to 100 app installations that match a free-text search expression. Search matches against the site URL, business name, business email, site owner email, instance GUID, review title, and review description. Search App Installation runs with these defaults, which you can override: - `paging.limit` is `50` The results include installations across all the apps in your developer account. To search a single field only, use [Query App Installations](https://dev.wix.com/docs/api-reference/app-management/app-installations/query-app-installations.md) with the appropriate filter. # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present. Required parameters: search Method parameters: param name: options | type: SearchAppInstallationOptions none - name: fields | type: array | description: Additional fields to include in the response. | validation: maxItems 1 - enum: - OWNER_EMAIL: Include `siteInfo.ownerEmail` in each returned app installation. Note: Only returns if your app has the **Get Site Owner** permission. param name: search | type: CursorSearch | required: true - name: cursorPaging | type: CursorPaging | description: Cursor pointing to page of results. When requesting 'cursor_paging.cursor', no `filter`, `sort` or `search` can be provided. - name: limit | type: integer | description: Maximum number of items to return in the results. | validation: minimum 0, maximum 100, format int32 - 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. | validation: maxLength 16000 - name: filter | type: object | description: A filter object. See documentation [here](https://bo.wix.com/wix-docs/rnd/platformization-guidelines/api-query-language#platformization-guidelines_api-query-language_defining-in-protobuf) - name: sort | type: array | description: Sort object in the form [{"fieldName":"sortField1"},{"fieldName":"sortField2","direction":"DESC"}] | validation: maxItems 10 - name: fieldName | type: string | description: Name of the field to sort by. | validation: maxLength 512 - name: order | type: SortOrder | description: Sort order. - enum: ASC, DESC - name: aggregations | type: array | description: Aggregations | Faceted search: refers to a way to explore large amounts of data by displaying summaries about various partitions of the data and later allowing to narrow the navigation to a specific partition. | validation: maxItems 10 - ONE-OF: - name: value | type: ValueAggregation | description: Value aggregation - ONE-OF: - name: includeOptions | type: IncludeMissingValuesOptions | description: Options for including missing values - name: addToBucket | type: string | description: Can specify custom bucket name. Defaults are [string -> "N/A"], [int -> "0"], [bool -> "false"] ... | validation: maxLength 20 - name: sortType | type: SortType | description: Should sort by number of matches or value of the field - enum: - COUNT: Should sort by number of matches - VALUE: Should sort by value of the field alphabetically - name: sortDirection | type: SortDirection | description: Should sort in ascending or descending order - enum: - DESC: Should sort in descending order - ASC: Should sort in ascending order - name: limit | type: integer | description: How many aggregations would you like to return? Can be between 1 and 250. 10 is the default. | validation: format int32 - name: missingValues | type: MissingValues | description: Should missing values be included or excluded from the aggregation results. Default is EXCLUDE - enum: - EXCLUDE: Should missing values be excluded from the aggregation results - INCLUDE: Should missing values be included in the aggregation results - name: range | type: RangeAggregation | description: Range aggregation - name: buckets | type: array | description: List of range buckets, where during aggregation each entity will be placed in the first bucket where its value falls into based on provided range bounds | validation: maxItems 50 - name: from | type: number | description: Inclusive lower bound of the range. Required if to is not given - name: to | type: number | description: Exclusive upper bound of the range. Required if from is not given - name: scalar | type: ScalarAggregation | description: Scalar aggregation - name: type | type: ScalarType | description: Define the operator for the scalar aggregation - enum: - COUNT_DISTINCT: Count of distinct values - MIN: Minimum value - MAX: Maximum value - name: dateHistogram | type: DateHistogramAggregation | description: Date histogram aggregation - name: interval | type: Interval | description: Interval for date histogram aggregation - enum: - YEAR: Yearly interval - MONTH: Monthly interval - WEEK: Weekly interval - DAY: Daily interval - HOUR: Hourly interval - MINUTE: Minute interval - SECOND: Second interval - name: nested | type: NestedAggregation | description: Nested aggregation - name: nestedAggregations | type: array | description: Flattened list of aggregations, where each next aggregation is nested within previous one | validation: minItems 2, maxItems 3 - ONE-OF: - name: value | type: ValueAggregation | description: Value aggregation - name: range | type: RangeAggregation | description: Range aggregation - name: scalar | type: ScalarAggregation | description: Scalar aggregation - name: dateHistogram | type: DateHistogramAggregation | description: Date histogram aggregation - name: name | type: string | description: User-defined name of aggregation, should be unique, will appear in aggregation results | validation: maxLength 100 - name: type | type: NestedAggregationType | description: Type of aggregation, client must provide matching aggregation field below - enum: - VALUE: An aggregation where result buckets are dynamically built - one per unique value - RANGE: An aggregation, where user can define set of ranges - each representing a bucket - SCALAR: A single-value metric aggregation - e.g. min, max, sum, avg - DATE_HISTOGRAM: An aggregation, where result buckets are dynamically built - one per time interval (hour, day, week, etc.) - name: fieldPath | type: string | description: Field to aggregate by, use dont notation to specify json path | validation: maxLength 200 - name: name | type: string | description: User-defined name of aggregation, should be unique, will appear in aggregation results | validation: maxLength 100 - name: type | type: AggregationType | description: Type of aggregation, client must provide matching aggregation field below - enum: - VALUE: An aggregation where result buckets are dynamically built - one per unique value - RANGE: An aggregation, where user can define set of ranges - each representing a bucket - SCALAR: A single-value metric aggregation - e.g. min, max, sum, avg - DATE_HISTOGRAM: An aggregation, where result buckets are dynamically built - one per time interval (hour, day, week, etc.) - NESTED: Multi-level aggregation, where each next aggregation is nested within previous one - name: fieldPath | type: string | description: Field to aggregate by, use dot notation to specify json path | validation: maxLength 200 - name: search | type: SearchDetails | description: Free text to match in searchable fields - name: mode | type: Mode | description: Defines how separate search terms in `expression` are combined - enum: - OR: Any of the search terms must be present - AND: All search terms must be present - name: expression | type: string | description: Search term or expression | validation: maxLength 100 - name: fields | type: array | description: Fields to search in. If empty - will search in all searchable fields. Use dot notation to specify json path | validation: maxItems 20, maxLength 200 - name: fuzzy | type: boolean | description: Flag if should use auto fuzzy search (allowing typos by a managed proximity algorithm) - name: timeZone | type: string | description: UTC offset or IANA time zone. Valid values are ISO 8601 UTC offsets, such as +02:00 or -06:00, and IANA time zone GUIDs, such as Europe/Rome Affects all filters and aggregations returned values. You may override this behavior in a specific filter by providing timestamps including time zone. e.g. `"2023-12-20T10:52:34.795Z"` | validation: maxLength 50 Searchable fields: - field: siteInfo.businessCategory.secondary | operators: $hasAll, $hasSome | sort: ASC, DESC | aggregatable: true | searchable: false - field: createdDate | operators: $eq, $ne, $exists, $in, $any, $lt, $lte, $gt, $gte | sort: ASC, DESC | aggregatable: true | searchable: false - field: id | operators: $eq, $ne, $exists, $in, $any, $begins, $gt, $lt, $lte, $gte | sort: ASC, DESC | aggregatable: true | searchable: false - field: updatedDate | operators: $eq, $ne, $exists, $in, $any, $lt, $lte, $gt, $gte | sort: ASC, DESC | aggregatable: true | searchable: false - field: appId | operators: $eq, $ne, $exists, $in, $any, $begins, $gt, $lt, $lte, $gte | sort: ASC, DESC | aggregatable: true | searchable: false - field: appVersion | operators: $eq, $ne, $exists, $in, $any, $begins, $gt, $lt, $lte, $gte | sort: ASC, DESC | aggregatable: true | searchable: false - field: firstInstallationDate | operators: $eq, $ne, $exists, $in, $any, $lt, $lte, $gt, $gte | sort: ASC, DESC | aggregatable: true | searchable: false - field: instanceId | operators: $eq, $ne, $exists, $in, $any, $begins, $gt, $lt, $lte, $gte | sort: ASC, DESC | aggregatable: true | searchable: true - field: planInfo.billingCycle.cycleDuration.count | operators: $eq, $ne, $exists, $in, $any, $lt, $lte, $gt, $gte | sort: ASC, DESC | aggregatable: true | searchable: false - field: planInfo.billingCycle.cycleDuration.unit | operators: $eq, $ne, $exists, $in, $any | sort: ASC, DESC | aggregatable: true | searchable: false - field: planInfo.billingCycle.cycleType | operators: $eq, $ne, $exists, $in, $any | sort: ASC, DESC | aggregatable: true | searchable: false - field: planInfo.endDate | operators: $eq, $ne, $exists, $in, $any, $lt, $lte, $gt, $gte | sort: ASC, DESC | aggregatable: true | searchable: false - field: planInfo.freeTrialInfo.endDate | operators: $eq, $ne, $exists, $in, $any, $lt, $lte, $gt, $gte | sort: ASC, DESC | aggregatable: true | searchable: false - field: planInfo.freeTrialInfo.status | operators: $eq, $ne, $exists, $in, $any | sort: ASC, DESC | aggregatable: true | searchable: false - field: planInfo.planName | operators: $eq, $ne, $exists, $in, $any, $begins, $gt, $lt, $lte, $gte | sort: ASC, DESC | aggregatable: true | searchable: false - field: planInfo.planStatus | operators: $eq, $ne, $exists, $in, $any | sort: ASC, DESC | aggregatable: true | searchable: false - field: review.id | operators: $eq, $ne, $exists, $in, $any, $begins, $gt, $lt, $lte, $gte | sort: ASC, DESC | aggregatable: true | searchable: false - field: review.date | operators: $eq, $ne, $exists, $in, $any, $lt, $lte, $gt, $gte | sort: ASC, DESC | aggregatable: true | searchable: false - field: review.rating | operators: $eq, $ne, $exists, $in, $any, $lt, $lte, $gt, $gte | sort: ASC, DESC | aggregatable: true | searchable: false - field: siteInfo.accountId | operators: $eq, $ne, $exists, $in, $any, $begins, $gt, $lt, $lte, $gte | sort: ASC, DESC | aggregatable: true | searchable: false - field: siteInfo.businessCategory.primary | operators: $eq, $ne, $exists, $in, $any, $begins, $gt, $lt, $lte, $gte | sort: ASC, DESC | aggregatable: true | searchable: false - field: siteInfo.businessEmail | operators: $eq, $ne, $exists, $in, $any, $begins, $gt, $lt, $lte, $gte | sort: ASC, DESC | aggregatable: false | searchable: true - field: siteInfo.businessName | operators: $eq, $ne, $exists, $in, $any, $begins, $gt, $lt, $lte, $gte | sort: ASC, DESC | aggregatable: true | searchable: true - field: siteInfo.countryCode | operators: $eq, $ne, $exists, $in, $any, $begins, $gt, $lt, $lte, $gte | sort: ASC, DESC | aggregatable: true | searchable: false - field: siteInfo.editorType | operators: $eq, $ne, $exists, $in, $any | sort: ASC, DESC | aggregatable: true | searchable: false - field: siteInfo.ownerEmail | operators: $eq, $ne, $exists, $in, $any, $begins, $gt, $lt, $lte, $gte | sort: ASC, DESC | aggregatable: false | searchable: true - field: siteInfo.premium | operators: $eq, $ne, $exists, $in, $any | sort: ASC, DESC | aggregatable: true | searchable: false - field: siteInfo.siteId | operators: $eq, $ne, $exists, $in, $any, $begins, $gt, $lt, $lte, $gte | sort: ASC, DESC | aggregatable: true | searchable: false - field: siteInfo.siteUrl | operators: $eq, $ne, $exists, $in, $any, $begins, $gt, $lt, $lte, $gte | sort: ASC, DESC | aggregatable: true | searchable: true - field: status | operators: $eq, $ne, $exists, $in, $any | sort: ASC, DESC | aggregatable: true | searchable: false Return type: PROMISE - name: appInstallations | type: array | description: Retrieved app installations. - name: _id | type: string | description: App installation GUID. | validation: format GUID - name: instanceId | type: string | description: Unique identifier of the app instance on the site. Stable across uninstalls and reinstalls of the same app on the same site. | validation: format GUID - name: _createdDate | type: Date | description: Date and time the app installation was created. - name: _updatedDate | type: Date | description: Date and time the app installation was last updated. - name: revision | type: string | description: Revision number, which increments by 1 each time the app installation is updated. | validation: format int64 - name: firstInstallationDate | type: Date | description: Date and time the app was first installed on the site. Preserved across uninstalls and reinstalls. - name: siteInfo | type: SiteInfo | description: Information about the site the app is installed on. - name: siteId | type: string | description: Site GUID. | validation: format GUID - name: businessName | type: string | description: Business name displayed on the site. | validation: maxLength 100 - name: siteUrl | type: string | description: Public URL of the site. | validation: format WEB_URL - name: businessEmail | type: string | description: Business email address configured on the site. | validation: format EMAIL - name: countryCode | type: string | description: 2-letter country code in [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format. | validation: format COUNTRY - name: businessCategory | type: Categories | description: Business category the site belongs to. - name: primary | type: string | description: Primary site category. | validation: maxLength 100 - name: secondary | type: array | description: Secondary site category. | validation: maxItems 50, maxLength 100 - name: premium | type: boolean | description: Whether the site has an active Premium subscription. - name: editorType | type: EditorType | description: Editor the site was created with. - enum: - EDITOR: Wix Editor. - ADI: Wix ADI. - EDITORX: Editor X. - STUDIO: Wix Studio. - HARMONY: Wix Harmony. - VIBE: Wix Vibe. - WIXEL: Wixel. - name: ownerEmail | type: string | description: Email address of the site owner. Returned only when `OWNER_EMAIL` is requested in the `fields` parameter and the app has the **Get Site Owner** permission. | validation: format EMAIL - name: accountId | type: string | description: GUID of the site owner's account. | validation: format GUID - name: planInfo | type: PlanInfo | description: Information about the plan the site owner purchased for the app. - name: planName | type: string | description: Name of the plan the site owner purchased for the app. | validation: maxLength 100 - name: billingCycle | type: Cycle | description: Billing cycle of the purchased plan. - name: cycleType | type: CycleType | description: Type of the billing cycle. + `"UNKNOWN_UNIT"`: There is no information about the billing cycle. + `"ONE_TIME"`: The customer pays for unlimited usage of the app with a single payment. + `"RECURRING"`: The customer pays for a subscription to the app on a recurring schedule. - enum: ONE_TIME, RECURRING - name: cycleDuration | type: Duration | description: Duration of the billing cycle. Available only for `{"cycleType": "RECURRING"}`. - name: unit | type: DurationUnit | description: Unit of the billing cycle. - enum: - MONTH: Month. - YEAR: Year. - name: count | type: integer | description: Count of units that make up the billing cycle. | validation: minimum 0 - name: planStatus | type: PlanStatus | description: Current status of the purchased plan. - enum: - UPGRADED: The site owner upgraded the app to a paid plan. - CANCELED: The site owner upgraded the app to a paid plan and has since canceled it. - AUTO_RENEW_OFF: The plan is still active, but auto-renewal is turned off. - name: freeTrialInfo | type: FreeTrialInfo | description: Free trial details for the purchased plan, if a free trial is or was active. - name: status | type: FreeTrialStatus | description: Current free trial status. - enum: - IN_PROGRESS: The free trial is currently in progress. - ENDED: The free trial has ended. - name: endDate | type: Date | description: Date and time the free trial ended. Returned only after the free trial has ended. - name: endDate | type: Date | description: Date and time the plan expires. Returned only when auto-renewal is turned off. - name: appId | type: string | description: GUID of the installed app. | validation: format GUID - name: appVersion | type: string | description: Major version of the installed app. | validation: maxLength 6 - name: status | type: Status | description: Current installation status of the app on the site. - enum: - INSTALLED: The app is currently installed on the site. - UNINSTALLED: The app was installed on the site and has since been removed. - name: review | type: ReviewInfo | description: Information about the review the site owner left for the app, if any. - name: _id | type: string | description: Review GUID. | validation: format GUID - name: date | type: Date | description: Date and time the review was published. - name: rating | type: integer | description: Rating the site owner left for the app, from 1 to 5. | validation: format int32 - name: title | type: string | description: Review title. | validation: maxLength 100 - name: description | type: string | description: Review body text. | validation: maxLength 2500 - name: pagingMetadata | type: CursorPagingMetadata | description: Paging metadata, including the cursor used to retrieve the next page of results. - name: count | type: integer | description: Number of items returned in current page. | validation: format int32 - 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. | validation: maxLength 16000 - name: prev | type: string | description: Cursor pointing to the previous page in the list of results. | validation: maxLength 16000 - 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. - name: aggregationData | type: AggregationData | description: Aggregation data, returned when aggregations are requested. - name: results | type: array | description: key = aggregation name (as derived from search request) | validation: maxItems 10000 - ONE-OF: - name: values | type: ValueResults | description: Value aggregation results - name: results | type: array | description: List of value aggregations | validation: maxItems 250 - name: value | type: string | description: Value of the field | validation: maxLength 100 - name: count | type: integer | description: Count of entities with this value - name: ranges | type: RangeResults | description: Range aggregation results - name: results | type: array | description: List of ranges returned in same order as requested | validation: maxItems 50 - name: from | type: number | description: Inclusive lower bound of the range - name: to | type: number | description: Exclusive upper bound of the range - name: count | type: integer | description: Count of entities in this range - name: scalar | type: ScalarResult | description: Scalar aggregation results - name: type | type: ScalarType | description: Type of scalar aggregation - enum: - COUNT_DISTINCT: Count of distinct values - MIN: Minimum value - MAX: Maximum value - name: value | type: number | description: Value of the scalar aggregation - name: groupedByValue | type: GroupByValueResults | description: Group by value aggregation results - name: results | type: array | description: List of value aggregations | validation: maxItems 1000 - name: value | type: string | description: Value of the field | validation: maxLength 1000 - name: nestedResults | type: NestedAggregationResults | description: Nested aggregations - ONE-OF: - name: values | type: ValueResults | description: Value aggregation results - name: ranges | type: RangeResults | description: Range aggregation results - name: scalar | type: ScalarResult | description: Scalar aggregation results - name: name | type: string | description: User-defined name of aggregation, matches the one provided in request | validation: maxLength 100 - name: type | type: AggregationType | description: Type of aggregation that matches result - enum: - VALUE: An aggregation where result buckets are dynamically built - one per unique value - RANGE: An aggregation, where user can define set of ranges - each representing a bucket - SCALAR: A single-value metric aggregation - e.g. min, max, sum, avg - DATE_HISTOGRAM: An aggregation, where result buckets are dynamically built - one per time interval (hour, day, week, etc.) - NESTED: Multi-level aggregation, where each next aggregation is nested within previous one - name: fieldPath | type: string | description: Field to aggregate by, matches the one provided in request | validation: maxLength 200 - name: dateHistogram | type: DateHistogramResults | description: Date histogram aggregation results - name: results | type: array | description: List of date histogram aggregations | validation: maxItems 200 - name: value | type: string | description: Date in ISO 8601 format | validation: maxLength 100 - name: count | type: integer | description: Count of documents in the bucket - name: nested | type: NestedResults | description: Nested aggregation results - name: results | type: array | description: List of nested aggregations | validation: maxItems 1000 - name: results | type: Map | description: List of nested aggregations | validation: format map - ONE-OF: - name: value | type: ValueResult | description: Value aggregation result - name: value | type: string | description: Value of the field | validation: maxLength 1000 - name: count | type: integer | description: Count of entities with this value | validation: format int32 - name: range | type: RangeResult | description: Range aggregation result - name: from | type: number | description: Inclusive lower bound of the range - name: to | type: number | description: Exclusive upper bound of the range - name: count | type: integer | description: Count of entities in this range | validation: format int32 - name: scalar | type: ScalarResult | description: Scalar aggregation result - name: value | type: number | description: Value of the scalar aggregation - name: dateHistogram | type: ValueResult | description: Date histogram aggregation result - name: name | type: string | description: User-defined name of aggregation as derived from search request | validation: maxLength 100 - name: type | type: AggregationType | description: Type of aggregation that must match provided kind as derived from search request - name: fieldPath | type: string | description: Field to aggregate by as derived from search request | validation: maxLength 200 ``` ### Examples ### searchAppInstallation ```javascript import { appInstallations } from '@wix/app-installations'; async function searchAppInstallation(search,options) { const response = await appInstallations.searchAppInstallation(search,options); }; ``` ### searchAppInstallation (with elevated permissions) ```javascript import { appInstallations } from '@wix/app-installations'; import { auth } from '@wix/essentials'; async function mySearchAppInstallationMethod(search,options) { const elevatedSearchAppInstallation = auth.elevate(appInstallations.searchAppInstallation); const response = await elevatedSearchAppInstallation(search,options); } ``` ### searchAppInstallation (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 { appInstallations } from '@wix/app-installations'; // Import the auth strategy for the relevant access type // Import the relevant host module if needed const myWixClient = createClient ({ modules: { appInstallations }, // Include the auth strategy and host as relevant }); async function searchAppInstallation(search,options) { const response = await myWixClient.appInstallations.searchAppInstallation(search,options); }; ``` ---