Search a project
curl --request POST \
--url https://api.aspect.inc/search/run \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"spec": {
"signals": [
{
"id": "<string>",
"query": "<string>",
"weight": 123
}
],
"filters": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"values": [
"<unknown>"
]
}
]
}
}
'import requests
url = "https://api.aspect.inc/search/run"
payload = {
"project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"spec": {
"signals": [
{
"id": "<string>",
"query": "<string>",
"weight": 123
}
],
"filters": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"values": ["<unknown>"]
}
]
}
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
project_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
spec: {
signals: [{id: '<string>', query: '<string>', weight: 123}],
filters: [{id: '3c90c3cc-0d44-4b50-8888-8dd25736052a', values: ['<unknown>']}]
}
})
};
fetch('https://api.aspect.inc/search/run', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.aspect.inc/search/run",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'project_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'spec' => [
'signals' => [
[
'id' => '<string>',
'query' => '<string>',
'weight' => 123
]
],
'filters' => [
[
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'values' => [
'<unknown>'
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.aspect.inc/search/run"
payload := strings.NewReader("{\n \"project_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"spec\": {\n \"signals\": [\n {\n \"id\": \"<string>\",\n \"query\": \"<string>\",\n \"weight\": 123\n }\n ],\n \"filters\": [\n {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"values\": [\n \"<unknown>\"\n ]\n }\n ]\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.aspect.inc/search/run")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"project_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"spec\": {\n \"signals\": [\n {\n \"id\": \"<string>\",\n \"query\": \"<string>\",\n \"weight\": 123\n }\n ],\n \"filters\": [\n {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"values\": [\n \"<unknown>\"\n ]\n }\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aspect.inc/search/run")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"project_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"spec\": {\n \"signals\": [\n {\n \"id\": \"<string>\",\n \"query\": \"<string>\",\n \"weight\": 123\n }\n ],\n \"filters\": [\n {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"values\": [\n \"<unknown>\"\n ]\n }\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"assets": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "video",
"name": "<string>",
"size_bytes": 123,
"mime_type": "<string>",
"save_original": true,
"is_uploaded": true,
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"workspace_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"parent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"comment_count": 123,
"created_by_user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created": "2023-11-07T05:31:56Z",
"updated": "2023-11-07T05:31:56Z",
"content_modified_at": "2023-11-07T05:31:56Z",
"breadcrumb_path": [
"<string>"
],
"search": {
"score": 123,
"confidence": "unknown",
"moments": [
{
"id": "<string>",
"kind": "visual",
"confidence": "unknown",
"start_time": 123,
"end_time": 123,
"page": 123,
"query": "<string>",
"preview": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"evidence_text": {
"source": "transcription",
"excerpt": "<string>",
"match_kind": "lexical"
},
"person": {
"person_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"face_track_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}
],
"signals": [
{
"kind": "visual",
"confidence": "unknown",
"moment_count": 123,
"query": "<string>"
}
]
},
"is_symlink": false,
"target_path": [
"<string>"
],
"target_path_type": "relative",
"target_resource_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"target_resource_name": "<string>",
"target_resource_type": "workspace",
"target_resolution_status": "resolved",
"media": {
"width": 123,
"height": 123,
"duration": 123,
"frame_rate": 123,
"timecode": "<string>",
"page_count": 123
},
"path": [
"<string>"
],
"is_generated": false,
"actions": 123,
"stream_proxy": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"url": "<string>",
"url_expires_at": "2023-11-07T05:31:56Z",
"playback_mode": "mp4",
"size_bytes": 123
},
"scrub_proxy": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"url": "<string>",
"url_expires_at": "2023-11-07T05:31:56Z",
"playback_mode": "mp4",
"size_bytes": 123
},
"audio_proxy": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"url": "<string>",
"url_expires_at": "2023-11-07T05:31:56Z",
"playback_mode": "mp4",
"size_bytes": 123
},
"doc_proxy": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"url": "<string>",
"url_expires_at": "2023-11-07T05:31:56Z",
"playback_mode": "mp4",
"size_bytes": 123
},
"scrub_preview": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"url": "<string>",
"url_expires_at": "2023-11-07T05:31:56Z",
"scrub_metadata": {
"frame_count": 123,
"width": 123,
"height": 123,
"frames_x": 123,
"frames_y": 123,
"frame_width": 123,
"frame_height": 123
},
"size_bytes": 123
},
"preview": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"url": "<string>",
"url_expires_at": "2023-11-07T05:31:56Z",
"scrub_metadata": {
"frame_count": 123,
"width": 123,
"height": 123,
"frames_x": 123,
"frames_y": 123,
"frame_width": 123,
"frame_height": 123
},
"size_bytes": 123
},
"custom_thumbnail": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"filename": "<string>",
"mime_type": "<string>",
"size_bytes": 123,
"uploaded": true,
"created": "2023-11-07T05:31:56Z",
"updated": "2023-11-07T05:31:56Z",
"url": "<string>",
"url_expires_at": "2023-11-07T05:31:56Z"
},
"created_by_user": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"first_name": "<string>",
"last_name": "<string>",
"email": "<string>",
"avatar_url": "<string>"
},
"client_performed_at": "2023-11-07T05:31:56Z",
"version_stack_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"version_number": 123,
"is_top_version": true,
"revision_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"is_latest": true,
"manifest_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Search
Search a project
Perform a search operation and return full asset bodies.
POST
/
search
/
run
Search a project
curl --request POST \
--url https://api.aspect.inc/search/run \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"spec": {
"signals": [
{
"id": "<string>",
"query": "<string>",
"weight": 123
}
],
"filters": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"values": [
"<unknown>"
]
}
]
}
}
'import requests
url = "https://api.aspect.inc/search/run"
payload = {
"project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"spec": {
"signals": [
{
"id": "<string>",
"query": "<string>",
"weight": 123
}
],
"filters": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"values": ["<unknown>"]
}
]
}
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
project_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
spec: {
signals: [{id: '<string>', query: '<string>', weight: 123}],
filters: [{id: '3c90c3cc-0d44-4b50-8888-8dd25736052a', values: ['<unknown>']}]
}
})
};
fetch('https://api.aspect.inc/search/run', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.aspect.inc/search/run",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'project_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'spec' => [
'signals' => [
[
'id' => '<string>',
'query' => '<string>',
'weight' => 123
]
],
'filters' => [
[
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'values' => [
'<unknown>'
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.aspect.inc/search/run"
payload := strings.NewReader("{\n \"project_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"spec\": {\n \"signals\": [\n {\n \"id\": \"<string>\",\n \"query\": \"<string>\",\n \"weight\": 123\n }\n ],\n \"filters\": [\n {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"values\": [\n \"<unknown>\"\n ]\n }\n ]\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.aspect.inc/search/run")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"project_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"spec\": {\n \"signals\": [\n {\n \"id\": \"<string>\",\n \"query\": \"<string>\",\n \"weight\": 123\n }\n ],\n \"filters\": [\n {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"values\": [\n \"<unknown>\"\n ]\n }\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aspect.inc/search/run")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"project_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"spec\": {\n \"signals\": [\n {\n \"id\": \"<string>\",\n \"query\": \"<string>\",\n \"weight\": 123\n }\n ],\n \"filters\": [\n {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"values\": [\n \"<unknown>\"\n ]\n }\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"assets": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "video",
"name": "<string>",
"size_bytes": 123,
"mime_type": "<string>",
"save_original": true,
"is_uploaded": true,
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"workspace_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"parent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"comment_count": 123,
"created_by_user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created": "2023-11-07T05:31:56Z",
"updated": "2023-11-07T05:31:56Z",
"content_modified_at": "2023-11-07T05:31:56Z",
"breadcrumb_path": [
"<string>"
],
"search": {
"score": 123,
"confidence": "unknown",
"moments": [
{
"id": "<string>",
"kind": "visual",
"confidence": "unknown",
"start_time": 123,
"end_time": 123,
"page": 123,
"query": "<string>",
"preview": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"evidence_text": {
"source": "transcription",
"excerpt": "<string>",
"match_kind": "lexical"
},
"person": {
"person_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"face_track_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}
],
"signals": [
{
"kind": "visual",
"confidence": "unknown",
"moment_count": 123,
"query": "<string>"
}
]
},
"is_symlink": false,
"target_path": [
"<string>"
],
"target_path_type": "relative",
"target_resource_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"target_resource_name": "<string>",
"target_resource_type": "workspace",
"target_resolution_status": "resolved",
"media": {
"width": 123,
"height": 123,
"duration": 123,
"frame_rate": 123,
"timecode": "<string>",
"page_count": 123
},
"path": [
"<string>"
],
"is_generated": false,
"actions": 123,
"stream_proxy": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"url": "<string>",
"url_expires_at": "2023-11-07T05:31:56Z",
"playback_mode": "mp4",
"size_bytes": 123
},
"scrub_proxy": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"url": "<string>",
"url_expires_at": "2023-11-07T05:31:56Z",
"playback_mode": "mp4",
"size_bytes": 123
},
"audio_proxy": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"url": "<string>",
"url_expires_at": "2023-11-07T05:31:56Z",
"playback_mode": "mp4",
"size_bytes": 123
},
"doc_proxy": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"url": "<string>",
"url_expires_at": "2023-11-07T05:31:56Z",
"playback_mode": "mp4",
"size_bytes": 123
},
"scrub_preview": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"url": "<string>",
"url_expires_at": "2023-11-07T05:31:56Z",
"scrub_metadata": {
"frame_count": 123,
"width": 123,
"height": 123,
"frames_x": 123,
"frames_y": 123,
"frame_width": 123,
"frame_height": 123
},
"size_bytes": 123
},
"preview": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"url": "<string>",
"url_expires_at": "2023-11-07T05:31:56Z",
"scrub_metadata": {
"frame_count": 123,
"width": 123,
"height": 123,
"frames_x": 123,
"frames_y": 123,
"frame_width": 123,
"frame_height": 123
},
"size_bytes": 123
},
"custom_thumbnail": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"filename": "<string>",
"mime_type": "<string>",
"size_bytes": 123,
"uploaded": true,
"created": "2023-11-07T05:31:56Z",
"updated": "2023-11-07T05:31:56Z",
"url": "<string>",
"url_expires_at": "2023-11-07T05:31:56Z"
},
"created_by_user": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"first_name": "<string>",
"last_name": "<string>",
"email": "<string>",
"avatar_url": "<string>"
},
"client_performed_at": "2023-11-07T05:31:56Z",
"version_stack_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"version_number": 123,
"is_top_version": true,
"revision_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"is_latest": true,
"manifest_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Aspect API key (sk_...) in Authorization header. 'Bearer ' optional.
Body
application/json
Response
Successful Response
Top-level response for project search.
List of assets matching the search query
Show child attributes
Show child attributes
⌘I