Note user_id 'me' is reserved - it is the alias for the id of authorized user
userAppId.appId
string
必需
Query 参数
page
integer
可选
(optional URL parameter) The page number. Pagination is used to split the results into chunks. Defaults to 1.
perPage
integer
可选
(optional URL parameter) The number of results that will be contained in each page. Defaults to 128.
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl--location--request GET 'http://dev-cn.your-api-server.com/v2/users//apps//searches'
返回响应
🟢200A successful response.
application/json
Body
status
object(apistatusStatus)
可选
code
object
可选
description
string
可选
A longer description of the error.
details
string
可选
More details of the given error.
stackTrace
array[string]
可选
For some environment we may return a stack trace to help debug any issues.
percentCompleted
integer<int64>
specifically for long running jobs
可选
timeRemaining
integer<int64>
if status is pending, how much time is remaining (in seconds)
可选
reqId
string
If we want to return a request id in the base status field
可选
internalDetails
string
可选
Internal Annotation (do not set in production, for internal Clarifai use only).
redirectInfo
object(statusRedirectInfo)
可选
id
string
A unique id which uniquely identifies a search
可选
hits
array[object (Hit) {5}]
可选
The list of search result Hits.
score
number<float>
可选
This is the score for the ranked Hit results of the search query. This score is a number between 0.0 and 1.0 as it represents a confidence in the search Hit. For example, if you search for "car" and get a close matching Hit, the score should be close to 1.0. If you get a score of close to 0.0 that means it's very disimilar to your query, in this case NOT a "car". There is a special intermediate score of 0.5 that means that the Hit is not really correlated with your search query (ie. not similar or dissimlar to the query) which is a common occurrence when using negate queries. Note: some queries that are just filtering down your app of inputs may just return a score of 1.0 for all Hits.
input
object(Input)
可选
annotation
object(Annotation of an asset with metadata)
可选
userId
string
可选
The customer-facing id of the user who owns the app the asset came from.
appId
string
可选
The cfid of the app the asset came from.
query
object(apiQuery)
可选
This is the search query used in /searches, model training requests, bulk data exports, etc.
ands
array[object (apiAnd) {4}]
可选
The query syntax is simply a list of And operatiosn that will be ANDed together to fetch results which are returned to the user as Hit messages.Deprecated: Only used by the deprecated PostSearches endpoint. Use filters and ranks instead with PostInputsSearches or PostAnnotationsSearches.
language
string
可选
This allows the query to override any default language the app was setup in when doing Concept based searches. This currently only affects public Models Output searches when those public Models have translations for their Concepts.
filters
array[object (Filter) {4}]
filters in this query
e.q. only fetch annotations that have certain metadata
可选
ranks
array[object (Rank) {2}]
rankings in this query
e.g. visual search by a url
可选
searches
array[object (apiSearch) {13}]
可选
The original Searches provided in the request.
query
object(apiQuery)
可选
This is the search query used in /searches, model training requests, bulk data exports, etc.
id
string
可选
Customer facing, external ID for search to be saved. Provided by the user, e.g. "saved-search-1. It is unique per application.
applicationId
string
可选
Application that owns this saved search.
name
string
可选
Human readable display name of the saved search.
asOf
string<date-time>
可选
"As of" timestamp, indicating a time in the past as of which we want to retrieve the annotations satisfying the query.
gitHash
string
可选
Git hash of the code that ran the filter.
createdAt
string<date-time>
可选
When the saved search was created.
modifiedAt
string<date-time>
可选
When the saved search was updated.
algorithm
string
The search algorithm to be used.
Options are are 'nearest_neighbor', 'brute_force', and 'avg_concept_brute_force'
The last two perform a brute force search visual search instead of a more scalable distributed
nearest neighbor search and should be used by advanced users only.
If not specified we default to nearest neighbor
可选
save
boolean
If true, save this search, and exit without executing the search.
If false execute the query
可选
minValue
number<float>
可选
Minimum value of confidence threshold score in result. Defaults to 0.0 which means we won't do any thresholding as all probabilities will likely be > 0.0.
visibility
object(clarifaiapiVisibility)
可选
Visibility represents how visible the given resource is to other users. When authenticating a request we can tell if a user is a collaborator or a teammate for the the app that contains the resource and set their allowed visibility. We use that to restrict what they are allowed to see: If AllowedVisibility is PRIVATE then we allow PRIVATE (10), ORG (30), PUBLIC (50) If AllowedVisibility is ORG then we allow ORG (30), PUBLIC (50) If AllowedVisibility is PUBLIC then we allow PUBLIC (50) only.
metric
enum<string>
可选
Metric used for search. Can be EUCLIDEAN_DISTANCE (default) or COSINE_DISTANCE. Currently only brute force search supports non-eudlicean metrics.
枚举值:
METRIC_NOT_SETEUCLIDEAN_DISTANCECOSINE_DISTANCE
默认值:
METRIC_NOT_SET
hitCounts
array[object (apiHitCount) {1}]
可选
The counts of hits for each search, in the same order as searches. Only returned if the request set only_count.
estimatedTotal
string<uint64>
可选
The estimated total number of hits for the search query, not just the current page.