- CLARIFAI API 基础知识
- API 接口
- annotation_filters
- annotations
- apps
- bulk_operations
- {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}
- 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
- datasets
- inputs
- {datasetId}
- inputs
- {inputId}
- 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
- Get a specific dataset.
- inputs
- 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
- inputs
- annotations
- data_sources
- jobs
- searches
- status
- stream
- uploads
- {inputId}
- List all the inputs.GET
- Delete multiple inputs in one request. This call is asynchronous.DELETE
- Add 1 or more input to an app. The actual inputs processing is asynchronous.POST
- Patch one or more inputs.PATCH
- label_orders
- models
- searches
- types
- {modelId}
- check_consents
- inputs
- languages
- output_info
- outputs
- publish
- references
- toolkits
- unpublish
- usecases
- versions
- 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
- my_scopes
- myscopes
- myscopesroot
- open_source_licenses
- resource_counts
- searches
- stats
- status_codes
- tasks
- trending_metrics
- uploads
- users
- {userAppId.userId}
- apps
- ids
- searches
- {userAppId.appId}
- annotation_filters
- annotations
- bulk_operations
- {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
- collectors
- {collectorId}
- 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
- mappings
- relations
- searches
- status
- {conceptId}
- 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
- {datasetId}
- inputs
- {inputId}
- 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
- Get a specific dataset.
- inputs
- 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
- evaluations
- inputs
- installed_module_versions
- {installedModuleVersionId}
- 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
- label_orders
- models
- ids
- searches
- types
- {modelId}
- check_consents
- concepts
- inputs
- languages
- output_info
- outputs
- publish
- references
- toolkits
- unpublish
- usecases
- versions
- 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
- myscopes
- resource_counts
- searches
- stats
- task
- tasks
- trending_metrics
- uploads
- 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
- datasets
- duplications
- evaluations
- keys
- models
- modules
- myscopes
- runners
- scopes
- validate_password
- workflows
- Get user information
- apps
- {userAppId.userId}
- validate_password
- workflows
Get a specific annotation from an app.
开发环境
开发环境
GET
/v2/inputs/{inputId}/annotations/{annotationId}
V2
请求参数
Path 参数
inputId
string
必需
annotationId
string
必需
Query 参数
userAppId.userId
string
可选
userAppId.appId
string
可选
示例代码
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/inputs//annotations/'
返回响应
🟢200A successful response.
application/json
Body
status
object (apistatusStatus)
可选
code
object
可选
description
string
可选
details
string
可选
stackTrace
array[string]
可选
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
可选
redirectInfo
object (statusRedirectInfo)
可选
annotation
object (Annotation of an asset with metadata)
可选
id
string
The ID for the annotation
inputId
string
ID of the input this annotation is tied to
data
object (Data)
可选
annotationInfo
object
task_id is deprecated in annotation_info. Use task_id
userId
string
ID of the user this annotation is created by
modelVersionId
string
ID of the model version this annotation is created by
embedModelVersionId
string
可选
status
object (apistatusStatus)
可选
createdAt
string <date-time>
When the annotation was created. We follow the XXXX timestamp
format. We use https://www.ietf.org/rfc/rfc3339.txt format:
"2006-01-02T15:04:05.999999Z" so you can expect results like
the following from the API:
"2017-04-11T21:50:50.223962Z"
modifiedAt
string <date-time>
可选
trusted
boolean
Whether or not this annotation is trusted
Will be deprecated
inputLevel
boolean
可选
consensusInfo
object
Consensus review related information, e.g.
* annotation group
* id of annotation parent, in case the annotation was split from another annotation
taskId
string
The id of the task annotation belongs to
workflowVersionId
string
ID of the workflow version this annotation is created by
示例
{
"status": {
"code": {},
"description": "string",
"details": "string",
"stackTrace": [
"string"
],
"percentCompleted": 0,
"timeRemaining": 0,
"reqId": "string",
"internalDetails": "string",
"redirectInfo": {
"url": "string",
"resourceType": "string",
"oldResourceId": "string",
"newResourceId": "string"
}
},
"annotation": {
"id": "string",
"inputId": "string",
"data": {
"image": {
"url": "string",
"base64": "string",
"allowDuplicateUrl": true,
"hosted": {
"prefix": "string",
"suffix": "string",
"sizes": [
"string"
],
"crossorigin": "string"
},
"imageInfo": {
"width": 0,
"height": 0,
"format": "string",
"colorMode": "string"
}
},
"video": {
"url": "string",
"base64": "string",
"allowDuplicateUrl": true,
"thumbnailUrl": "string",
"hosted": {
"prefix": "string",
"suffix": "string",
"sizes": [
"string"
],
"crossorigin": "string"
},
"videoInfo": {
"width": 0,
"height": 0,
"fps": 0,
"videoFormat": "string",
"bitRate": 0,
"frameCount": 0,
"durationSeconds": 0
}
},
"concepts": [
{
"id": "string",
"name": "string",
"value": 0,
"createdAt": "2019-08-24T14:15:22Z",
"language": "string",
"appId": "string",
"definition": "string",
"vocabId": "string",
"visibility": {
"gettable": "UNKNOWN_VISIBILITY"
},
"userId": "string",
"keypointInfo": {
"keypointNames": [
"string"
],
"skeleton": [
{
"k1": 0,
"k2": 0
}
]
},
"extraInfo": {
"isRankable": true
}
}
],
"metadata": {},
"geo": {
"geoPoint": {
"longitude": 0,
"latitude": 0
},
"geoLimit": {
"type": "string",
"value": 0
},
"geoBox": [
{
"geoPoint": {
"longitude": 0,
"latitude": 0
}
}
]
},
"colors": [
{
"rawHex": "string",
"w3c": {
"hex": "string",
"name": "string"
},
"value": 0
}
],
"clusters": [
{
"id": "string",
"count": 0,
"score": 0,
"hits": [
{
"score": 0,
"input": {
"id": "string",
"data": {},
"createdAt": "2019-08-24T14:15:22Z",
"modifiedAt": "2019-08-24T14:15:22Z",
"status": {
"code": {},
"description": "string",
"details": "string",
"stackTrace": [
"string"
],
"percentCompleted": 0,
"timeRemaining": 0,
"reqId": "string",
"internalDetails": "string",
"redirectInfo": {
"url": "string",
"resourceType": "string",
"oldResourceId": "string",
"newResourceId": "string"
}
},
"datasetIds": [
"string"
]
},
"annotation": {},
"userId": "string",
"appId": "string"
}
],
"projection": [
0
]
}
],
"embeddings": [
{
"vector": [
0
],
"numDimensions": 0
}
],
"regions": [
{
"id": "string",
"regionInfo": {
"boundingBox": {
"topRow": 0,
"leftCol": 0,
"bottomRow": 0,
"rightCol": 0
},
"mask": {
"image": {
"url": "string",
"base64": "string",
"allowDuplicateUrl": true,
"hosted": {
"prefix": "string",
"suffix": "string",
"sizes": [
"string"
],
"crossorigin": "string"
},
"imageInfo": {
"width": 0,
"height": 0,
"format": "string",
"colorMode": "string"
}
}
},
"polygon": {
"points": [
{
"row": 0,
"col": 0,
"z": 0,
"visibility": "NOT_SET"
}
]
},
"point": {
"row": 0,
"col": 0,
"z": 0,
"visibility": "NOT_SET"
},
"span": {
"charStart": 0,
"charEnd": 0,
"rawText": "string"
},
"token": {
"charStart": 0,
"charEnd": 0,
"rawText": "string"
},
"keypointLocations": [
{
"row": 0,
"col": 0,
"z": 0,
"visibility": "NOT_SET"
}
]
},
"data": {},
"value": 0,
"trackId": "string"
}
],
"frames": [
{
"frameInfo": {
"index": 0,
"time": 0
},
"data": {},
"id": "string"
}
],
"text": {
"raw": "string",
"url": "string",
"allowDuplicateUrl": true,
"hosted": {
"prefix": "string",
"suffix": "string",
"sizes": [
"string"
],
"crossorigin": "string"
},
"textInfo": {
"charCount": 0,
"encoding": "string"
}
},
"audio": {
"url": "string",
"base64": "string",
"allowDuplicateUrl": true,
"hosted": {
"prefix": "string",
"suffix": "string",
"sizes": [
"string"
],
"crossorigin": "string"
},
"audioInfo": {
"audioFormat": "string",
"sampleRate": 0,
"durationSeconds": 0,
"bitRate": 0
}
},
"tracks": [
{
"id": "string",
"data": {},
"timeInfo": {
"numFrames": 0,
"beginTime": 0,
"endTime": 0
},
"quality": 0
}
],
"timeSegments": [
{
"id": "string",
"data": {},
"timeInfo": {
"numFrames": 0,
"beginTime": 0,
"endTime": 0
}
}
],
"hits": [
{
"score": 0,
"input": {
"id": "string",
"data": {},
"createdAt": "2019-08-24T14:15:22Z",
"modifiedAt": "2019-08-24T14:15:22Z",
"status": {
"code": {},
"description": "string",
"details": "string",
"stackTrace": [
"string"
],
"percentCompleted": 0,
"timeRemaining": 0,
"reqId": "string",
"internalDetails": "string",
"redirectInfo": {
"url": "string",
"resourceType": "string",
"oldResourceId": "string",
"newResourceId": "string"
}
},
"datasetIds": [
"string"
]
},
"annotation": {},
"userId": "string",
"appId": "string"
}
],
"heatmaps": [
{
"url": "string",
"base64": "string",
"allowDuplicateUrl": true,
"hosted": {
"prefix": "string",
"suffix": "string",
"sizes": [
"string"
],
"crossorigin": "string"
},
"imageInfo": {
"width": 0,
"height": 0,
"format": "string",
"colorMode": "string"
}
}
]
},
"annotationInfo": {},
"userId": "string",
"modelVersionId": "string",
"embedModelVersionId": "string",
"status": {
"code": {},
"description": "string",
"details": "string",
"stackTrace": [
"string"
],
"percentCompleted": 0,
"timeRemaining": 0,
"reqId": "string",
"internalDetails": "string",
"redirectInfo": {
"url": "string",
"resourceType": "string",
"oldResourceId": "string",
"newResourceId": "string"
}
},
"createdAt": "2019-08-24T14:15:22Z",
"modifiedAt": "2019-08-24T14:15:22Z",
"trusted": true,
"inputLevel": true,
"consensusInfo": {},
"taskId": "string",
"workflowVersionId": "string"
}
}
🔴500An unexpected error response.
修改于 2023-12-11 04:16:54