Agent
Start Agent Run
POST
/
agent
/
conversations
/
{conversation_id}
/
runs
Start Agent Run
curl --request POST \
--url https://api.aspect.inc/agent/conversations/{conversation_id}/runs \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"content": "<string>",
"content_parts": [
{}
],
"page_context": {
"url": "<string>",
"workspace_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"current_resource": {
"resource_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"selection": {
"asset_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"directory_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"collection_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"entity_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"timeline_ranges": [
{}
]
},
"view": {
"filters": {},
"sort": {},
"display_settings": {},
"search_query": "<string>",
"active_tab": "<string>",
"pagination": {}
},
"intent": {
"source": "<string>",
"selected_text": "<string>",
"action_label": "<string>",
"resource_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
},
"mentions": [
{
"reference_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"display_label": "<string>",
"workspace_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"resolution_status": "unresolved",
"start_index": 123,
"end_index": 123
}
],
"model": "<string>"
}
'import requests
url = "https://api.aspect.inc/agent/conversations/{conversation_id}/runs"
payload = {
"content": "<string>",
"content_parts": [{}],
"page_context": {
"url": "<string>",
"workspace_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"current_resource": { "resource_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a" },
"selection": {
"asset_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"directory_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"collection_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"entity_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"timeline_ranges": [{}]
},
"view": {
"filters": {},
"sort": {},
"display_settings": {},
"search_query": "<string>",
"active_tab": "<string>",
"pagination": {}
},
"intent": {
"source": "<string>",
"selected_text": "<string>",
"action_label": "<string>",
"resource_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
},
"mentions": [
{
"reference_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"display_label": "<string>",
"workspace_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"resolution_status": "unresolved",
"start_index": 123,
"end_index": 123
}
],
"model": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
content: '<string>',
content_parts: [{}],
page_context: {
url: '<string>',
workspace_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
project_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
current_resource: {resource_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'},
selection: {
asset_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
directory_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
collection_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
entity_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
timeline_ranges: [{}]
},
view: {
filters: {},
sort: {},
display_settings: {},
search_query: '<string>',
active_tab: '<string>',
pagination: {}
},
intent: {
source: '<string>',
selected_text: '<string>',
action_label: '<string>',
resource_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
}
},
mentions: [
{
reference_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
display_label: '<string>',
workspace_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
project_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
resolution_status: 'unresolved',
start_index: 123,
end_index: 123
}
],
model: '<string>'
})
};
fetch('https://api.aspect.inc/agent/conversations/{conversation_id}/runs', 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/agent/conversations/{conversation_id}/runs",
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([
'content' => '<string>',
'content_parts' => [
[
]
],
'page_context' => [
'url' => '<string>',
'workspace_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'project_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'current_resource' => [
'resource_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'selection' => [
'asset_ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'directory_ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'collection_ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'entity_ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'timeline_ranges' => [
[
]
]
],
'view' => [
'filters' => [
],
'sort' => [
],
'display_settings' => [
],
'search_query' => '<string>',
'active_tab' => '<string>',
'pagination' => [
]
],
'intent' => [
'source' => '<string>',
'selected_text' => '<string>',
'action_label' => '<string>',
'resource_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]
],
'mentions' => [
[
'reference_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'display_label' => '<string>',
'workspace_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'project_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'resolution_status' => 'unresolved',
'start_index' => 123,
'end_index' => 123
]
],
'model' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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/agent/conversations/{conversation_id}/runs"
payload := strings.NewReader("{\n \"content\": \"<string>\",\n \"content_parts\": [\n {}\n ],\n \"page_context\": {\n \"url\": \"<string>\",\n \"workspace_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"project_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"current_resource\": {\n \"resource_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n },\n \"selection\": {\n \"asset_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"directory_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"collection_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"entity_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"timeline_ranges\": [\n {}\n ]\n },\n \"view\": {\n \"filters\": {},\n \"sort\": {},\n \"display_settings\": {},\n \"search_query\": \"<string>\",\n \"active_tab\": \"<string>\",\n \"pagination\": {}\n },\n \"intent\": {\n \"source\": \"<string>\",\n \"selected_text\": \"<string>\",\n \"action_label\": \"<string>\",\n \"resource_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n },\n \"mentions\": [\n {\n \"reference_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"display_label\": \"<string>\",\n \"workspace_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"project_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"resolution_status\": \"unresolved\",\n \"start_index\": 123,\n \"end_index\": 123\n }\n ],\n \"model\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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/agent/conversations/{conversation_id}/runs")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"content\": \"<string>\",\n \"content_parts\": [\n {}\n ],\n \"page_context\": {\n \"url\": \"<string>\",\n \"workspace_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"project_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"current_resource\": {\n \"resource_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n },\n \"selection\": {\n \"asset_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"directory_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"collection_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"entity_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"timeline_ranges\": [\n {}\n ]\n },\n \"view\": {\n \"filters\": {},\n \"sort\": {},\n \"display_settings\": {},\n \"search_query\": \"<string>\",\n \"active_tab\": \"<string>\",\n \"pagination\": {}\n },\n \"intent\": {\n \"source\": \"<string>\",\n \"selected_text\": \"<string>\",\n \"action_label\": \"<string>\",\n \"resource_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n },\n \"mentions\": [\n {\n \"reference_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"display_label\": \"<string>\",\n \"workspace_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"project_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"resolution_status\": \"unresolved\",\n \"start_index\": 123,\n \"end_index\": 123\n }\n ],\n \"model\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aspect.inc/agent/conversations/{conversation_id}/runs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"content\": \"<string>\",\n \"content_parts\": [\n {}\n ],\n \"page_context\": {\n \"url\": \"<string>\",\n \"workspace_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"project_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"current_resource\": {\n \"resource_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n },\n \"selection\": {\n \"asset_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"directory_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"collection_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"entity_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"timeline_ranges\": [\n {}\n ]\n },\n \"view\": {\n \"filters\": {},\n \"sort\": {},\n \"display_settings\": {},\n \"search_query\": \"<string>\",\n \"active_tab\": \"<string>\",\n \"pagination\": {}\n },\n \"intent\": {\n \"source\": \"<string>\",\n \"selected_text\": \"<string>\",\n \"action_label\": \"<string>\",\n \"resource_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n },\n \"mentions\": [\n {\n \"reference_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"display_label\": \"<string>\",\n \"workspace_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"project_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"resolution_status\": \"unresolved\",\n \"start_index\": 123,\n \"end_index\": 123\n }\n ],\n \"model\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
BearerAuthApiKeyAuth
JWT in Authorization header. 'Bearer ' prefix optional.
Path Parameters
Conversation ID
Body
application/json
User message text
Structured user message content
Page context snapshot for the turn
Show child attributes
Show child attributes
Structured mentions in the message
Show child attributes
Show child attributes
Optional model override
Response
Successful Response
⌘I
Start Agent Run
curl --request POST \
--url https://api.aspect.inc/agent/conversations/{conversation_id}/runs \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"content": "<string>",
"content_parts": [
{}
],
"page_context": {
"url": "<string>",
"workspace_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"current_resource": {
"resource_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"selection": {
"asset_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"directory_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"collection_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"entity_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"timeline_ranges": [
{}
]
},
"view": {
"filters": {},
"sort": {},
"display_settings": {},
"search_query": "<string>",
"active_tab": "<string>",
"pagination": {}
},
"intent": {
"source": "<string>",
"selected_text": "<string>",
"action_label": "<string>",
"resource_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
},
"mentions": [
{
"reference_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"display_label": "<string>",
"workspace_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"resolution_status": "unresolved",
"start_index": 123,
"end_index": 123
}
],
"model": "<string>"
}
'import requests
url = "https://api.aspect.inc/agent/conversations/{conversation_id}/runs"
payload = {
"content": "<string>",
"content_parts": [{}],
"page_context": {
"url": "<string>",
"workspace_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"current_resource": { "resource_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a" },
"selection": {
"asset_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"directory_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"collection_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"entity_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"timeline_ranges": [{}]
},
"view": {
"filters": {},
"sort": {},
"display_settings": {},
"search_query": "<string>",
"active_tab": "<string>",
"pagination": {}
},
"intent": {
"source": "<string>",
"selected_text": "<string>",
"action_label": "<string>",
"resource_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
},
"mentions": [
{
"reference_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"display_label": "<string>",
"workspace_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"resolution_status": "unresolved",
"start_index": 123,
"end_index": 123
}
],
"model": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
content: '<string>',
content_parts: [{}],
page_context: {
url: '<string>',
workspace_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
project_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
current_resource: {resource_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'},
selection: {
asset_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
directory_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
collection_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
entity_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
timeline_ranges: [{}]
},
view: {
filters: {},
sort: {},
display_settings: {},
search_query: '<string>',
active_tab: '<string>',
pagination: {}
},
intent: {
source: '<string>',
selected_text: '<string>',
action_label: '<string>',
resource_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
}
},
mentions: [
{
reference_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
display_label: '<string>',
workspace_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
project_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
resolution_status: 'unresolved',
start_index: 123,
end_index: 123
}
],
model: '<string>'
})
};
fetch('https://api.aspect.inc/agent/conversations/{conversation_id}/runs', 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/agent/conversations/{conversation_id}/runs",
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([
'content' => '<string>',
'content_parts' => [
[
]
],
'page_context' => [
'url' => '<string>',
'workspace_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'project_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'current_resource' => [
'resource_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'selection' => [
'asset_ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'directory_ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'collection_ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'entity_ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'timeline_ranges' => [
[
]
]
],
'view' => [
'filters' => [
],
'sort' => [
],
'display_settings' => [
],
'search_query' => '<string>',
'active_tab' => '<string>',
'pagination' => [
]
],
'intent' => [
'source' => '<string>',
'selected_text' => '<string>',
'action_label' => '<string>',
'resource_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]
],
'mentions' => [
[
'reference_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'display_label' => '<string>',
'workspace_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'project_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'resolution_status' => 'unresolved',
'start_index' => 123,
'end_index' => 123
]
],
'model' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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/agent/conversations/{conversation_id}/runs"
payload := strings.NewReader("{\n \"content\": \"<string>\",\n \"content_parts\": [\n {}\n ],\n \"page_context\": {\n \"url\": \"<string>\",\n \"workspace_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"project_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"current_resource\": {\n \"resource_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n },\n \"selection\": {\n \"asset_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"directory_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"collection_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"entity_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"timeline_ranges\": [\n {}\n ]\n },\n \"view\": {\n \"filters\": {},\n \"sort\": {},\n \"display_settings\": {},\n \"search_query\": \"<string>\",\n \"active_tab\": \"<string>\",\n \"pagination\": {}\n },\n \"intent\": {\n \"source\": \"<string>\",\n \"selected_text\": \"<string>\",\n \"action_label\": \"<string>\",\n \"resource_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n },\n \"mentions\": [\n {\n \"reference_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"display_label\": \"<string>\",\n \"workspace_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"project_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"resolution_status\": \"unresolved\",\n \"start_index\": 123,\n \"end_index\": 123\n }\n ],\n \"model\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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/agent/conversations/{conversation_id}/runs")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"content\": \"<string>\",\n \"content_parts\": [\n {}\n ],\n \"page_context\": {\n \"url\": \"<string>\",\n \"workspace_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"project_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"current_resource\": {\n \"resource_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n },\n \"selection\": {\n \"asset_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"directory_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"collection_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"entity_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"timeline_ranges\": [\n {}\n ]\n },\n \"view\": {\n \"filters\": {},\n \"sort\": {},\n \"display_settings\": {},\n \"search_query\": \"<string>\",\n \"active_tab\": \"<string>\",\n \"pagination\": {}\n },\n \"intent\": {\n \"source\": \"<string>\",\n \"selected_text\": \"<string>\",\n \"action_label\": \"<string>\",\n \"resource_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n },\n \"mentions\": [\n {\n \"reference_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"display_label\": \"<string>\",\n \"workspace_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"project_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"resolution_status\": \"unresolved\",\n \"start_index\": 123,\n \"end_index\": 123\n }\n ],\n \"model\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aspect.inc/agent/conversations/{conversation_id}/runs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"content\": \"<string>\",\n \"content_parts\": [\n {}\n ],\n \"page_context\": {\n \"url\": \"<string>\",\n \"workspace_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"project_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"current_resource\": {\n \"resource_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n },\n \"selection\": {\n \"asset_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"directory_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"collection_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"entity_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"timeline_ranges\": [\n {}\n ]\n },\n \"view\": {\n \"filters\": {},\n \"sort\": {},\n \"display_settings\": {},\n \"search_query\": \"<string>\",\n \"active_tab\": \"<string>\",\n \"pagination\": {}\n },\n \"intent\": {\n \"source\": \"<string>\",\n \"selected_text\": \"<string>\",\n \"action_label\": \"<string>\",\n \"resource_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n },\n \"mentions\": [\n {\n \"reference_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"display_label\": \"<string>\",\n \"workspace_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"project_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"resolution_status\": \"unresolved\",\n \"start_index\": 123,\n \"end_index\": 123\n }\n ],\n \"model\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}
