Clarifai AI API
  1. searches
Clarifai AI API
  • CLARIFAI API 基础知识
    • Clarifai API 基础知识
    • gRPC 与 HTTP 通道
    • 支持的格式
  • API 接口
    • annotation_filters
      • {annotationFilterId}
        • Get a specific annotation filter.
      • List all the annotation filters.
      • Delete one or more annotation filters in a single request.
      • Add annotation filters.
      • Patch one or more annotation filters.
    • annotations
      • searches
        • metrics
          • {id}
            • Get the evaluation results between two search requests
          • List the evaluation results between two search requests
          • Evaluate the results of two search requests
        • Execute a search over annotations
          POST
        • Patch saved annotations searches by ids.
          PATCH
      • List all the annotation.
        GET
      • Delete multiple annotations in one request.
        DELETE
      • Post annotations.
        POST
      • Patch one or more annotations.
        PATCH
    • apps
      • List all the apps.
    • bulk_operations
      • {id}
        • Get the bulk operation details by ID
      • List all the bulk operations
      • delete one or more terminated bulk operations
      • Perform bulk operations on a list of inputs based on input source. Operation include add, update, delete of concepts, metadata and geo data. This is an Asynchronous process. Use ListBulkOperations or GetBulkOperation to check the status.
      • Cancel one or more bulk operations
    • collectors
      • {collectorId}
        • Get a specific collector from an app.
      • List all the collectors.
      • Delete multiple collectors in one request. This call is asynchronous. Use DeleteCollector if you want a synchronous version.
      • Add a list of Collectors to an app. In the handler of this endpoint we also check for all the scopes of the POST /inputs endpoint. Those current scopes are listed here as a hard requirement. They are needed when adding the collectors just so we now that
      • Patch one or more collectors.
    • concepts
      • knowledge_graphs
        • List all domain graphs.
        • Post domain graphs.
      • mappings
        • jobs
          • Start concept mapping jobs.
      • searches
        • Search over the concepts to find one or more you're looking for. This leverage the "body" parameter because we also have page and per_page as url query param variables in this request.
      • status
        • List all the concepts with their positive and negative counts
      • {conceptId}
        • languages
          • {language}
            • Get a specific concept from an app.
          • List the concept in all the translated languages.
          • Add a new translation for this concept.
          • Patch the name for a given language names by passing in a list of concepts with the new names for the languages.
        • Get a specific concept from an app.
      • List all the concepts.
      • Add a concept to an app.
      • Patch one or more concepts.
    • datasets
      • inputs
        • search_add
          • jobs
            • {jobId}
              • Get a specific job.
      • {datasetId}
        • inputs
          • {inputId}
            • Get a specific dataset input.
          • List all the dataset inputs in a dataset.
          • Delete one or more dataset inputs in a single request.
          • Add dataset inputs to a dataset. The process is not atomic, i.e. if there are errors with some dataset inputs, others might still be added. The response reports - SUCCESS if all dataset inputs were added, - MIXED_STATUS if only some dataset inputs wer
        • versions
          • {datasetVersionId}
            • exports
              • Create export of a dataset version.
            • metrics
              • V2_ListDatasetVersionMetricsGroups2
            • Get a specific dataset version.
          • List all the dataset versions.
          • Delete one or more dataset versions in a single request.
          • Add dataset versions to a dataset.
          • Patch one or more dataset versions.
        • Get a specific dataset.
      • List all the datasets.
      • Delete one or more datasets in a single request.
      • Add datasets to an app. The process is atomic, i.e. either all or no datasets are added. If there is an error for one dataset, the process will stop, revert the transaction and return the error.
      • Patch one or more datasets. The process is atomic, i.e. either all or no datasets are patched. If there is an error for one dataset, the process will stop, revert the transaction and return the error.
    • evaluations
      • {evaluationId}
        • V2_GetEvaluation2
      • V2_ListEvaluations3
      • V2_PostEvaluations2
    • inputs
      • annotations
        • Delete multiple annotations in one request.
      • data_sources
        • Initiates retrieval of inputs from cloud storage from a user provided data source. Will create and return an inputs-add-job for tracking progress. Archives will be extracted and their contents will be processed as inputs.
      • jobs
        • add
          • {id}
            • Get the input add job details by ID
            • cancel the input add job by ID
          • List all the inputs add jobs
        • extraction
          • {inputsExtractionJobId}
            • Get the input extraction job details by ID
          • List all the input extraction jobs
          • V2_CancelInputsExtractionJobs2
      • searches
        • Execute a search over inputs
        • Patch saved inputs searches by ids.
      • status
        • Get input count per status.
      • stream
        • Streams all the inputs starting from oldest assets.
      • uploads
        • Start uploading a file archive containing inputs. Will create and return an inputs-add-job for tracking progress.
      • {inputId}
        • annotations
          • {annotationId}
            • Get a specific annotation from an app.
            • Delete a single annotation.
        • video_manifest
          • Get a video input manifest.
        • Get a specific input from an app.
        • Delete a single input asynchronously.
      • List all the inputs.
      • Delete multiple inputs in one request. This call is asynchronous.
      • Add 1 or more input to an app. The actual inputs processing is asynchronous.
      • Patch one or more inputs.
    • label_orders
      • {labelOrderId}
        • Get a label order.
      • List label orders.
      • Delete multiple label orders in one request. this do not change task status
      • Add Label orders.
      • Patch one or more label orders.
      • List label orders.
      • Patch one or more label orders.
    • models
      • searches
        • Search over the models to find one or more you're looking for. This leverage the "body" parameter because we also have page and per_page as url query param variables in this request.
      • types
        • {modelTypeId}
          • Get a specific model type.
        • List all the model types available in the platform. This MUST be above ListModels so that the /models/types endpoint takes precedence.
      • {modelId}
        • check_consents
          • Update model check consents
        • inputs
          • List all the inputs.
        • languages
          • Update model languages tags
        • output_info
          • Get a the output info for a given model_id or model_id/version_id combo.
        • outputs
          • Get predicted outputs from the model.
        • publish
          • PostModelVersionsPublish
        • references
          • Lists model references tied to a particular model id.
        • toolkits
          • Update model toolkits tags
        • unpublish
          • PostModelVersionsUnPublish
        • usecases
          • Update model use_cases tags
        • versions
          • {modelVersionId}
            • evaluations
              • {evaluationId}
              • Deprecated, use GetEvaluation instead List the evaluation metrics for a model version.
              • Deprecated, use PostEvaluations instead
            • input_examples
              • {exampleId}
                • GetModelVersionInputExample
              • ListModelVersionInputExamples
          • {versionId}
            • inputs
              • List all the inputs.
            • metrics
              • Deprecated: Use GetEvaluation instead Get the evaluation metrics for a model version.
              • Deprecated, use PostEvaluations instead Run the evaluation metrics for a model version.
            • output_info
              • Get a the output info for a given model_id or model_id/version_id combo.
            • outputs
              • Get predicted outputs from the model.
            • Get a specific model from an app.
            • Delete a single model.
          • List all the models.
          • Create a new model version to trigger training of the model.
        • Get a specific model from an app.
        • Delete a single model.
      • List all the models.
      • Delete multiple models in one request.
      • Add a models to an app.
      • Patch one or more models.
    • modules
      • List all the modules in community, by user or by app.
    • my_scopes
      • API Keys in the public API -- request is itself Key authorized, and will tell the user the scopes/access of the key/credential they're providing, as computed by our authorizer:
    • myscopes
      • API Keys in the public API -- request is itself Key authorized, and will tell the user the scopes/access of the key/credential they're providing, as computed by our authorizer:
    • myscopesroot
      • V2_MyScopesRoot
    • open_source_licenses
      • List all the supported open source licenses in the platform.
    • resource_counts
      • List the resource counts for the app.
    • searches
      • {id}
        • Get a saved legacy search.
        • Delete a saved search.
        • Execute a previously saved legacy search.
      • List all saved legacy searches.
      • Execute a new search and optionally save it.
      • Patch saved legacy searches by ids.
    • stats
      • values
        • aggregate
          • PostStatValuesAggregate
        • PostStatValues
    • status_codes
      • {statusCodeId}
        • Get more details for a status code.
      • List all status codes.
    • tasks
      • {taskId}
        • annotations
          • count
            • Task annotation count
        • assignments
          • List next non-labeled and unassigned inputs from task's dataset
        • inputs
          • count
            • Task Input count
          • samples
            • Get a specific input from an app.
        • Get a specific task from an app.
      • List tasks from an app.
      • Delete multiple tasks in one request.
      • Add tasks to an app.
      • Patch one or more tasks.
    • trending_metrics
      • views
        • {viewType}
          • List the view metrics for a detail view
    • uploads
      • {uploadId}
        • content_parts
          • Upload a part of a multipart upload. Behaviour on completion depends on the endpoint that was used to initiate the upload.
        • V2_GetUpload2
      • V2 List Uploads2
      • V2_DeleteUploads2
      • V2_PostUploads2
    • users
      • {userAppId.userId}
        • apps
          • ids
            • Patch apps ids.
          • searches
            • Search over the applications to find one or more you're looking for.
          • {userAppId.appId}
            • annotation_filters
              • {annotationFilterId}
                • Get a specific annotation filter.
              • List all the annotation filters.
              • Delete one or more annotation filters in a single request.
              • Add annotation filters.
              • Patch one or more annotation filters.
            • annotations
              • searches
                • metrics
                  • {id}
                    • Get the evaluation results between two search requests
                    • DeleteAnnotationSearchMetrics
                  • List the evaluation results between two search requests
                  • Evaluate the results of two search requests
                • Execute a search over annotations
                • Patch saved annotations searches by ids.
              • List all the annotation.
              • Delete multiple annotations in one request.
              • Post annotations.
              • Patch one or more annotations.
            • bulk_operations
              • {id}
                • Get the bulk operation details by ID
              • List all the bulk operations
              • delete one or more terminated bulk operations
              • Perform bulk operations on a list of inputs based on input source. Operation include add, update, delete of concepts, metadata and geo data. This is an Asynchronous process. Use ListBulkOperations or GetBulkOperation to check the status.
              • Cancel one or more bulk operations
            • collaborators
              • owner list users who the app is shared with
              • Delete existing collaborators.
              • add collaborators to an app.
              • Patch existing collaborators.
            • collectors
              • {collectorId}
                • Get a specific collector from an app.
              • List all the collectors.
              • Delete multiple collectors in one request. This call is asynchronous. Use DeleteCollector if you want a synchronous version.
              • Add a list of Collectors to an app. In the handler of this endpoint we also check for all the scopes of the POST /inputs endpoint. Those current scopes are listed here as a hard requirement. They are needed when adding the collectors just so we now that
              • Patch one or more collectors.
            • concepts
              • knowledge_graphs
                • List all domain graphs.
                • Post domain graphs.
              • mappings
                • jobs
                  • Start concept mapping jobs.
              • relations
                • List concept relations between concepts in the platform. MUST be above ListConcepts so that if concept_id is empty this will still match /concepts/relations to list all the concept relations in the app.
              • searches
                • Search over the concepts to find one or more you're looking for. This leverage the "body" parameter because we also have page and per_page as url query param variables in this request.
              • status
                • List all the concepts with their positive and negative counts
              • {conceptId}
                • languages
                  • {language}
                    • Get a specific concept from an app.
                  • List the concept in all the translated languages.
                  • Add a new translation for this concept.
                  • Patch the name for a given language names by passing in a list of concepts with the new names for the languages.
                • relations
                  • List concept relations between concepts in the platform. MUST be above ListConcepts so that if concept_id is empty this will still match /concepts/relations to list all the concept relations in the app.
                  • Post concept relations to create relations between concepts in the platform.
                  • Post concept relations to create relations between concepts in the platform.
                • Get a specific concept from an app.
              • List all the concepts.
              • Add a concept to an app.
              • Patch one or more concepts.
            • datasets
              • inputs
                • search_add
                  • jobs
                    • {jobId}
                      • Get a specific job.
              • {datasetId}
                • inputs
                  • {inputId}
                    • Get a specific dataset input.
                  • List all the dataset inputs in a dataset.
                  • Delete one or more dataset inputs in a single request.
                  • Add dataset inputs to a dataset. The process is not atomic, i.e. if there are errors with some dataset inputs, others might still be added. The response reports - SUCCESS if all dataset inputs were added, - MIXED_STATUS if only some dataset inputs wer
                • versions
                  • {datasetVersionId}
                    • exports
                      • Create export of a dataset version.
                    • metrics
                      • V2 List Dataset Version Metrics Groups
                    • Get a specific dataset version.
                  • List all the dataset versions.
                  • Delete one or more dataset versions in a single request.
                  • Add dataset versions to a dataset.
                  • Patch one or more dataset versions.
                • Get a specific dataset.
              • List all the datasets.
              • Delete one or more datasets in a single request.
              • Add datasets to an app. The process is atomic, i.e. either all or no datasets are added. If there is an error for one dataset, the process will stop, revert the transaction and return the error.
              • Patch one or more datasets. The process is atomic, i.e. either all or no datasets are patched. If there is an error for one dataset, the process will stop, revert the transaction and return the error.
            • duplications
              • start to duplicate an app which copies all the inputs, annotations, models, concepts etc. to a new app. this is an async process, you should use ListAppDuplications or GetAppDuplication to check the status.
            • evaluations
              • {evaluationId}
                • V2 Get Evaluation
              • V2 List Evaluations
              • V2 Post Evaluations
            • inputs
              • annotations
                • Delete multiple annotations in one request.
              • data_sources
                • Initiates retrieval of inputs from cloud storage from a user provided data source. Will create and return an inputs-add-job for tracking progress. Archives will be extracted and their contents will be processed as inputs.
              • jobs
                • add
                  • {id}
                    • Get the input add job details by ID
                    • cancel the input add job by ID
                  • List all the inputs add jobs
                • extraction
                  • {inputsExtractionJobId}
                    • Get the input extraction job details by ID
                  • List all the input extraction jobs
                  • V2_CancelInputsExtractionJobs
              • searches
                • Execute a search over inputs
                • Patch saved inputs searches by ids.
              • status
                • Get input count per status.
              • stream
                • Streams all the inputs starting from oldest assets.
              • uploads
                • Start uploading a file archive containing inputs. Will create and return an inputs-add-job for tracking progress.
              • {inputId}
                • annotations
                  • {annotationId}
                    • Get a specific annotation from an app.
                    • Delete a single annotation.
                • video_manifest
                  • Get a video input manifest.
                • Get a specific input from an app.
                • Delete a single input asynchronously.
              • List all the inputs.
              • Delete multiple inputs in one request. This call is asynchronous.
              • Add 1 or more input to an app. The actual inputs processing is asynchronous.
              • Patch one or more inputs.
            • installed_module_versions
              • {installedModuleVersionId}
                • key
                  • Assign a key that the caller owns to be used when accessing this installed module version If this endpoint is called with a different key then it overwrites what is there.
                • Get installed modules vesrions for an app.
              • List installed modules vesrions for an app.
              • Uninstall an installed module version which will deploy the specific ModuleVersion to the app in the url. This cleaned up any associated caller keys so needs the Keys_Delete scope.
              • Install a new module version which will deploy the specific ModuleVersion to the app in the url.
            • keys
              • List keys by app_id
            • label_orders
              • {labelOrderId}
                • Get a label order.
              • List label orders.
              • Delete multiple label orders in one request. this do not change task status
              • Add Label orders.
              • Patch one or more label orders.
              • List label orders.
              • Delete multiple label orders in one request. this do not change task status
            • models
              • ids
                • Patch one or more models ids.
              • searches
                • Search over the models to find one or more you're looking for. This leverage the "body" parameter because we also have page and per_page as url query param variables in this request.
              • types
                • {modelTypeId}
                  • Get a specific model type.
                • List all the model types available in the platform. This MUST be above ListModels so that the /models/types endpoint takes precedence.
              • {modelId}
                • check_consents
                  • Update model check consents
                • concepts
                  • List models concepts.
                • inputs
                  • List all the inputs.
                • languages
                  • Update model languages tags
                • output_info
                  • Get a the output info for a given model_id or model_id/version_id combo.
                • outputs
                  • Get predicted outputs from the model.
                • publish
                  • PostModelVersionsPublish
                • references
                  • Lists model references tied to a particular model id.
                • toolkits
                  • Update model toolkits tags
                • unpublish
                  • PostModelVersionsUnPublish
                • usecases
                  • Update model use_cases tags
                • versions
                  • {modelVersionId}
                    • evaluations
                      • {evaluationId}
                        • Deprecated, use GetEvaluation instead Get an evaluation metrics for a model version.
                      • Deprecated, use GetEvaluation instead List the evaluation metrics for a model version.
                      • Deprecated, use PostEvaluations instead
                    • input_examples
                      • {exampleId}
                        • GetModelVersionInputExample
                      • ListModelVersionInputExamples
                  • {versionId}
                    • concepts
                      • List models concepts.
                    • inputs
                      • List all the inputs.
                    • metrics
                      • Deprecated: Use GetEvaluation instead Get the evaluation metrics for a model version.
                      • Deprecated, use PostEvaluations instead Run the evaluation metrics for a model version.
                    • output_info
                      • Get a the output info for a given model_id or model_id/version_id combo.
                    • outputs
                      • Get predicted outputs from the model.
                    • Get a specific model from an app.
                    • Delete a single model.
                  • List all the models.
                  • Create a new model version to trigger training of the model.
                  • PatchModelVersions
                • Get a specific model from an app.
                • Delete a single model.
              • List all the models.
              • Delete multiple models in one request.
              • Add a models to an app.
              • Patch one or more models.
            • modules
              • {moduleId}
                • versions
                  • {moduleVersionId}
                    • Get a specific module version for a module.
                  • List all the modules versions for a given module.
                  • Delete a multiple module version.
                  • Create a new module version to trigger training of the module.
                • Get a specific module from an app.
              • List all the modules in community, by user or by app.
              • Delete multiple modules in one request.
              • Add a modules to an app.
              • Patch one or more modules.
            • myscopes
              • API Keys in the public API -- request is itself Key authorized, and will tell the user the scopes/access of the key/credential they're providing, as computed by our authorizer:
            • resource_counts
              • List the resource counts for the app.
            • searches
              • {id}
                • Get a saved legacy search.
                • Delete a saved search.
                • Execute a previously saved legacy search.
              • List all saved legacy searches.
              • Execute a new search and optionally save it.
              • Patch saved legacy searches by ids.
            • stats
              • values
                • aggregate
                  • PostStatValuesAggregate
                • PostStatValues
            • task
              • {taskId}
                • annotations
                  • status
                    • Patch annotations status by worker id and task id.
            • tasks
              • {taskId}
                • annotations
                  • count
                    • Task annotation count
                • assignments
                  • List next non-labeled and unassigned inputs from task's dataset
                  • PutTaskAssignments evaluates all the annotations by labeler (authenticated user) for given task (task_id) and input (input_id).
                • inputs
                  • count
                    • Task Input count
                  • samples
                    • Get a specific input from an app.
                • Get a specific task from an app.
              • List tasks from an app.
              • Delete multiple tasks in one request.
              • Add tasks to an app.
              • Patch one or more tasks.
            • trending_metrics
              • views
                • {viewType}
                  • {objectId}
                    • Increase the view metric for a detail view
                  • List the view metrics for a detail view
            • uploads
              • {uploadId}
                • content_parts
                  • Upload a part of a multipart upload. Behaviour on completion depends on the endpoint that was used to initiate the upload.
                • V2 Get Upload
              • V2_ListUploads
              • V2_DeleteUploads
              • V2_PostUploads
            • workflows
              • ids
                • Patch one or more workflows ids.
              • {workflowId}
                • publish
                  • V2 Post Workflow Versions Publish
                • results
                  • similarity
                    • Compare embeddings distances using a workflow
                  • Predict using a workflow.
                • unpublish
                  • V2 Post Workflow Versions Un Publish
                • versions
                  • {versionId}
                    • results
                      • similarity
                        • Compare embeddings distances using a workflow
                      • Predict using a workflow.
                  • {workflowVersionId}
                    • Get single workflow version.
                  • List workflow versions.
                  • Delete workflow versions.
                  • Patch workflow versions.
                • Get a specific workflow from an app.
                • Delete a single workflow.
              • List all the workflows.
              • Delete multiple workflows in one request.
              • Add a workflow to an app.
              • Patch one or more workflows.
            • Get a specific app from an app.
            • Search over the apps to find one or more you're looking for. This leverage the "body" parameter because we also have page and per_page as url query param variables in this request.
            • Patch one app.
          • List all the apps.
          • Add a app to an app. This needs to load the default workflow to make a copy, validating all the models in it, and then writing the new workflow back to this new app.
          • Patch one or more apps.
        • collaborations
          • Collaboration includes the app user are invitied to work on
        • datasets
          • List all the datasets.
        • duplications
          • {appDuplicationId}
            • get the app duplication status
          • list all the app duplications user triggers
        • evaluations
          • V2_ListEvaluations2
        • keys
          • {keyId}
            • Get a specific key from an app.
            • Search over the keys to find one or more you're looking for. This leverage the "body" parameter because we also have page and per_page as url query param variables in this request.
          • List all the keys.
          • Add a key to an app.
          • Patch one or more keys.
        • models
          • List all the models.
        • modules
          • List all the modules in community, by user or by app.
        • myscopes
          • V2_MyScopesUser
        • runners
          • {runnerId}
            • items
              • {itemId}
                • outputs
                  • Post back outputs from remote runners
              • List items for the remote runner to work on.
            • Get a specific runner from an app.
          • List all the runners in community, by user or by app.
          • Delete multiple runners in one request.
          • Add a runners to an app.
        • scopes
          • List all auth scopes available to me as a user.
        • validate_password
          • Validate new password in real-time for a user
        • workflows
          • List all the workflows.
        • Get user information
    • validate_password
      • Validate new password in real-time for a user
    • workflows
      • {workflowId}
        • publish
          • V2_PostWorkflowVersionsPublish2
        • results
          • similarity
            • Compare embeddings distances using a workflow
          • Predict using a workflow.
        • unpublish
          • V2_PostWorkflowVersionsUnPublish2
        • versions
          • {workflowVersionId}
            • Get single workflow version.
          • List workflow versions.
          • Delete workflow versions.
          • Patch workflow versions.
        • Get a specific workflow from an app.
        • Delete a single workflow.
      • List all the workflows.
      • Delete multiple workflows in one request.
      • Add a workflow to an app.
      • Patch one or more workflows.
  1. searches

Patch saved annotations searches by ids.

开发环境
http://dev-cn.your-api-server.com
开发环境
http://dev-cn.your-api-server.com
PATCH
/v2/annotations/searches
V2

请求参数

Body 参数application/json
userAppId
object (apiUserAppIDSet) 
可选
Common message to identify the app in a url endpoint.
userId
string 
Note user_id 'me' is reserved - it is the alias for the id of authorized user
可选
appId
string 
可选
searches
array[object (apiSearch) {13}] 
The searches to be patched
可选
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
action
string 
The action to perform on the patched Search objects For now only action 'overwrite' is supported
可选
示例

示例代码

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request PATCH 'http://dev-cn.your-api-server.com/v2/annotations/searches' \
--header 'Content-Type: application/json' \
--data-raw ''

返回响应

🟢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.
示例
🔴500An unexpected error response.
上一页
Execute a search over annotations
下一页
List all the annotation.
Built with